gptimer: add API to get captured count value

This commit is contained in:
morris
2022-07-13 13:17:32 +08:00
parent e06c230a1d
commit 995b89fbb6
15 changed files with 171 additions and 86 deletions

View File

@@ -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