mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-04 09:07:52 +00:00
Return the current tick as when the RF will be fully enabled (when MYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME is not defined).
When `MYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME` is not defined, the existing code always returns 0 as the "tick at which RF will be fully enabled". However, this causes problems. For example, in `ble_ll_adv_sm_start()` (ble_ll_adv.c:2743) the calculation of `delta` overflows when the system timer is between 0x80000000 and 0xFFFFFFFF -- causing an incorrect, huge adjustment to be made to the scheduled time, ultimately stopping the advertisements from being sent.
This commit is contained in:
committed by
Andrzej Kaczmarek
parent
5b93f6945a
commit
ba36c802f3
@@ -51,7 +51,7 @@ static inline void ble_ll_rfmgmt_reset(void) { }
|
||||
static inline void ble_ll_rfmgmt_scan_changed(bool e, uint32_t n) { }
|
||||
static inline void ble_ll_rfmgmt_sched_changed(struct ble_ll_sched_item *f) { }
|
||||
static inline void ble_ll_rfmgmt_release(void) { }
|
||||
static inline uint32_t ble_ll_rfmgmt_enable_now(void) { return 0; }
|
||||
static inline uint32_t ble_ll_rfmgmt_enable_now(void) { return os_cputime_get32(); }
|
||||
static inline bool ble_ll_rfmgmt_is_enabled(void) { return true; }
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user