Trace: » Reading/Writing to the TTLIO » I2C_WriteBurst » I2C_ReadRandom
Access to information is restricted depending on your login.
Request login-information through our contact form.
Table of Contents
I2C_ReadRandom
The function I2C_ReadRandom reads one byte from a given i2c-address.
int I2C_ReadRandom( UCHAR SlaveAddress, UCHAR SubAddress ); int i2c_RandomByteRead( UCHAR SlaveAddress, UCHAR SubAddress );
Parameters
SlaveAddress SlaveAddress of i2c-device.
SubAddress SubAddress of i2c-device.
Return Values
If the function succeeds, the return value is the byte read from the i2c-device.
If the function fails, the return value is -1.
Remarks
Issues following sequence:
- Lock
- Start
- SlaveAddress with write-bit
- SubAddress
- SlaveAddress with read-bit
- Read one byte
- Stop
- Unlock
This function calls I2C_Lock and I2C_Unlock to prevent multiple accesses to the i2c-bus. Don't lock access to i2c-bus prior to using this function!!
Requirements
OS Versions: Windows CE 4.2 and later.
Header: drvlib_app.h
Link Library: drvlib_app.lib
See Also
(C) 2009 Keith & Koep GmbH. Alle Rechte vorbehalten. Nutzungsbedingungen
(C) 2009 Keith & Koep GmbH. All rights reserved. Terms of Use
(C) 2009 Keith & Koep GmbH. All rights reserved. Terms of Use