Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f33b0ee

Browse filesBrowse files
authored
Merge pull request #1032 from pennam/i2c-slave-fix
Wire: I2C slave, exit critical section before calling onReceiveCb()
2 parents befeca3 + 13a142b commit f33b0ee
Copy full SHA for f33b0ee

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎libraries/Wire/Wire.cpp

Copy file name to clipboardExpand all lines: libraries/Wire/Wire.cpp
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ void arduino::MbedI2C::receiveThd() {
179179
break;
180180
}
181181
}
182-
if (rxBuffer.available() > 0 && onReceiveCb != NULL) {
183-
onReceiveCb(rxBuffer.available());
184-
}
185182
core_util_critical_section_exit();
183+
if (available() > 0 && onReceiveCb != NULL) {
184+
onReceiveCb(available());
185+
}
186186
//slave->stop();
187187
break;
188188
case mbed::I2CSlave::NoData:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.