mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
Add esp_timer_is_active function for Nimble stack to use esp_timer instead of FreeRTOS timer
This commit is contained in:
@@ -500,3 +500,9 @@ config BT_NIMBLE_BLUFI_ENABLE
|
|||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Set this option to enable blufi functionality.
|
Set this option to enable blufi functionality.
|
||||||
|
|
||||||
|
config BT_NIMBLE_USE_ESP_TIMER
|
||||||
|
bool "Enable Esp Timer for Nimble"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Set this option to use Esp Timer which has higher priority timer instead of FreeRTOS timer
|
||||||
|
Submodule components/bt/host/nimble/nimble updated: 5bb7b40227...a90d8e46b8
@@ -1374,4 +1374,12 @@
|
|||||||
#define MYNEWT_VAL_NEWT_FEATURE_LOGCFG (1)
|
#define MYNEWT_VAL_NEWT_FEATURE_LOGCFG (1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MYNEWT_VAL_BLE_USE_ESP_TIMER
|
||||||
|
#ifdef CONFIG_BT_NIMBLE_USE_ESP_TIMER
|
||||||
|
#define MYNEWT_VAL_BLE_USE_ESP_TIMER (1)
|
||||||
|
#else
|
||||||
|
#define MYNEWT_VAL_BLE_USE_ESP_TIMER (0)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -242,6 +242,18 @@ esp_err_t esp_timer_dump(FILE* stream);
|
|||||||
void esp_timer_isr_dispatch_need_yield(void);
|
void esp_timer_isr_dispatch_need_yield(void);
|
||||||
#endif // CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD
|
#endif // CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns status of a timer, active or not
|
||||||
|
*
|
||||||
|
* This function is used to identify if the timer is still active or not.
|
||||||
|
*
|
||||||
|
* @param timer timer handle created using esp_timer_create
|
||||||
|
* @return
|
||||||
|
* - 1 if timer is still active
|
||||||
|
* - 0 if timer is not active.
|
||||||
|
*/
|
||||||
|
bool esp_timer_is_active(esp_timer_handle_t timer);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -621,3 +621,8 @@ int64_t IRAM_ATTR esp_timer_get_next_alarm_for_wake_up(void)
|
|||||||
}
|
}
|
||||||
return next_alarm;
|
return next_alarm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool esp_timer_is_active(esp_timer_handle_t timer)
|
||||||
|
{
|
||||||
|
return timer_armed(timer);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user