Skip to content

Commit

Permalink
Use member variable in ISR instead of static veriable
Browse files Browse the repository at this point in the history
  • Loading branch information
delta-G committed Jun 30, 2024
1 parent 9b439c5 commit a6ec0b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cores/arduino/Serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ void UART::WrapperCallback(uart_callback_args_t *p_args) {
case UART_EVENT_TX_DATA_EMPTY:
{
if(uart_ptr->txBuffer.available()){
static char txc;
txc = uart_ptr->txBuffer.read_char();
R_SCI_UART_Write(&(uart_ptr->uart_ctrl), (uint8_t*)&txc , 1);
uart_ptr->txc = uart_ptr->txBuffer.read_char();
R_SCI_UART_Write(&(uart_ptr->uart_ctrl), (uint8_t*)&(uart_ptr->txc) , 1);
} else {
uart_ptr->tx_done = true;
}
Expand Down

0 comments on commit a6ec0b8

Please sign in to comment.