From 281b76e1517c3f6103dc4b3679d9dd2215fe2d84 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Tue, 23 May 2023 15:41:07 -0300 Subject: [PATCH] fixes ESP32-C3 WiFiProv and btInUse() --- cores/esp32/esp32-hal-bt.c | 3 ++- cores/esp32/esp32-hal-misc.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cores/esp32/esp32-hal-bt.c b/cores/esp32/esp32-hal-bt.c index d17a761bebd..7b6a54e1ad4 100644 --- a/cores/esp32/esp32-hal-bt.c +++ b/cores/esp32/esp32-hal-bt.c @@ -16,7 +16,8 @@ #ifdef CONFIG_BT_ENABLED -bool btInUse(){ return true; } +// user may want to change it to free resources +__attribute__((weak)) bool btInUse(){ return true; } #include "esp_bt.h" diff --git a/cores/esp32/esp32-hal-misc.c b/cores/esp32/esp32-hal-misc.c index 1a71b0e86f9..9bc1b3a3a8e 100644 --- a/cores/esp32/esp32-hal-misc.c +++ b/cores/esp32/esp32-hal-misc.c @@ -209,9 +209,8 @@ bool verifyRollbackLater() { return false; } #endif #ifdef CONFIG_BT_ENABLED -//overwritten in esp32-hal-bt.c -bool btInUse() __attribute__((weak)); -bool btInUse(){ return false; } +//from esp32-hal-bt.c +extern bool btInUse(); #endif void initArduino()