Function rc_i2c_write_word#
Defined in File i2c.h
Function Documentation#
-
int rc_i2c_write_word(int bus, uint8_t regAddr, uint16_t data)#
Writes a single word (16 bits) 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 to write to
data – [in] 16-bit word to be written
- Returns:
0 on success or -1 on failure