LibTiePie  0.4.5
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Modules Pages
Reading data

Description

Functions

bool8_t I2CRead (TpDeviceHandle_t hDevice, uint16_t wAddress, void *pBuffer, uint32_t dwSize, bool8_t bStop)
 Read data from the I2C bus. More...
 
bool8_t I2CReadByte (TpDeviceHandle_t hDevice, uint16_t wAddress, uint8_t *pValue)
 Read one byte from the I2C bus. More...
 
bool8_t I2CReadWord (TpDeviceHandle_t hDevice, uint16_t wAddress, uint16_t *pValue)
 Read one word from the I2C bus. More...
 

Function Documentation

bool8_t I2CRead ( TpDeviceHandle_t  hDevice,
uint16_t  wAddress,
void *  pBuffer,
uint32_t  dwSize,
bool8_t  bStop 
)

Read data from the I2C bus.

Parameters
hDeviceA device handle.
wAddressAn I2C device address.
pBufferPointer to buffer for read data.
dwSizeBuffer size in bytes.
bStopIf BOOL8_TRUE an I2C stop is generated after the transaction, if BOOL8_FALSE no I2C stop is generated after the transaction.
Returns
BOOL8_TRUE if successful, BOOL8_FALSE otherwise.
Since
0.4.0
bool8_t I2CReadByte ( TpDeviceHandle_t  hDevice,
uint16_t  wAddress,
uint8_t *  pValue 
)

Read one byte from the I2C bus.

Parameters
hDeviceA device handle.
wAddressAn I2C device address.
pValuePointer to buffer for read data.
Returns
BOOL8_TRUE if successful, BOOL8_FALSE otherwise.
Since
0.4.0
bool8_t I2CReadWord ( TpDeviceHandle_t  hDevice,
uint16_t  wAddress,
uint16_t *  pValue 
)

Read one word from the I2C bus.

Parameters
hDeviceA device handle.
wAddressAn I2C device address.
pValuePointer to buffer for read data.
Returns
BOOL8_TRUE if successful, BOOL8_FALSE otherwise.
Since
0.4.0