Difference between revisions of "UsbI2cWrite"

From eMDeeWiki
Jump to navigationJump to search
 
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
'''Return Value'''
 
'''Return Value'''
  
Returns
+
[[File:ErrorMacros.png]]
  
  
Line 10: Line 10:
  
 
''devHandle''
 
''devHandle''
:The device handle of an open device. Use the value returned by [[UsbI2cOpen]].
+
:The device handle of an open USB device. Use the value returned by [[UsbI2cOpen]].
  
 
''address''
 
''address''
:The
+
:Address of the I/O bank to write to.  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 be written to 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 writes data to 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 10:32, 19 June 2014

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


Return Value

ErrorMacros.png


Parameters

devHandle

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

address

Address of the I/O bank to write to. 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 be written to 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 writes data to 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