Skip to content

Commit a9991f4

Browse files
committed
I2CSlave: fix slave write
1 parent 4e0d872 commit a9991f4

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

libraries/Wire/Wire.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ size_t arduino::MbedI2C::write(const uint8_t* data, int len) {
124124
int arduino::MbedI2C::read() {
125125
int rv = -1;
126126
core_util_critical_section_enter();
127-
128127
if (rxBuffer.available()) {
129128

130129
rv = rxBuffer.read_char();
@@ -159,9 +158,7 @@ void arduino::MbedI2C::receiveThd() {
159158
onRequestCb();
160159
}
161160
if (usedTxBuffer != 0) {
162-
core_util_critical_section_enter();
163161
slave->write((const char *) txBuffer, usedTxBuffer);
164-
core_util_critical_section_exit();
165162
usedTxBuffer = 0;
166163
}
167164
//slave->stop();

0 commit comments

Comments
 (0)