8000 Serial attach interrupt by gicking · Pull Request #95 · arduino/ArduinoCore-sam · GitHub
[go: up one dir, main page]

Skip to content

Serial attach interrupt #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
activate custom send_ISR also for 1B write
- activate custom send_ISR also for 1B write
- previous solution only worked for >=2B writes
  • Loading branch information
gicking committed Nov 24, 2019
commit 1557f9c6bf5e860af1b4ca29ad4aa73b49802f23
7 changes: 7 additions & 0 deletions cores/arduino/UARTClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ size_t UARTClass::write( const uint8_t uc_data )
{
// Bypass buffering and send character directly
_pUart->UART_THR = uc_data;

// if custom routine attached, activate TXBUFE interrupt -> delay call until transmission finished
// must be done here explicitely because UART_TXRDY interrupt is not activated here
if (_isrTx != NULL) {
_pUart->UART_IER = UART_IER_TXEMPTY;
}
}

return 1;
}

Expand Down
0