This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_i2c_read_bytes

Function Documentation

int rc_i2c_read_bytes(int bus, uint8_t regAddr, size_t count, uint8_t *data)

Reads multiple bytes from a device register.

        This sends the device address and register address to be read
        from before reading the response, works for most i2c devices.

Parameters
  • bus[in] The bus

  • regAddr[in] The register address

  • count[in] number of bytes to read

  • data[out] The data pointer to write response to.

Returns

returns number of bytes read or -1 on failure