From 872c88bb5f643702edcc8d0ebfc1f6cd13bcf414 Mon Sep 17 00:00:00 2001 From: Justin Rajewski Date: Tue, 18 Mar 2014 14:15:41 -0700 Subject: improved USB write speeds --- cores/arduino/USBAPI.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cores/arduino/USBAPI.h') diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index 7a14285..1c5ecf0 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -40,6 +40,7 @@ public: virtual int read(void); virtual void flush(void); virtual size_t write(uint8_t); + virtual size_t write(const uint8_t*, size_t); using Print::write; // pull in write(str) and write(buf, size) from Print operator bool(); }; -- cgit v1.2.3-18-g5258 From 5962f155f70a5c67d14280d1b178f5197fb00df4 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Fri, 21 Mar 2014 18:43:19 +0000 Subject: 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 --- cores/arduino/USBAPI.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cores/arduino/USBAPI.h') 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); -- cgit v1.2.3-18-g5258