mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 04:25:32 +00:00
uart: Provide support for esp32c2 and esp32h2
UART examples, unit test, and programming guide are all updated.
This commit is contained in:
@@ -51,18 +51,42 @@ typedef enum {
|
||||
UART_INTR_WAKEUP = (0x1 << 19),
|
||||
} uart_intr_t;
|
||||
|
||||
static inline void uart_ll_reset_core(uart_dev_t *hw) {
|
||||
hw->clk_conf.rst_core = 1;
|
||||
hw->clk_conf.rst_core = 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;
|
||||
}
|
||||
|
||||
static inline void uart_ll_sclk_enable(uart_dev_t *hw) {
|
||||
/**
|
||||
* @brief Enable the UART clock.
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
static inline void uart_ll_sclk_enable(uart_dev_t *hw)
|
||||
{
|
||||
hw->clk_conf.sclk_en = 1;
|
||||
hw->clk_conf.rx_sclk_en = 1;
|
||||
hw->clk_conf.tx_sclk_en = 1;
|
||||
}
|
||||
|
||||
static inline void uart_ll_sclk_disable(uart_dev_t *hw) {
|
||||
/**
|
||||
* @brief Disable the UART clock.
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
static inline void uart_ll_sclk_disable(uart_dev_t *hw)
|
||||
{
|
||||
hw->clk_conf.sclk_en = 0;
|
||||
hw->clk_conf.rx_sclk_en = 0;
|
||||
hw->clk_conf.tx_sclk_en = 0;
|
||||
|
Reference in New Issue
Block a user