Skip to content

Commit 96fa55f

Browse files
committed
Should fix compilation error
1 parent 8db7e7f commit 96fa55f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cores/esp32/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void HardwareSerial::updateBaudRate(unsigned long baud)
8686
// Make sure that the function that the function pointer is pointing to is inside IRAM
8787
void HardwareSerial::setRXInterrupt(void (*arg)(char c)){
8888
uartDisableInterrupt(_uart);
89-
uartEnableInterrupt(_uart, &arg);
89+
uartEnableInterrupt(_uart, arg);
9090
}
9191

9292
void HardwareSerial::end()

cores/esp32/esp32-hal-uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static void IRAM_ATTR _uart_isr(void (*arg)(char))
8787
c = uart->dev->fifo.rw_byte;
8888
if(arg != NULL){ // Check if an interrupt handler function has been specified
8989
// Fully optimized code would not create the queue anymore if an function has been specified as an argument.
90-
(*arg)((char*)&c); // There is, call it with c as an parameter. Don't pass it to the queue anymore
90+
(*arg)((char)c);
9191
}else if(uart->queue != NULL) {
9292
xQueueSendFromISR(uart->queue, &c, &xHigherPriorityTaskWoken);
9393
}

0 commit comments

Comments
 (0)