Provides APIs for I2C (Inter Integrated Circuit)
More...
Provides APIs for I2C (Inter Integrated Circuit)
Pointer definition to the internal struct _iotbus_i2c_s.
Definition at line 41 of file iotbus_i2c.h.
Enumeration of I2C frequency mode.
Enumeration Details:
IOTBUS_I2C_STD = 0, < up to 100Khz
IOTBUS_I2C_FAST = 1, < up to 400Khz
IOTBUS_I2C_HIGH = 2, < up to 3.4Mhz
| Enumerator |
|---|
| IOTBUS_I2C_STD |
up to 100Khz
|
| IOTBUS_I2C_FAST |
up to 400Khz
|
| IOTBUS_I2C_HIGH |
up to 3.4Mhz
|
Definition at line 51 of file iotbus_i2c.h.
initializes i2c_context.
- Parameters
-
- Returns
- On success, handle of i2c_context is returned. On failure, NULL is returned.
- Since
- Tizen RT v1.0
reads from i2c device.
- Parameters
-
| [in] | hnd | handle of i2c_context |
| [in] | data | the pointer of data buffer |
| [in] | length | size to read |
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- Tizen RT v1.0
sets the i2c slave address.
- Parameters
-
| [in] | hnd | handle of i2c_context |
| [in] | address | i2c address |
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- Tizen RT v1.0
sets the i2c frequency.
- Parameters
-
| [in] | hnd | handle of i2c_context |
| [in] | mode | i2c frequency mode |
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- Tizen RT v1.0
closes i2c_context.
- Parameters
-
| [in] | hnd | handle of i2c_context |
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- Tizen RT v1.0
writes to i2c device.
- Parameters
-
| [in] | hnd | handle of i2c_context |
| [in] | data | the pointer of data buffer |
| [in] | length | size to write |
- Returns
- On success, size is returned. On failure, a negative value is returned.
- Since
- Tizen RT v1.0