refactor(mcpwm): add RCC related LL functions

This commit is contained in:
morris
2023-09-13 19:13:01 +08:00
parent 608fca9d31
commit 3234ee3f9e
10 changed files with 279 additions and 39 deletions

View File

@@ -74,6 +74,30 @@ typedef enum {
////////////////////////////////////////MCPWM Group Specific////////////////////////////////////////////////////////////
/**
* @brief Enable the bus clock for MCPWM module
*
* @param group_id Group ID
* @param enable true to enable, false to disable
*/
static inline void mcpwm_ll_enable_bus_clock(int group_id, bool enable)
{
(void)group_id;
PCR.pwm_conf.pwm_clk_en = enable;
}
/**
* @brief Reset the MCPWM module
*
* @param group_id Group ID
*/
static inline void mcpwm_ll_reset_register(int group_id)
{
(void)group_id;
PCR.pwm_conf.pwm_rst_en = 1;
PCR.pwm_conf.pwm_rst_en = 0;
}
/**
* @brief Set the clock source for MCPWM
*