Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The function I2C_SetSlaveAddress sets the active slave.

int I2C_SetSlaveAddress(     
  UCHAR uSlaveAddress, 
  UCHAR RWbit
); 
int i2c_SetSlaveAddr(     
  UCHAR uSlaveAddress, 
  UCHAR RWbit
); 

Parameters

uSlaveAddress Slave-Address of the i2c-device.

RWbit Possible values IIC_WRITE_MODE_BIT or IIC_READ_MODE_BIT.

Return

0 → No ACK detected, set i2c_buserr
1 → ACK detected

Remarks

Issues following sequence:

  1. Start

  2. SlaveAddress with read/write-bit

Function is not protected by Mutex; view I2C_Lock and I2C_Unlock.

Requirements

OS Versions: Windows CE 4.2 and later.
Header: drvlib_app.h
Link Library: drvlib_app.lib

  • No labels