| 112 | } |
| 113 | |
| 114 | bool twi_write_byte(uint8_t byte) |
| 115 | { |
| 116 | for(unsigned bit = 0; bit < 8; bit++) { |
| 117 | twi_write_bit(byte & 0x80); |
| 118 | byte <<= 1; |
| 119 | } |
| 120 | return !twi_read_bit(); //NACK/ACK |
| 121 | } |
| 122 | |
| 123 | uint8_t twi_read_byte(bool nack) |
| 124 | { |
no test coverage detected