esp_system: introduce system time functions
- Introduce system time function and concept of system time provider. esp_timer is system time provider when present. - Set the reference point for system time, g_startup_time. - Use the system time functions in newlib instead of calling esp_timer functions directly
This commit is contained in:
@@ -61,6 +61,16 @@ void esp_reset_reason_set_hint(esp_reset_reason_t hint);
|
||||
*/
|
||||
esp_reset_reason_t esp_reset_reason_get_hint(void);
|
||||
|
||||
/**
|
||||
* @brief Set function which provides `esp_system_get_time`.
|
||||
*
|
||||
* @param time_fn function which provides system time
|
||||
* @param resolution resolution in microseconds of the time provider function specified
|
||||
*/
|
||||
void esp_system_set_time_provider(esp_system_time_fn_t time_fn, uint32_t resolution);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user