feat(esp_hw_support): support esp_perip_clk_init for esp32c5

This commit is contained in:
wuzhenghui
2025-01-20 15:49:03 +08:00
parent 904d9526d3
commit 34f249a28b
14 changed files with 402 additions and 110 deletions

View File

@@ -188,7 +188,7 @@ FORCE_INLINE_ATTR bool lp_uart_ll_set_baudrate(uart_dev_t *hw, uint32_t baud, ui
* @param hw_id LP UART instance ID
* @param enable True to enable, False to disable
*/
static inline void lp_uart_ll_enable_bus_clock(int hw_id, bool enable)
static inline void _lp_uart_ll_enable_bus_clock(int hw_id, bool enable)
{
(void)hw_id;
LPPERI.clk_en.lp_uart_ck_en = enable;
@@ -197,7 +197,7 @@ static inline void lp_uart_ll_enable_bus_clock(int hw_id, bool enable)
/// LPPERI.clk_en is a shared register, so this function must be used in an atomic way
#define lp_uart_ll_enable_bus_clock(...) do { \
(void)__DECLARE_RCC_ATOMIC_ENV; \
lp_uart_ll_enable_bus_clock(__VA_ARGS__); \
_lp_uart_ll_enable_bus_clock(__VA_ARGS__); \
} while(0)
/**