Merge branch 'refactor/ll_functions_update' into 'master'

refactor(uhci): rename set_eof_mode to enable_eof_modes with bool en param

See merge request espressif/esp-idf!51144
This commit is contained in:
morris
2026-07-27 11:02:28 +08:00
18 changed files with 154 additions and 191 deletions
@@ -187,21 +187,21 @@ static inline uint32_t uhci_ll_get_intr(uhci_dev_t *hw)
* @brief Set the EOF mode for payload receive
*
* @param hw Pointer to the UHCI device
* @param eof_mode The EOF mode to set. The following modes are supported:
* @param eof_modes The EOF mode to set. The following modes are supported:
* - UHCI_RX_BREAK_CHR_EOF: UHCI will end payload receive process when NULL frame is received by UART.
* - UHCI_RX_IDLE_EOF: UHCI will end payload receive process when UART has been in idle state.
* - UHCI_RX_LEN_EOF: UHCI will end payload receive process when the receiving byte count has reached the specific value.
*/
static inline void uhci_ll_rx_set_eof_mode(uhci_dev_t *hw, uint32_t eof_mode)
static inline void uhci_ll_rx_enable_eof_modes(uhci_dev_t *hw, uint32_t eof_modes, bool en)
{
if (eof_mode & UHCI_RX_BREAK_CHR_EOF) {
hw->conf0.uart_rx_brk_eof_en = 1;
if (eof_modes & UHCI_RX_BREAK_CHR_EOF) {
hw->conf0.uart_rx_brk_eof_en = en;
}
if (eof_mode & UHCI_RX_IDLE_EOF) {
hw->conf0.uart_idle_eof_en = 1;
if (eof_modes & UHCI_RX_IDLE_EOF) {
hw->conf0.uart_idle_eof_en = en;
}
if (eof_mode & UHCI_RX_LEN_EOF) {
hw->conf0.len_eof_en = 1;
if (eof_modes & UHCI_RX_LEN_EOF) {
hw->conf0.len_eof_en = en;
}
}