File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 11SAMD CORE 1.6.8
22
33* Fixed regression on analogWrite. Thanks @bose-mdellisanti!
4+ * Fixed regression on SerialUSB.available()
45
56SAMD CORE 1.6.7 2016.09.28
67
Original file line number Diff line number Diff line change @@ -350,7 +350,19 @@ class DoubleBufferedEPOutHandler : public EPHandler {
350350
351351 // Returns how many bytes are stored in the buffers
352352 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+ }
354366 }
355367
356368 void release () {
You can’t perform that action at this time.
0 commit comments