freemodbus: fix long buffer failure
check master read write functions with array of registers) fix master serial processing code and modbus controller to work with register array modbus_master: add reading and writing of test value array (58 registers) to check failure is gone remove parameter temporary buffer from modbus controller to allow more than 24 byte writes driver: fix issue with TOUT feature driver: fix uart_rx_timeout issue driver: fix issue with rxfifo_tout_int_raw not triggered when received fifo_len = 120 byte and all bytes read out of fifo as result of rxfifo_full_int_raw driver: add function uart_internal_set_always_rx_timeout() to always handle tout interrupt examples: call uart_internal_set_always_rx_timeout() to handle tout interrupt correctly examples: update examples to use tout feature driver: reflect changes of uart_set_always_rx_timeout() function, change uart.c driver: change conditions to trigger workaround for tout feature in uart.c driver: change uart_set_always_rx_timeout() freemodbus: fix tabs, remove commented code driver: remove uart_ll_is_rx_idle()
This commit is contained in:
committed by
Michael (XIAO Xufeng)
parent
135aa51d06
commit
3abdd2207d
@@ -70,6 +70,8 @@ typedef enum {
|
||||
typedef struct {
|
||||
uart_event_type_t type; /*!< UART event type */
|
||||
size_t size; /*!< UART data size for UART_DATA event*/
|
||||
bool timeout_flag; /*!< UART data read timeout flag for UART_DATA event (no new data received during configured RX TOUT)*/
|
||||
/*!< If the event is caused by FIFO-full interrupt, then there will be no event with the timeout flag before the next byte coming.*/
|
||||
} uart_event_t;
|
||||
|
||||
typedef intr_handle_t uart_isr_handle_t;
|
||||
@@ -845,6 +847,21 @@ esp_err_t uart_wait_tx_idle_polling(uart_port_t uart_num);
|
||||
*/
|
||||
esp_err_t uart_set_loop_back(uart_port_t uart_num, bool loop_back_en);
|
||||
|
||||
/**
|
||||
* @brief Configure behavior of UART RX timeout interrupt.
|
||||
*
|
||||
* When always_rx_timeout is true, timeout interrupt is triggered even if FIFO is full.
|
||||
* This function can cause extra timeout interrupts triggered only to send the timeout event.
|
||||
* Call this function only if you want to ensure timeout interrupt will always happen after a byte stream.
|
||||
*
|
||||
* @param uart_num UART number
|
||||
* @param always_rx_timeout_en Set to false enable the default behavior of timeout interrupt,
|
||||
* set it to true to always trigger timeout interrupt.
|
||||
*
|
||||
* * @return None
|
||||
*/
|
||||
void uart_set_always_rx_timeout(uart_port_t uart_num, bool always_rx_timeout_en);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user