IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


int i2cTransmitBlock ( BYTE  idx,
unsigned int  addr,
BYTE *  buffer,
int  length,
BOOLEAN  ext 
)

This function will dwell until 'length' bytes from the buffer are transmitted or until an error occurs. 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
buffer Buffer that holds data bytes to send
length Number of bytes to send
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:
i2cReceiveChar() i2cTransmitChar() 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