mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
alif: Integrate cyw43 Bluetooth with NimBLE.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user