stm32/mpconfigport.h: Add modbluetooth module to stm32.

This commit is contained in:
Jim Mussared 2019-09-30 12:23:00 +10:00
parent eb1b6858a2
commit 6f35f214d3
2 changed files with 14 additions and 0 deletions

View File

@ -379,6 +379,12 @@ SRC_USBDEV = $(addprefix $(USBDEV_DIR)/,\
class/src/usbd_msc_scsi.c \ class/src/usbd_msc_scsi.c \
) )
ifeq ($(MICROPY_PY_BLUETOOTH),1)
CFLAGS_MOD += -DMICROPY_PY_BLUETOOTH=1
CFLAGS_MOD += -DMICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE=1
CFLAGS_MOD += -DMICROPY_PY_BLUETOOTH_GATTS_ON_READ_CALLBACK=1
endif
ifeq ($(MICROPY_PY_NETWORK_CYW43),1) ifeq ($(MICROPY_PY_NETWORK_CYW43),1)
CFLAGS_MOD += -DMICROPY_PY_NETWORK_CYW43=1 CFLAGS_MOD += -DMICROPY_PY_NETWORK_CYW43=1
SRC_C += sdio.c SRC_C += sdio.c

View File

@ -211,6 +211,7 @@ extern const struct _mp_obj_module_t mp_module_uos;
extern const struct _mp_obj_module_t mp_module_utime; extern const struct _mp_obj_module_t mp_module_utime;
extern const struct _mp_obj_module_t mp_module_usocket; extern const struct _mp_obj_module_t mp_module_usocket;
extern const struct _mp_obj_module_t mp_module_network; extern const struct _mp_obj_module_t mp_module_network;
extern const struct _mp_obj_module_t mp_module_bluetooth;
extern const struct _mp_obj_module_t mp_module_onewire; extern const struct _mp_obj_module_t mp_module_onewire;
#if MICROPY_PY_STM #if MICROPY_PY_STM
@ -245,6 +246,12 @@ extern const struct _mp_obj_module_t mp_module_onewire;
#define NETWORK_BUILTIN_MODULE #define NETWORK_BUILTIN_MODULE
#endif #endif
#if MICROPY_PY_BLUETOOTH
#define BLUETOOTH_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_bluetooth), MP_ROM_PTR(&mp_module_bluetooth) },
#else
#define BLUETOOTH_BUILTIN_MODULE
#endif
#define MICROPY_PORT_BUILTIN_MODULES \ #define MICROPY_PORT_BUILTIN_MODULES \
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&machine_module) }, \ { MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&machine_module) }, \
{ MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) }, \ { MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) }, \
@ -253,6 +260,7 @@ extern const struct _mp_obj_module_t mp_module_onewire;
{ MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \ { MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \
SOCKET_BUILTIN_MODULE \ SOCKET_BUILTIN_MODULE \
NETWORK_BUILTIN_MODULE \ NETWORK_BUILTIN_MODULE \
BLUETOOTH_BUILTIN_MODULE \
{ MP_ROM_QSTR(MP_QSTR__onewire), MP_ROM_PTR(&mp_module_onewire) }, \ { MP_ROM_QSTR(MP_QSTR__onewire), MP_ROM_PTR(&mp_module_onewire) }, \
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \ #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \