Skip to content

Commit 900b8f9

Browse files
committed
Define BUFFER_LENGTH if not already present
Default buffer size for I2C transmissions is 32 if not otherwise set. This is a band-aid fix since there is almost certainly a more efficient way to handle this, possibly by removing the chunking process entirely from the I2Cdev layer if Wire implements it now based on its own internal buffering (not sure).
1 parent 2e9042c commit 900b8f9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Arduino/I2Cdev/I2Cdev.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ THE SOFTWARE.
8787

8888
#endif
8989

90+
#ifndef BUFFER_LENGTH
91+
// band-aid fix for platforms without Wire-defined BUFFER_LENGTH (removed from some official implementations)
92+
#define BUFFER_LENGTH 32
93+
#endif
94+
9095
/** Default constructor.
9196
*/
9297
I2Cdev::I2Cdev() {

0 commit comments

Comments
 (0)