stm32/mpconfigport.h: Add modbluetooth module to stm32.
This commit is contained in:
parent
eb1b6858a2
commit
6f35f214d3
@ -379,6 +379,12 @@ SRC_USBDEV = $(addprefix $(USBDEV_DIR)/,\
|
||||
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)
|
||||
CFLAGS_MOD += -DMICROPY_PY_NETWORK_CYW43=1
|
||||
SRC_C += sdio.c
|
||||
|
@ -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_usocket;
|
||||
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;
|
||||
|
||||
#if MICROPY_PY_STM
|
||||
@ -245,6 +246,12 @@ extern const struct _mp_obj_module_t mp_module_onewire;
|
||||
#define NETWORK_BUILTIN_MODULE
|
||||
#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 \
|
||||
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&machine_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) }, \
|
||||
SOCKET_BUILTIN_MODULE \
|
||||
NETWORK_BUILTIN_MODULE \
|
||||
BLUETOOTH_BUILTIN_MODULE \
|
||||
{ MP_ROM_QSTR(MP_QSTR__onewire), MP_ROM_PTR(&mp_module_onewire) }, \
|
||||
|
||||
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
|
||||
|
Loading…
x
Reference in New Issue
Block a user