mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-02 16:11:41 +01:00
feat(uart): add LP-UART GPIO support
This commit is contained in:
@@ -80,19 +80,6 @@ FORCE_INLINE_ATTR bool uart_ll_is_enabled(uint32_t uart_num)
|
||||
DPORT_REG_GET_BIT(SYSTEM_PERIP_CLK_EN0_REG, uart_en_bit) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Configure the UART core reset.
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
* @param core_rst_en True to enable the core reset, otherwise set it false.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
static inline void uart_ll_set_reset_core(uart_dev_t *hw, bool core_rst_en)
|
||||
{
|
||||
hw->clk_conf.rst_core = core_rst_en;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable the bus clock for uart
|
||||
* @param uart_num UART port number, the max port number is (UART_NUM_MAX -1).
|
||||
@@ -147,6 +134,19 @@ static inline void uart_ll_reset_register(uart_port_t uart_num)
|
||||
// SYSTEM.perip_rst_enx are shared registers, so this function must be used in an atomic way
|
||||
#define uart_ll_reset_register(...) (void)__DECLARE_RCC_ATOMIC_ENV; uart_ll_reset_register(__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* @brief Configure the UART core reset.
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
* @param core_rst_en True to enable the core reset, otherwise set it false.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
static inline void uart_ll_set_reset_core(uart_dev_t *hw, bool core_rst_en)
|
||||
{
|
||||
hw->clk_conf.rst_core = core_rst_en;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the UART source clock.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user