i2c: add api call to read byte from a specified register
Signed-off-by: Anton Krasovsky <anton@no-mad.net> Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
committed by
Thomas Ingleby
parent
c852685975
commit
cbf4c7447f
@@ -95,6 +95,15 @@ int mraa_i2c_read(mraa_i2c_context dev, uint8_t *data, int length);
|
||||
*/
|
||||
uint8_t mraa_i2c_read_byte(mraa_i2c_context dev);
|
||||
|
||||
/**
|
||||
* Read a single byte from i2c context, from designated register
|
||||
*
|
||||
* @param dev The i2c context
|
||||
* @param command The register
|
||||
* @return The result of the read or -1 if failed
|
||||
*/
|
||||
uint8_t mraa_i2c_read_byte_data(mraa_i2c_context dev, uint8_t command);
|
||||
|
||||
/**
|
||||
* Write to an i2c context
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user