Seitenleiste


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

service:wince:drvlib:i2c:i2c_writeread

I2C_WriteRead

The function I2C_WriteRead writes pInBuffer to the I2C and reads data from I2C to pOutBuffer.

BOOL I2C_WriteRead(
   UCHAR SlaveAddress, 
   UCHAR* pInBuffer, 
   int inbytes, 
   UCHAR* pOutBuffer, 
   int outbytes
);

Return Values

If the function fails, the return value is 0. If the function succeeds, the return value is 1.

Parameters

uSlaveAddress
Slave-Address of i2c-device.

pInBuffer
Pointer to a Buffer that is send to the I2C device.

inbytes
Number of bytes in pInBuffer.

pOutBuffer
Pointer to a Buffer which receives the bytes read.

outbytes
Number of bytes to receive in pOutBuffer.

Remarks

Issues following sequence:

If pInBuffer is not NULL:

  • Start
  • SlaveAddress with write-bit
  • send pInBuffer (inbytes)
  • Stop

If pOutBuffer is not NULL:

  • Start
  • SlaveAddress with read-bit
  • fill pOutBuffer (outbytes)
  • Stop

Requirements

OS Versions: Windows Embedded Compact 7 and later.
Module: Trizeps VII
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_writeread.txt · Zuletzt geändert: 2015/09/18 10:34 von