U2C-11 USB-I2C/SPI/GPIO Interface Adapter

 
Main Page   Modules   Compound List   File List   Compound Members   File Members  

U2C-11 board initialization routines


Functions

BYTE U2C_GetDeviceCount ()
 How many I2CBridge devices are currently attached. More...

U2C_RESULT U2C_GetSerialNum (HANDLE hDevice, long *pSerialNum)
 Get I2CBridge device Serial Number. More...

U2C_RESULT U2C_IsHandleValid (HANDLE hDevice)
 Check device handle. More...

HANDLE U2C_OpenDevice (BYTE nDevice)
 Open I2CBridge device. More...

HANDLE U2C_OpenDeviceBySerialNum (long nSerialNum)
 Open I2CBridge by Serial Number. More...

U2C_RESULT U2C_CloseDevice (HANDLE hDevice)
 Close device. More...

U2C_RESULT U2C_GetFirmwareVersion (HANDLE hDevice, PU2C_VESION_INFO pVersion)
 Get FW Version. More...

U2C_RESULT U2C_GetDriverVersion (HANDLE hDevice, PU2C_VERSION_INFO pVersion)
 Get Driver Version. More...

U2C_VERSION_INFO U2C_GetDllVersion ()
 Get dll/so Version. More...


Function Documentation

U2C_RESULT _stdcall U2C_CloseDevice ( HANDLE hDevice )
 

Close device.

The U2C_CloseDevice function closes the open device handle

Parameters:
hDevice   Handle to the I2CBridge device to close
Returns:
  • U2C_SUCCESS - The device referenced by hDevice handle was successfully closed.
  • U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found

BYTE _stdcall U2C_GetDeviceCount ( )
 

How many I2CBridge devices are currently attached.

The U2C_GetDeviceCount function checks how many I2CBridge devices are currently attached

Returns:
The function returns the number of the I2CBridge devices detected on current computer

U2C_VERSION_INFO _stdcall U2C_GetDllVersion ( )
 

Get dll/so Version.

The U2C_GetDllVersion function retrieves the version of the "I2CBrdg.dll" dynamic link library or shared library for Linux

Returns:
U2C_VERSION_INFO structure containing "I2CBrdg.dll" dynamic link library version number

U2C_RESULT _stdcall U2C_GetDriverVersion ( HANDLE hDevice,
PU2C_VERSION_INFO pVersion )
 

Get Driver Version.

The U2C_GetDriverVersion function retrieves the version of the driver used to communicate with I2CBridge device

Parameters:
hDevice   Handle to the I2CBridge device to obtain the version of the driver used to communicate with
pVersion   Pointer to a U2C_VERSION_INFO structure to be filled with the driver version number
Returns:
  • U2C_SUCCESS - The driver version was successfully retrieved.
  • U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found

U2C_RESULT U2C_GetFirmwareVersion ( HANDLE hDevice,
PU2C_VESION_INFO pVersion )
 

Get FW Version.

The U2C_GetFirmwareVersion function retrieves the version of the firmware currently loaded into the I2CBridge device referenced by hDevice handle

Parameters:
hDevice   Handle to the I2CBridge device to obtain firmware version from
pVersion   Pointer to a U2C_VERSION_INFO structure to be filled with the firmware version number
Returns:
  • U2C_SUCCESS - The firmware version was successfully retrieved.
  • U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found

U2C_RESULT _stdcall U2C_GetSerialNum ( HANDLE hDevice,
long * pSerialNum )
 

Get I2CBridge device Serial Number.

The U2C_GetSerialNum function retrieves the Serial Number of the current device. This is unique Serial Number. It can be used to identify device when you are using a number of I2CBridge devices simultaneously

Parameters:
hDevice   Handle to the I2CBridge device to retrieve the Serial Number from. The device has to be opened first, using U2C_OpenDevice or U2C_OpenDeviceBySerialNum function
pSerialNum   Pointer to a long integer variable to be filled with the device Serial Number
Returns:
  • U2C_SUCCESS - Serial Number was successfully obtained
  • U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found

U2C_RESULT _stdcall U2C_IsHandleValid ( HANDLE hDevice )
 

Check device handle.

The U2C_IsHandleValid function checks whether the device referenced by hDevice handle is currently attached to the USB and can be used by SW

Parameters:
hDevice   Handle to the I2CBridge device that will be checked
Returns:
  • U2C_SUCCESS - The device referenced by hDevice handle is present
  • U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found

HANDLE _stdcall U2C_OpenDevice ( BYTE nDevice )
 

Open I2CBridge device.

The U2C_OpenDevice function opens the I2CBridge device

Parameters:
nDevice   The device number to open
Returns:
If the function succeeds, the return value is a valid handle to the specified device. If the function fails, the return value is INVALID_HANDLE_VALUE. This can happen if the specified device is not present

HANDLE _stdcall U2C_OpenDeviceBySerialNum ( long nSerialNum )
 

Open I2CBridge by Serial Number.

The U2C_OpenDeviceBySerialNum function opens the I2CBridge device with specified Serial Number

Parameters:
nSerialNum   The Serial Number of the device to open
Returns:
If the function succeeds, the return value is a valid handle to the specified device. If the function fails, the return value is INVALID_HANDLE_VALUE. This can happen if the device with specifyed Serial Number is not present

Copyright DiMAX 2002-2004