File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
SAMD CORE 1.6.8
2
2
3
3
* Fixed regression on analogWrite. Thanks @bose-mdellisanti!
4
+ * Fixed regression on SerialUSB.available()
4
5
5
6
SAMD CORE 1.6.7 2016.09.28
6
7
Original file line number Diff line number Diff line change @@ -350,7 +350,19 @@ class DoubleBufferedEPOutHandler : public EPHandler {
350
350
351
351
// Returns how many bytes are stored in the buffers
352
352
virtual uint32_t available () const {
353
- return (last0 - first0) + (last1 - first1);
353
+ if (current == 0 ) {
354
+ bool ready = false ;
355
+ synchronized {
356
+ ready = ready0;
357
+ }
358
+ return ready ? (last0 - first0) : 0 ;
359
+ } else {
360
+ bool ready = false ;
361
+ synchronized {
362
+ ready = ready1;
363
+ }
364
+ return ready ? (last1 - first1) : 0 ;
365
+ }
354
366
}
355
367
356
368
void release () {
You can’t perform that action at this time.
0 commit comments