We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 376aabf commit e38653aCopy full SHA for e38653a
libraries/Wire/Wire.cpp
@@ -170,10 +170,10 @@ void arduino::MbedI2C::receiveThd() {
170
break;
171
case mbed::I2CSlave::WriteGeneral:
172
case mbed::I2CSlave::WriteAddressed:
173
- core_util_critical_section_enter();
174
- rxBuffer.clear();
175
char buf[240];
176
c = slave->read(buf, sizeof(buf));
+ core_util_critical_section_enter();
+ rxBuffer.clear();
177
for (buf_idx = 0; buf_idx < c; buf_idx++) {
178
if (rxBuffer.availableForStore()) {
179
rxBuffer.store_char(uint8_t(buf[buf_idx]));
0 commit comments