Thanks to visit codestin.com Credit goes to github.com
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.
2 parents 376aabf + e38653a commit 142f272Copy full SHA for 142f272
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