Private
Public Access
2
0

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:
Anton Krasovsky
2014-10-30 23:25:10 +00:00
committed by Thomas Ingleby
parent c852685975
commit cbf4c7447f
3 changed files with 28 additions and 0 deletions

View File

@@ -101,6 +101,13 @@ mraa_i2c_read_byte(mraa_i2c_context dev)
return byte;
}
uint8_t
mraa_i2c_read_byte_data(mraa_i2c_context dev, uint8_t command)
{
uint8_t byte = i2c_smbus_read_byte_data(dev->fh, command);
return byte;
}
mraa_result_t
mraa_i2c_write(mraa_i2c_context dev, const uint8_t* data, int length)
{