alif: Integrate cyw43 Bluetooth with NimBLE.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-03-10 13:57:48 +11:00
parent d6e33423da
commit 30dfbe5dc0
8 changed files with 333 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
#include "py/mperrno.h"
#include "py/mphal.h"
#include "py/stackctrl.h"
#include "extmod/modbluetooth.h"
#include "extmod/modnetwork.h"
#include "shared/readline/readline.h"
#include "shared/runtime/gchelper.h"
@@ -37,6 +38,7 @@
#include "shared/runtime/softtimer.h"
#include "shared/tinyusb/mp_usbd.h"
#include "tusb.h"
#include "mpbthciport.h"
#include "mpuart.h"
#include "ospi_flash.h"
#include "pendsv.h"
@@ -103,6 +105,10 @@ int main(void) {
mod_network_lwip_init();
#endif
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_hci_init();
#endif
#if MICROPY_PY_NETWORK_CYW43
{
cyw43_init(&cyw43_state);
@@ -154,6 +160,9 @@ int main(void) {
soft_reset_exit:
mp_printf(MP_PYTHON_PRINTER, "MPY: soft reboot\n");
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_deinit();
#endif
soft_timer_deinit();
gc_sweep_all();
mp_deinit();