UsbI2cOpen

From eMDeeWiki
Jump to navigationJump to search

UAC_HANDLE UsbI2cOpen(int devAddress)


Return Value

If successful, this function returns a handle to an open USB device that will be used as the devHandle parameter in subsequent function calls. Save this handle for future reference to this device.

If not successful, this function returns NULL.


Parameters

devAddress

Physical address of the USB device. On most eMDee USBI2C devices there is a DIP switch that is accessible from the outside of the enclosure that can be used to set this physical address. The first four DIP switches (labeled 1, 2, 3, & 4) make up the binary equivalent of the physical address. There are 16 possible combinations from 0 (all switches OFF) to 15 (all switches ON). If the DIP switch settings are changed, the USB device must be reset or plugged and replugged in order to reload the USB drivers with the new physical address.
If no DIP switches are available on a particular USB device, the devAddress of that device will be zero.
Multiple devices with the same physical address are not allowed. Each device on a single PC must have a unique DIP switch setting. A maximum of 16 devices per PC is possible.


Remarks

Use this function to open a USB device and obtain a handle to it.



USBI2C API Reference
Index of Functions
Home