We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b14299 commit 1557f9cCopy full SHA for 1557f9c
cores/arduino/UARTClass.cpp
@@ -168,7 +168,14 @@ size_t UARTClass::write( const uint8_t uc_data )
168
{
169
// Bypass buffering and send character directly
170
_pUart->UART_THR = uc_data;
171
+
172
+ // if custom routine attached, activate TXBUFE interrupt -> delay call until transmission finished
173
+ // must be done here explicitely because UART_TXRDY interrupt is not activated here
174
+ if (_isrTx != NULL) {
175
+ _pUart->UART_IER = UART_IER_TXEMPTY;
176
+ }
177
}
178
179
return 1;
180
181
0 commit comments