We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 405ab0c + 5c4c6ac commit 91ecc52Copy full SHA for 91ecc52
targets/TARGET_NORDIC/TARGET_NRF5/serial_api.c
@@ -199,12 +199,13 @@ void UART_IRQ_HANDLER(void)
199
200
#if DEVICE_SERIAL_ASYNCH
201
if (UART_CB.tx_active) {
202
- if (++UART_CB.tx_pos <= UART_CB.tx_length) {
+ if (UART_CB.tx_pos < UART_CB.tx_length) {
203
// When there is still something to send, clear the TXDRDY event
204
// and put next byte to transmitter.
205
nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_TXDRDY);
206
nrf_uart_txd_set(UART_INSTANCE,
207
UART_CB.tx_buffer[UART_CB.tx_pos]);
208
+ UART_CB.tx_pos++;
209
}
210
else {
211
// When the TXDRDY event is set after the last byte to be sent
0 commit comments