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

Function twi_stop

Sming/Libraries/I2Cdev/I2Cdev.cpp:1139–1151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1137 }
1138
1139 void twi_stop(void) {
1140 // send stop condition
1141 TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);
1142
1143 // wait for stop condition to be executed on bus
1144 // TWINT is not set after a stop condition!
1145 while (TWCR & _BV(TWSTO)) {
1146 continue;
1147 }
1148
1149 // update twi state
1150 twi_state = TWI_READY;
1151 }
1152
1153 void twi_releaseBus(void) {
1154 // release bus

Callers 1

SIGNALFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected