-
Notifications
You must be signed in to change notification settings - Fork 114
i2cwrite
Ken Sharp edited this page Dec 8, 2023
·
1 revision
Write data to the specified I2C bus.
I2cWrite(unsigned char channel, unsigned char slaveAddress, unsigned char eofConfig, unsigned char numBytes, unsigned char* sendBuffer);
channel
The I2C master channel to open.
slaveAddress
The 7-bit slave address of the I2C device to write to. The R/W bit will be set automatically.
eofConfig
End of frame configuration:
- 0 - EOF_STOP - Stop
- 1 - EOF_RESTART - Stop and restart
- 2 - EOF_RESTART_NOSTOP - Restart with no stop
- 3 - EOF_NOSTOP - No stop
numBytes
The number of bytes to write to the I2C channel.
sendBuffer
A pointer to the first element in a byte array which contains the data to write to the I2C bus.
int status