From f991f69eba64c32ff7754be9b9ea904d3e35f58a Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Sat, 27 Nov 2021 08:58:22 -0500 Subject: [PATCH] Allow configuring Wire.h buffer size This is needed since in some applications, we need much much larger buffers. See https://github.com/flaviut/emporia-vue2-reversing/issues/1#issuecomment-978174665 --- libraries/Wire/Wire.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/Wire/Wire.h b/libraries/Wire/Wire.h index 5d6b36457e..ff5abd31cb 100644 --- a/libraries/Wire/Wire.h +++ b/libraries/Wire/Wire.h @@ -28,8 +28,11 @@ #include "Stream.h" - +#ifndef ARDUINO_WIRE_BUFFER_LENGTH #define BUFFER_LENGTH 128 +#else +#define BUFFER_LENGTH ARDUINO_WIRE_BUFFER_LENGTH +#endif class TwoWire : public Stream {