mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
feat: supports lp uart wakeup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -202,7 +202,7 @@ void uart_hal_init(uart_hal_context_t *hal, uart_port_t uart_num);
|
||||
* @brief Get the UART source clock type
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param sclk The poiter to accept the UART source clock type
|
||||
* @param sclk The pointer to accept the UART source clock type
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
@@ -341,7 +341,7 @@ void uart_hal_tx_break(uart_hal_context_t *hal, uint32_t break_num);
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void uart_hal_set_wakeup_thrd(uart_hal_context_t *hal, uint32_t wakeup_thrd);
|
||||
void uart_hal_set_wakeup_edge_thrd(uart_hal_context_t *hal, uint32_t wakeup_thrd);
|
||||
|
||||
/**
|
||||
* @brief Configure the UART mode
|
||||
@@ -357,7 +357,7 @@ void uart_hal_set_mode(uart_hal_context_t *hal, uart_mode_t mode);
|
||||
* @brief Configure the UART hardware to inverse the signals
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param inv_mask The sigal mask needs to be inversed. Use the ORred mask of type `uart_signal_inv_t`
|
||||
* @param inv_mask The signal mask needs to be inversed. Use the ORred mask of type `uart_signal_inv_t`
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
@@ -371,7 +371,7 @@ void uart_hal_inverse_signal(uart_hal_context_t *hal, uint32_t inv_mask);
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void uart_hal_get_wakeup_thrd(uart_hal_context_t *hal, uint32_t *wakeup_thrd);
|
||||
void uart_hal_get_wakeup_edge_thrd(uart_hal_context_t *hal, uint32_t *wakeup_thrd);
|
||||
|
||||
/**
|
||||
* @brief Get the UART data bit configuration
|
||||
@@ -437,7 +437,7 @@ bool uart_hal_is_hw_rts_en(uart_hal_context_t *hal);
|
||||
* @brief Configure TX signal loop back to RX module, just for the testing purposes
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param loop_back_en Set ture to enable the loop back function, else set it false.
|
||||
* @param loop_back_en Set true to enable the loop back function, else set it false.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -140,6 +140,26 @@ typedef struct {
|
||||
uint8_t xoff_thrd; /*!< If the software flow control is enabled and the data amount in rxfifo is more than xoff_thrd, an xoff_char will be sent*/
|
||||
} uart_sw_flowctrl_t;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Enumeration of UART wake-up modes.
|
||||
*/
|
||||
typedef enum {
|
||||
#if SOC_UART_WAKEUP_SUPPORT_ACTIVE_THRESH_MODE
|
||||
UART_WK_MODE_ACTIVE_THRESH = 0, /*!< Wake-up triggered by active edge threshold */
|
||||
#endif
|
||||
#if SOC_UART_WAKEUP_SUPPORT_FIFO_THRESH_MODE
|
||||
UART_WK_MODE_FIFO_THRESH = 1, /*!< Wake-up triggered by the number of bytes received in the RX FIFO */
|
||||
#endif
|
||||
#if SOC_UART_WAKEUP_SUPPORT_START_BIT_MODE
|
||||
UART_WK_MODE_START_BIT = 2, /*!< Wake-up triggered by the detection of a start bit */
|
||||
#endif
|
||||
#if SOC_UART_WAKEUP_SUPPORT_CHAR_SEQ_MODE
|
||||
UART_WK_MODE_CHAR_SEQ = 3 /*!< Wake-up triggered by detecting a specific character sequence */
|
||||
#endif
|
||||
} uart_wakeup_mode_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user