nrf5/modules: Splitting includes to be inside or outside of the compile guard in ubluepy. This way, all micropython specific includes will be outside, and internal will be inside. This way, there will not be any dependency towards ubluepy headers if not compiled in.

This commit is contained in:
Glenn Ruben Bakke 2017-02-15 19:33:11 +01:00
parent db75b5535c
commit d29539a395
4 changed files with 8 additions and 6 deletions

View File

@ -26,10 +26,11 @@
#include "py/obj.h"
#include "py/runtime.h"
#include "modubluepy.h"
#if MICROPY_PY_UBLUEPY_PERIPHERAL || MICROPY_PY_UBLUEPY_CENTRAL
#include "modubluepy.h"
STATIC void ubluepy_characteristic_print(const mp_print_t *print, mp_obj_t o, mp_print_kind_t kind) {
ubluepy_characteristic_obj_t * self = (ubluepy_characteristic_obj_t *)o;

View File

@ -26,10 +26,11 @@
#include "py/obj.h"
#include "py/runtime.h"
#include "modubluepy.h"
#if MICROPY_PY_UBLUEPY_PERIPHERAL || MICROPY_PY_UBLUEPY_CENTRAL
#include "modubluepy.h"
STATIC void ubluepy_delegate_print(const mp_print_t *print, mp_obj_t o, mp_print_kind_t kind) {
ubluepy_delegate_obj_t * self = (ubluepy_delegate_obj_t *)o;
(void)self;

View File

@ -24,11 +24,11 @@
* THE SOFTWARE.
*/
#include "py/obj.h"
#include "py/runtime.h"
#if MICROPY_PY_UBLUEPY_PERIPHERAL || MICROPY_PY_UBLUEPY_CENTRAL
#include "py/obj.h"
#include "py/runtime.h"
#include "modubluepy.h"
#include "softdevice.h"

View File

@ -24,13 +24,13 @@
* THE SOFTWARE.
*/
#if MICROPY_PY_UBLUEPY
#include "py/obj.h"
#include "py/runtime.h"
#include "py/objstr.h"
#include "py/misc.h"
#if MICROPY_PY_UBLUEPY
#include "modubluepy.h"
#include "softdevice.h"