I2C_WriteRandom

The function I2C_WriteRandom writes one byte to a given i2c-address.

void I2C_WriteRandom(      
  UCHAR SlaveAddress, 
  UCHAR SubAddress, 
  UCHAR data
); 
void i2c_RandomByteWrite(      
  UCHAR SlaveAddress, 
  UCHAR SubAddress, 
  UCHAR data
); 

Parameters

SlaveAddress Slave-Address of the i2c-device.

SubAddress Sub-Address of the i2c-device.

data Data to be written to the i2c-device.

Remarks

Issues following sequence:

  1. Lock
  2. Start
  3. SlaveAddress with write-bit
  4. SubAddress
  5. Write data
  6. Stop
  7. 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