Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: targets/TARGET_NORDIC/TARGET_NRF5/serial_api.c
- Revision:
- 162:e13f6fdb2ac4
- Parent:
- 150:02e0a0aed4ec
- Child:
- 165:e614a9f1c9e2
--- a/targets/TARGET_NORDIC/TARGET_NRF5/serial_api.c Thu Mar 30 13:45:57 2017 +0100 +++ b/targets/TARGET_NORDIC/TARGET_NRF5/serial_api.c Wed Apr 12 16:21:43 2017 +0100 @@ -199,12 +199,13 @@ #if DEVICE_SERIAL_ASYNCH if (UART_CB.tx_active) { - if (++UART_CB.tx_pos <= UART_CB.tx_length) { + if (UART_CB.tx_pos < UART_CB.tx_length) { // When there is still something to send, clear the TXDRDY event // and put next byte to transmitter. nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_TXDRDY); nrf_uart_txd_set(UART_INSTANCE, UART_CB.tx_buffer[UART_CB.tx_pos]); + UART_CB.tx_pos++; } else { // When the TXDRDY event is set after the last byte to be sent