stm32/mpbthciport: Change from systick to soft-timer for BT scheduling.

Instead of using systick the BT subsystem is now scheduled using a soft
timer.  This means it is scheduled only when it is enabled.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-05-12 17:18:22 +10:00
parent 60f1f76984
commit 74c2c31811
7 changed files with 111 additions and 39 deletions

View File

@@ -54,6 +54,7 @@
#endif
#include "boardctrl.h"
#include "mpbthciport.h"
#include "mpu.h"
#include "rfcore.h"
#include "systick.h"
@@ -440,8 +441,7 @@ void stm32_main(uint32_t reset_mode) {
systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
#endif
#if MICROPY_PY_BLUETOOTH
extern void mp_bluetooth_hci_systick(uint32_t ticks_ms);
systick_enable_dispatch(SYSTICK_DISPATCH_BLUETOOTH_HCI, mp_bluetooth_hci_systick);
mp_bluetooth_hci_init();
#endif
#if MICROPY_PY_NETWORK_CYW43