Skip to content

Commit 7ea1a73

Browse files
committed
Only check bit 0 of __get_PRIMASK() value
1 parent 72ea3cf commit 7ea1a73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/USB/CDC.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Serial_::operator bool()
298298
}
299299

300300
int32_t Serial_::readBreak() {
301-
uint8_t enableInterrupts = (__get_PRIMASK() == 0);
301+
uint8_t enableInterrupts = ((__get_PRIMASK() & 0x1) == 0);
302302

303303
// disable interrupts,
304304
// to avoid clearing a breakValue that might occur

0 commit comments

Comments
 (0)