8000
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 d619bf0 commit ecaa2bdCopy full SHA for ecaa2bd
cores/rp2040/SerialUART.cpp
@@ -289,13 +289,22 @@ int SerialUART::read() {
289
}
290
291
bool SerialUART::overflow() {
292
- CoreMutex m(&_mutex);
293
- if (!_running || !m) {
+ if (!_running) {
294
return false;
295
296
- bool hold = _overflow;
+
+ if (_polling) {
297
+ _handleIRQ(false);
298
+ } else {
299
+ _pumpFIFO();
300
+ }
301
302
+ mutex_enter_blocking(&_fifoMutex);
303
+ bool ovf = _overflow;
304
_overflow = false;
- return hold;
305
+ mutex_exit(&_fifoMutex);
306
307
+ return ovf;
308
309
310
int SerialUART::available() {
0 commit comments