diff options
author | Nico <NicoHood@users.noreply.github.com> | 2015-02-02 20:27:17 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-05-12 15:09:48 +0200 |
commit | 2e90af7ab6fa054a5c0a485624a650e4259fa184 (patch) | |
tree | 2bfec497909d060386928094abaee9cd8ce1c758 /cores/arduino/USBAPI.h | |
parent | b682456e8e74dbbccb3e709b7838a8475902c00c (diff) |
RX and TX Serial buffer sizes can now be defined independently
Fixes #2597
Diffstat (limited to 'cores/arduino/USBAPI.h')
-rw-r--r-- | cores/arduino/USBAPI.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 { |