| 1400 | } |
| 1401 | |
| 1402 | uint8_t TwoWire::receive(void) { |
| 1403 | // default to returning null char |
| 1404 | // for people using with char strings |
| 1405 | uint8_t value = 0; |
| 1406 | |
| 1407 | // get each successive byte on each call |
| 1408 | if (rxBufferIndex < rxBufferLength) { |
| 1409 | value = rxBuffer[rxBufferIndex]; |
| 1410 | ++rxBufferIndex; |
| 1411 | } |
| 1412 | |
| 1413 | return value; |
| 1414 | } |
| 1415 | |
| 1416 | uint8_t TwoWire::requestFrom(uint8_t address, int quantity, uint16_t timeout) { |
| 1417 | // clamp to buffer length |