An i2c context represents a master on an i2c bus and that context can communicate to multiple i2c slaves by configuring the address. It is considered best practice to make sure the address is correct before doing any calls on i2c, in case another application or even thread changed the addres on that bus. Multiple instances of the same bus can exist.
Go to the source code of this file.
Initialise i2c context, using board defintions
Initialise i2c context, passing in the i2c bus to use.
Sets the frequency of the i2c context. Most platforms do not support this.
Simple bulk read from an i2c context
Simple read for a single byte from the i2c context
Read a single byte from i2c context, from designated register
Read a single word from i2c context, from designated register
Bulk read from i2c context, starting from designated register
Write length bytes to the bus, the first byte in the array is the command/register to write
Write a single byte to an i2c context
Write a single byte to an i2c context
Write a single word to an i2c context
Sets the i2c slave address.
De-inits an mraa_i2c_context device
Opaque pointer definition to the internal struct _i2c