Open
Description
I saw this PR 6e6cb52 and some discussion in issue #500.
It is not flexible to have both RX and RX timeout interrupts enabled together. In some cases when UART is used together with DMA, we just want to have the RX timeout (IDLE) to tell CPU that a complete frame is received without triggering a DMA interrupt, and definitely, we do not want each character or FIFO threshold trigger a interrupt
I would suggest using a single function to control each interrupt bit. Even the original one is breaking the single-purpose design principle.
Will be something like, what's your thoughts?
uart_set_tx_irq_enable
uart_set_rx_irq_enable
uart_set_idle_irq_enable
uart_set_error_irq_enable