mimxrt: Integrate Bluetooth support with NimBLE bindings.

This commit adds the necessary functions to get NimBLE working with the
mimxrt port.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
iabdalkader
2023-05-09 17:06:57 +02:00
committed by Damien George
parent 772a36098f
commit fc495240a6
7 changed files with 376 additions and 0 deletions

View File

@@ -47,6 +47,12 @@
#include "lib/cyw43-driver/src/cyw43.h"
#endif
#endif
#if MICROPY_PY_BLUETOOTH
#include "mpbthciport.h"
#include "extmod/modbluetooth.h"
#endif
#include "systick.h"
#include "extmod/modnetwork.h"
@@ -71,6 +77,9 @@ int main(void) {
systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
#endif
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_hci_init();
#endif
#if MICROPY_PY_NETWORK_CYW43
{
@@ -135,6 +144,9 @@ int main(void) {
#if MICROPY_PY_MACHINE_I2S
machine_i2s_deinit_all();
#endif
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_deinit();
#endif
#if MICROPY_PY_NETWORK
mod_network_deinit();
#endif