From 2e90af7ab6fa054a5c0a485624a650e4259fa184 Mon Sep 17 00:00:00 2001 From: Nico Date: Mon, 2 Feb 2015 20:27:17 +0100 Subject: RX and TX Serial buffer sizes can now be defined independently Fixes #2597 --- cores/arduino/USBAPI.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cores/arduino/USBAPI.h') diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index 2fab957..5837b3e 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -59,11 +59,16 @@ extern USBDevice_ USBDevice; struct ring_buffer; +#ifndef SERIAL_BUFFER_SIZE #if (RAMEND < 1000) #define SERIAL_BUFFER_SIZE 16 #else #define SERIAL_BUFFER_SIZE 64 #endif +#endif +#if (SERIAL_BUFFER_SIZE>256) +#error Please lower the CDC Buffer size +#endif class Serial_ : public Stream { -- cgit v1.2.3-18-g5258