Function rc_i2c_write_words#
Defined in File i2c.h
Function Documentation#
-
int rc_i2c_write_words(int bus, uint8_t regAddr, size_t count, uint16_t *data)#
Writes multiple words (16 bits each) to a specified register address.
This sends the device address and register address followed by the actual data to be written. Works for most i2c devices.
- Parameters:
bus – [in] The bus
regAddr – [in] The register address
count – [in] Number of 16-bit words to write, NOT number of bytes
data – [in] The data
- Returns:
0 on success or -1 on failure