fix(mcpwm): account for adjusted timer resolution in test

This commit is contained in:
Steven Yang
2026-09-11 21:37:12 +08:00
parent 764a0c442e
commit f49e27bfe8
3 changed files with 52 additions and 23 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -61,6 +61,17 @@ typedef struct {
*/
esp_err_t mcpwm_new_timer(const mcpwm_timer_config_t *config, mcpwm_timer_handle_t *ret_timer);
/**
* @brief Get MCPWM timer resolution, in Hz
*
* @param[in] timer MCPWM timer handle, allocated by `mcpwm_new_timer()`
* @param[out] out_resolution Returned timer resolution, in Hz
* @return
* - ESP_OK: Get timer resolution successfully
* - ESP_ERR_INVALID_ARG: Get timer resolution failed because of invalid argument
*/
esp_err_t mcpwm_timer_get_resolution(mcpwm_timer_handle_t timer, uint32_t *out_resolution);
/**
* @brief Delete MCPWM timer
*