diff options
author | Paul Brook <paul@nowt.org> | 2014-03-21 18:43:19 +0000 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2014-05-24 00:34:56 +0200 |
commit | 5962f155f70a5c67d14280d1b178f5197fb00df4 (patch) | |
tree | e694f5cda26d5c3bb9b090c1b896020bcf3c43ff /cores/arduino/USBAPI.h | |
parent | b57b2ae3c163a855efca331bf817d566e328f88b (diff) |
Improve CDC read code
Read CDC data from USB FIFO on demand instead of in ISR.
Remove superfluous ring buffer.
Signed-off-by: Paul Brook <paul@nowt.org>
Diffstat (limited to 'cores/arduino/USBAPI.h')
-rw-r--r-- | cores/arduino/USBAPI.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index 1c5ecf0..d506b58 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -28,14 +28,13 @@ extern USBDevice_ USBDevice; class Serial_ : public Stream { private: - ring_buffer *_cdc_rx_buffer; + int peek_buffer; public: void begin(unsigned long); void begin(unsigned long, uint8_t); void end(void); virtual int available(void); - virtual void accept(void); virtual int peek(void); virtual int read(void); virtual void flush(void); |