MCPcopy Create free account
hub / github.com/SlimeVR/SlimeVR-Tracker-ESP / twi_write00

Function twi_write00

lib/i2cdev/I2Cdev.cpp:1086–1101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1084
1085
1086 void twi_write00() {
1087 if (TWI_READY != twi_state) return; // blocking test
1088 if (TWI_BUFFER_LENGTH < ptwv -> length) {
1089 twi_Finish(1); // end write with error 1
1090 return;
1091 }
1092 twi_Done = 0x00; // show as working
1093 twii_SetState(TWI_MTX); // to transmitting
1094 twii_SetError(0xFF); // to No Error
1095 twii_InitBuffer(0, ptwv -> length); // pointer and length
1096 twii_CopyToBuf(ptwv -> data, ptwv -> length); // get the data
1097 twii_SetSlaRW((ptwv -> address << 1) | TW_WRITE); // write command
1098 twii_SetStart(); // start the cycle
1099 fNextInterruptFunction = twi_write01; // next routine
1100 return twi_write01();
1101 }
1102
1103 void twi_writeTo(uint8_t address, uint8_t* data, uint8_t length, uint8_t wait) {
1104 uint8_t i;

Callers 1

twi_writeToFunction · 0.85

Calls 8

twi_FinishFunction · 0.85
twii_SetStateFunction · 0.85
twii_SetErrorFunction · 0.85
twii_InitBufferFunction · 0.85
twii_CopyToBufFunction · 0.85
twii_SetSlaRWFunction · 0.85
twii_SetStartFunction · 0.85
twi_write01Function · 0.85

Tested by

no test coverage detected