Seitenleiste


Access to information is restricted depending on your login. Request login-information through our contact form.

service:wince:drvlib:i2c:i2c_readburst

I2C_ReadBurst

The function I2C_ReadBurst reads a number of iNumberBytes from a i2c-device specified with uSlaveAddress.

int I2C_ReadBurst(      
  UCHAR uSlaveAddress, 
  UCHAR* pBuffer, 
  UCHAR ucOffset, 
  WORD iNumberBytes
); 
int i2c_BurstRead(      
  UCHAR uSlaveAddress, 
  UCHAR* pBuffer, 
  UCHAR ucOffset, 
  WORD iNumberBytes
); 

Parameters

uSlaveAddress
Slave-Address of the i2c-device.

pBuffer
Buffer to receive data.

ucOffset
Offset at where to begin with data-read. This is also the offset, where data will be written to pBuffer.

iNumberBytes
Number of bytes to read.

Return Values

Returns 0 if succesful.

Remarks

Issues following sequence:

  1. Lock
  2. Start
  3. SlaveAddress with write-bit
  4. ucOffset
  5. SlaveAddress with read-bit
  6. Read specified number of bytes
  7. Stop
  8. 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

Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
service/wince/drvlib/i2c/i2c_readburst.txt · Zuletzt geändert: 2009/11/10 12:07 von