Skip to content

Commit 63a118d

Browse files
committed
try to make good to use master and slave on the same board
1 parent 4160744 commit 63a118d

File tree

1 file changed

+5
-5
lines changed
  • arduino/sketchbook/hardware/Microduino/avr/libraries/Wire/src

1 file changed

+5
-5
lines changed

arduino/sketchbook/hardware/Microduino/avr/libraries/Wire/src/Wire.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ void TwoWire::onReceiveService(uint8_t* inBytes, int numBytes)
282282
// don't bother if rx buffer is in use by a master requestFrom() op
283283
// i know this drops data, but it allows for slight stupidity
284284
// meaning, they may not have read all the master requestFrom() data yet
285-
if(rxBufferIndex < rxBufferLength){
286-
return;
287-
}
285+
//if(rxBufferIndex < rxBufferLength){
286+
// return;
287+
//}
288288
// copy twi rx buffer into local read buffer
289289
// this enables new reads to happen in parallel
290290
for(uint8_t i = 0; i < numBytes; ++i){
@@ -306,8 +306,8 @@ void TwoWire::onRequestService(void)
306306
}
307307
// reset tx buffer iterator vars
308308
// !!! this will kill any pending pre-master sendTo() activity
309-
txBufferIndex = 0;
310-
txBufferLength = 0;
309+
//txBufferIndex = 0;
310+
//txBufferLength = 0;
311311
// alert user program
312312
user_onRequest();
313313
}

0 commit comments

Comments
 (0)