We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de1429b commit d848264Copy full SHA for d848264
cores/arduino/USB/CDC.cpp
@@ -298,17 +298,17 @@ Serial_::operator bool()
298
}
299
300
int32_t Serial_::readBreak() {
301
- // disable the USB interrupt,
+ // disable interrupts,
302
// to avoid clearing a breakValue that might occur
303
// while processing the current break value
304
- NVIC_DisableIRQ((IRQn_Type) USB_IRQn);
+ noInterrupts();
305
306
int32_t ret = breakValue;
307
308
breakValue = -1;
309
310
- // re-enable the USB interupt
311
- NVIC_EnableIRQ((IRQn_Type) USB_IRQn);
+ // re-enable the interrupts
+ interrupts();
312
313
return ret;
314
0 commit comments