Difference between revisions of "UsbI2cRead"

From eMDeeWiki
Jump to navigationJump to search
 
Line 4: Line 4:
 
'''Return Value'''
 
'''Return Value'''
  
Returns
+
[[File:ErrorMacros.png]]
  
  
Line 13: Line 13:
  
 
''address''
 
''address''
:The
+
:Address of the I/O bank to read from. Each I/O bank contains two 8-bit bytes. Refer to the user's manual of the specific USB device you are using for details of the valid I/O banks for that device.
  
 
''data''
 
''data''
:The
+
:A pointer to two 8-bit bytes of data that will receive the data from the I/O bank.
  
 
''length''
 
''length''
:The
+
:The number of bytes that are allocated in the data array (typically this value will always be 2).
  
  
 
'''Remarks'''
 
'''Remarks'''
  
Opens
+
This function reads data from the I2C bus of the USB device. Each USB device can have a different configuration of I2C components and functionality. Please refer to the User's Manual for the specific USB device that you are using for details on the I2C configuration for that device.
  
  

Latest revision as of 11:03, 19 June 2014

int UsbI2cRead(UAC_HANDLE devHandle, unsigned short address, char *data, unsigned short length)


Return Value

ErrorMacros.png


Parameters

devHandle

The device handle of an open device. Use the value returned by UsbI2cOpen.

address

Address of the I/O bank to read from. Each I/O bank contains two 8-bit bytes. Refer to the user's manual of the specific USB device you are using for details of the valid I/O banks for that device.

data

A pointer to two 8-bit bytes of data that will receive the data from the I/O bank.

length

The number of bytes that are allocated in the data array (typically this value will always be 2).


Remarks

This function reads data from the I2C bus of the USB device. Each USB device can have a different configuration of I2C components and functionality. Please refer to the User's Manual for the specific USB device that you are using for details on the I2C configuration for that device.



USBI2C API Reference
Index of Functions
Home