Eeprom24C32_64 icon indicating copy to clipboard operation
Eeprom24C32_64 copied to clipboard

BUFFER_LENGTH not always defined in Wire library

Open gpb01 opened this issue 3 years ago • 0 comments

On some "cores" BUFFER_LENGTH is not defined in Wire library (e.g. Seeedstudio "core" for XIAO with SAM D21) so the compilation fails.

I suggest this simple change in the .cpp file (starting line 52):

#ifndef BUFFER_LENGTH
#define BUFFER_LENGTH   32
#endif

#define EEPROM__RD_BUFFER_SIZE    BUFFER_LENGTH

This way, if you have a "core" that doesn't define BUFFER_LENGTH, a default value of 32 is taken and no error is produced.

Guglielmo Braguglia

gpb01 avatar Jan 02 '22 10:01 gpb01