Merge branch 'bugfix/uart_tx_buffer_blocked' into 'master'
Fix uart tx function block issue To enable tx empty interrupt each time the tx ringbuffer get filled, so that tx function will not block if tx data length is larger than tx ringbuffer size. Reported from customer of Audio team. See merge request !658
This commit is contained in:
commit
3cd6d4e5fc
1 changed files with 1 additions and 1 deletions
|
@ -806,9 +806,9 @@ static int uart_tx_all(uart_port_t uart_num, const char* src, size_t size, bool
|
||||||
xRingbufferSend(p_uart_obj[uart_num]->tx_ring_buf, (void*) (src + offset), send_size, portMAX_DELAY);
|
xRingbufferSend(p_uart_obj[uart_num]->tx_ring_buf, (void*) (src + offset), send_size, portMAX_DELAY);
|
||||||
size -= send_size;
|
size -= send_size;
|
||||||
offset += send_size;
|
offset += send_size;
|
||||||
|
uart_enable_tx_intr(uart_num, 1, UART_EMPTY_THRESH_DEFAULT);
|
||||||
}
|
}
|
||||||
xSemaphoreGive(p_uart_obj[uart_num]->tx_mux);
|
xSemaphoreGive(p_uart_obj[uart_num]->tx_mux);
|
||||||
uart_enable_tx_intr(uart_num, 1, UART_EMPTY_THRESH_DEFAULT);
|
|
||||||
} else {
|
} else {
|
||||||
while(size) {
|
while(size) {
|
||||||
//semaphore for tx_fifo available
|
//semaphore for tx_fifo available
|
||||||
|
|
Loading…
Reference in a new issue