Skip to content

Commit

Permalink
Added BUFFER_LENGTH macro in Wire.h
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRaf974 committed Jan 22, 2023
1 parent 8983308 commit 847a471
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/Wire/Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "variant.h"
#include "SERCOM.h"

#define BUFFER_LENGTH 256

// WIRE_HAS_END means Wire has end()
#define WIRE_HAS_END 1

Expand Down Expand Up @@ -74,10 +76,10 @@ class TwoWire : public HardwareI2C
bool transmissionBegun;

// RX Buffer
arduino::RingBufferN<256> rxBuffer;
arduino::RingBufferN<BUFFER_LENGTH> rxBuffer;

//TX buffer
arduino::RingBufferN<256> txBuffer;
arduino::RingBufferN<BUFFER_LENGTH> txBuffer;
uint8_t txAddress;

// Callback user functions
Expand Down

0 comments on commit 847a471

Please sign in to comment.