Skip to content

Commit 18efa35

Browse files
committed
Use __disable_irq() and __enable_irq(), to make it clear code is not portable
1 parent 7ea1a73 commit 18efa35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/USB/CDC.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,15 @@ int32_t Serial_::readBreak() {
303303
// disable interrupts,
304304
// to avoid clearing a breakValue that might occur
305305
// while processing the current break value
306-
noInterrupts();
306+
__disable_irq();
307307

308308
int32_t ret = breakValue;
309309

310310
breakValue = -1;
311311

312312
if (enableInterrupts) {
313313
// re-enable the interrupts
314-
interrupts();
314+
__enable_irq();
315315
}
316316

317317
return ret;

0 commit comments

Comments
 (0)