File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 71
71
72
72
#elif defined(ARDUINO_ARCH_RP2040)
73
73
74
+ #ifdef WIRE_BUFFER_SIZE
74
75
#define I2C_BUFFER_LENGTH_RX WIRE_BUFFER_SIZE // 128 - defined in Wire.h (provided by pico-arduino-compat)
75
76
#define I2C_BUFFER_LENGTH_TX WIRE_BUFFER_SIZE
77
+ #elif defined(ARDUINO_RASPBERRY_PI_PICO)
78
+
79
+ #define I2C_BUFFER_LENGTH_RX 256 // Not properly defined but set at 256: https://github.com/arduino/ArduinoCore-mbed/blob/master/libraries/Wire/Wire.h
80
+ #define I2C_BUFFER_LENGTH_TX 256
81
+ #else
82
+ #pragma GCC warning "This RP2040 platform doesn't have a wire buffer size defined. Defaulting to 32 bytes. Please contribute to this library!"
83
+
84
+ // Default to safe 32 bytes
85
+ #define I2C_BUFFER_LENGTH_RX 32
86
+ #define I2C_BUFFER_LENGTH_TX 32
87
+ #endif
76
88
77
89
#else
78
90
You can’t perform that action at this time.
0 commit comments