MCPWM: expose API to set timer resolution

Closes https://github.com/espressif/esp-idf/issues/1101
This commit is contained in:
SalimTerryLi
2021-07-28 17:09:02 +08:00
parent 1063f0c9dd
commit f4314af913
6 changed files with 178 additions and 37 deletions

View File

@@ -41,7 +41,7 @@ extern "C" {
/********************* Group registers *******************/
// Set/Get group clock: PWM_clk = CLK_160M / (prescale + 1)
// Set/Get group clock: PWM_clk = CLK_160M / (clk_cfg.prescale + 1)
static inline void mcpwm_ll_group_set_clock_prescale(mcpwm_dev_t *mcpwm, int pre_scale)
{
mcpwm->clk_cfg.prescale = pre_scale - 1;