mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-24 01:25:36 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user