| 65 | } |
| 66 | |
| 67 | bool twi_write_stop(void) |
| 68 | { |
| 69 | SCL_LOW(); |
| 70 | SDA_LOW(); |
| 71 | twi_delay(twi_dcount); |
| 72 | SCL_HIGH(); |
| 73 | for(unsigned i = 0; SCL_READ() == 0 && i++ < twi_clockStretchLimit;) { |
| 74 | // Clock stretching |
| 75 | } |
| 76 | twi_delay(twi_dcount); |
| 77 | SDA_HIGH(); |
| 78 | twi_delay(twi_dcount); |
| 79 | |
| 80 | return true; |
| 81 | } |
| 82 | |
| 83 | bool twi_write_bit(bool bit) |
| 84 | { |
no test coverage detected