Skip to content

Commit 05ef859

Browse files
committed
Fix weaked serialEventRun() not being called
Fixes #985 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent f6f02c6 commit 05ef859

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

cores/arduino/WSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "WSerial.h"
22

3-
void serialEventRun(void)
3+
WEAK void serialEventRun(void)
44
{
55
#if defined(HAVE_HWSERIAL1)
66
if (serialEvent1 && Serial1.available()) {

cores/arduino/WSerial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ extern void serialEvent10(void) __attribute__((weak));
165165
extern void serialEventLP1(void) __attribute__((weak));
166166
#endif /* HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY */
167167

168-
extern void serialEventRun(void) __attribute__((weak));
168+
extern void serialEventRun(void);
169169

170170
#endif /* WIRING_SERIAL_H */

cores/arduino/main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ int main(void)
6262
CoreCallback();
6363
#endif
6464
loop();
65-
if (serialEventRun) {
66-
serialEventRun();
67-
}
65+
serialEventRun();
6866
}
6967

7068
return 0;

0 commit comments

Comments
 (0)