mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-08 08:19:28 +00:00
gptimer: add API to get captured count value
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -45,6 +45,14 @@ void timer_hal_init(timer_hal_context_t *hal, uint32_t group_num, uint32_t timer
|
||||
*/
|
||||
void timer_hal_set_counter_value(timer_hal_context_t *hal, uint64_t load_val);
|
||||
|
||||
/**
|
||||
* @brief Trigger a software capture event and then return the captured count value
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @return Counter value
|
||||
*/
|
||||
uint64_t timer_hal_capture_and_get_counter_value(timer_hal_context_t *hal);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user