| 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 |
no outgoing calls
no test coverage detected