How can I...
59
Read data from the I
2
C bus
Two routines are available to read data from the I
2
C bus.
word I2CRead( dword dwAddress, void * pBuf, dword dwSize )
Description:
This routine reads the data from a specified address on the I
2
C
bus and places it in the memory where pBuf points to.
When the data is read, a stop command is sent to the I
2
C bus.
Input:
dwAddress
the address of the device the data is read from
*pBuf
pointer to the begin of memory location where
the read data will be placed.
dwSize
the size of the buffer in bytes
Output:
return value
E_NO_ERRORS
E_NO_HARDWARE
E_NOT_SUPPORTED
E_I2C_ERROR
E_I2C_INVALID_ADDRESS
E_I2C_INVALID_SIZE
E_I2C_NO_ACKNOWLEDGE
word I2CReadNoStop( dword dwAddress, void * pBuf, dword dwSize )
Description:
This routine reads the data from a specified address on the I
2
C
bus and places it in the memory where pBuf points to.
When the data is sent, no stop command is sent to the I
2
C bus.
Input:
dwAddress
the address of the device the data is read from
*pBuf
pointer to the begin of memory location where
the read data will be placed.
dwSize
the size of the buffer in bytes
Output:
return value
E_NO_ERRORS
E_NO_HARDWARE
E_NOT_SUPPORTED
E_I2C_ERROR
E_I2C_INVALID_ADDRESS
E_I2C_INVALID_SIZE
E_I2C_NO_ACKNOWLEDGE
Summary of Contents for Handyscope HS3
Page 2: ......
Page 8: ...8 Introduction...
Page 65: ...Deprecated routines 65...
Page 67: ...TiePie engineering DLL programmer s manual rev 1 26...