MCPcopy Create free account
hub / github.com/SmingHub/Sming / send

Method send

Sming/Libraries/I2Cdev/I2Cdev.cpp:1381–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1379 }
1380
1381 void TwoWire::send(uint8_t data) {
1382 if (twi_transmitting) {
1383 // in master transmitter mode
1384 // don't bother if buffer is full
1385 if (txBufferLength >= NBWIRE_BUFFER_LENGTH) {
1386 return;
1387 }
1388
1389 // put byte in tx buffer
1390 txBuffer[txBufferIndex] = data;
1391 ++txBufferIndex;
1392
1393 // update amount in buffer
1394 txBufferLength = txBufferIndex;
1395 } else {
1396 // in slave send mode
1397 // reply to master
1398 //twi_transmit(&data, 1);
1399 }
1400 }
1401
1402 uint8_t TwoWire::receive(void) {
1403 // default to returning null char

Callers 4

readBytesMethod · 0.45
readWordsMethod · 0.45
writeBytesMethod · 0.45
writeWordsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected