From 9ea9e04ef63897c8e8349813cfc65d29d7f20078 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Mon, 10 Apr 2023 19:11:53 +0200 Subject: [PATCH] rp2/mpconfigport: Disable BLE locking when MICROPY_PY_BLUETOOTH enabled. Bluetooth code runs in the scheduler, so no locking/mutex is required. Signed-off-by: iabdalkader --- ports/rp2/mpconfigport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index df4483166..056e2df4f 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -283,7 +283,7 @@ extern uint32_t rosc_random_u32(void); extern void lwip_lock_acquire(void); extern void lwip_lock_release(void); -#if MICROPY_PY_BLUETOOTH_CYW43 +#if MICROPY_PY_BLUETOOTH || MICROPY_PY_BLUETOOTH_CYW43 // Bluetooth code only runs in the scheduler, no locking/mutex required. #define MICROPY_PY_BLUETOOTH_ENTER uint32_t atomic_state = 0; #define MICROPY_PY_BLUETOOTH_EXIT (void)atomic_state;