Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2878c5a

Browse files
committed
Use member variable in ISR instead of static veriable
1 parent e975966 commit 2878c5a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎cores/arduino/Serial.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ void UART::WrapperCallback(uart_callback_args_t *p_args) {
6262
case UART_EVENT_TX_DATA_EMPTY:
6363
{
6464
if(uart_ptr->txBuffer.available()){
65-
static char txc;
66-
txc = uart_ptr->txBuffer.read_char();
67-
R_SCI_UART_Write(&(uart_ptr->uart_ctrl), (uint8_t*)&txc , 1);
65+
uart_ptr->txc = uart_ptr->txBuffer.read_char();
66+
R_SCI_UART_Write(&(uart_ptr->uart_ctrl), (uint8_t*)&(uart_ptr->txc) , 1);
6867
} else {
6968
uart_ptr->tx_done = true;
7069
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /