IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


int i2cReceiveChar ( BYTE  idx,
unsigned int  addr,
BYTE *  data,
BOOLEAN  not_last,
BOOLEAN  ext 
)

Receive a byte from the I2C bus in master mode. This function will automatically generated a I2C Start or Restart condition.

Parameters:
idx I2C bus interface index (0=I2C1 or 1=I2C2)
addr Slave address
data Buffer for received data byte
not_last if "TRUE" more data to receive, "FALSE" means last byte to receive
ext if "TRUE" use extended address mode
Returns:
Zero = success, Non-zero = error state:
  • 3 - Arbitration lost, general call address received
  • 4 - Arbitration lost, own slave address received, master wants to read (change from master to slave)
  • 5 - Arbitration lost, own slave address received, master wants to write (change from master to slave)
  • 6 - Arbitration lost
  • 7 - Bus error
  • 8 - Timeout
  • 9 - Slave faulty or not available
Since:
SC2x3 V1.00 - CLIB V1.00
See also:
i2cTransmitChar() i2cTransmitBlock() i2cReceiveBlock()





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:36 2017 by Doxygen 1.6.1