Skip to content

Commit 55ae3be

Browse files
committed
Fixed setRxInterrupt in HardwareSerial.cpp and fixed double deletion of the interrupt_info struct
1 parent 21043d5 commit 55ae3be

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cores/esp32/HardwareSerial.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,7 @@ void HardwareSerial::updateBaudRate(unsigned long baud)
8787
void HardwareSerial::setRxInterrupt(void (*arg)(uint8_t, void*), void* user_arg){
8888

8989
// Make sure that the previous interrupt_info is not used anymore
90-
uartDisableInterrupt(_uart);
91-
92-
if(interrupt_info)
93-
delete(interrupt_info);
94-
90+
uartDisableRxInterrupt(_uart);
9591
uartEnableRxInterrupt(_uart, &interrupt_info, arg, user_arg);
9692
}
9793

0 commit comments

Comments
 (0)