From 2e1cd87f108873c3109db1ef77f01bd928190465 Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Wed, 20 Mar 2024 14:07:21 +1100 Subject: [PATCH] bluetooth/nimble: Schedule hci poll on eventq_put. Signed-off-by: Andrew Leech --- extmod/nimble/nimble/nimble_npl_os.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extmod/nimble/nimble/nimble_npl_os.c b/extmod/nimble/nimble/nimble_npl_os.c index 0dc80482c4..4ed6b0dfc3 100644 --- a/extmod/nimble/nimble/nimble_npl_os.c +++ b/extmod/nimble/nimble/nimble_npl_os.c @@ -33,6 +33,7 @@ #include "extmod/modbluetooth.h" #include "extmod/nimble/modbluetooth_nimble.h" +#include "mpbthciport.h" // for port specific mp_bluetooth_hci_poll_now() #define DEBUG_OS_printf(...) // printf(__VA_ARGS__) #define DEBUG_MALLOC_printf(...) // printf(__VA_ARGS__) @@ -273,6 +274,8 @@ void ble_npl_eventq_put(struct ble_npl_eventq *evq, struct ble_npl_event *ev) { } } OS_EXIT_CRITICAL(sr); + // poll bluetooth to handle any new tasks from the new event. + mp_bluetooth_hci_poll_now(); } void ble_npl_event_init(struct ble_npl_event *ev, ble_npl_event_fn *fn, void *arg) {