esp_phy: added API esp_btbb_disable

APIs esp_btbb_enable and esp_btbb_disable are supposed to be used by 802.15.4 and Bluetooth module, and implemented with reference counter for resource management
This commit is contained in:
wangmengyang
2023-03-17 16:18:27 +08:00
committed by BOT
parent 786851bfbd
commit cbb8bf9f88
6 changed files with 30 additions and 9 deletions

View File

@@ -23,3 +23,12 @@ void esp_btbb_enable(void)
s_btbb_access_ref++;
_lock_release(&s_btbb_access_lock);
}
void esp_btbb_disable(void)
{
_lock_acquire(&s_btbb_access_lock);
if (s_btbb_access_ref > 0) {
s_btbb_access_ref--;
}
_lock_release(&s_btbb_access_lock);
}