Functions to read data from an I2C device.
|
bool8_t | I2CRead (LibTiePieHandle_t hDevice, uint16_t wAddress, void *pBuffer, uint32_t dwSize, bool8_t bStop) |
| Read data from a specified address on the I2C bus, using a specified I2C host. More...
|
|
bool8_t | I2CReadByte (LibTiePieHandle_t hDevice, uint16_t wAddress, uint8_t *pValue) |
| Read one byte from a specified address on the I2C bus, using a specified I2C host. More...
|
|
bool8_t | I2CReadWord (LibTiePieHandle_t hDevice, uint16_t wAddress, uint16_t *pValue) |
| Read one word from a specified address on the I2C bus, using a specified I2C host. More...
|
|
Read data from a specified address on the I2C bus, using a specified I2C host.
- Parameters
-
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to read from. |
[out] | pBuffer | A pointer to the read buffer. |
[in] | dwSize | The number of bytes to read. |
[in] | bStop | Indicates whether an I2C stop is generated after the transaction, when BOOL8_TRUE, an I2C stop is generated, when BOOL8_FALSE not. |
- Returns
- BOOL8_TRUE if successful, BOOL8_FALSE otherwise.
- Status values
-
- See also
- I2CReadByte
-
I2CReadWord
- Since
- 0.4.0
Read one byte from a specified address on the I2C bus, using a specified I2C host.
An I2C stop is generated after the transaction.
- Parameters
-
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to read from. |
[out] | pValue | A pointer to the read buffer. |
- Returns
- BOOL8_TRUE if successful, BOOL8_FALSE otherwise.
- Status values
-
- See also
- I2CRead
-
I2CReadWord
- Since
- 0.4.0
Read one word from a specified address on the I2C bus, using a specified I2C host.
An I2C stop is generated after the transaction.
- Parameters
-
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to read from. |
[out] | pValue | A pointer to the read buffer. |
- Returns
- BOOL8_TRUE if successful, BOOL8_FALSE otherwise.
- Note
- Bus data is regarded big endian and converted to host endianess.
- Status values
-
- See also
- I2CRead
-
I2CReadByte
- Since
- 0.4.0