Main Page Modules Compound List File List Compound Members File Members
I2C wire level routines
Function Documentation
U2C_RESULT _stdcall U2C_DropScl (
|
HANDLE hDevice )
|
|
|
Pull down SCL.
The U2C_DropScl function pulls down the SCL line of the I2C bus. -
Parameters:
-
hDevice
|
Handle to the I2CBridge device |
-
Returns:
-
- U2C_SUCCESS - The line was successfully dropped
- U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found
|
U2C_RESULT _stdcall U2C_DropSda (
|
HANDLE hDevice )
|
|
|
Pull down SDA.
The U2C_DropSda function pulls down the SCL line of the I2C bus. -
Parameters:
-
hDevice
|
Handle to the I2CBridge device |
-
Returns:
-
- U2C_SUCCESS - The line was successfully dropped
- U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found
|
|
Get SCL line state.
The U2C_ReadScl function checks the current state of the SCL line of the I2C bus. -
Parameters:
-
hDevice
|
Handle to the I2CBridge device |
pState
|
Pointer to the location to be filled with the SCL line state:
- LS_RELEASED - if line is released (high)
- LS_DROPPED_BY_I2C_BRIDGE - if I2CBridge device has pulled down the line
- LS_DROPPED_BY_SLAVE - if I2C slave device has pulled down the line
|
-
Returns:
-
- U2C_SUCCESS - The line state was successfully read
- U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found
|
|
Get SDA line state.
The U2C_ReadSda function checks the current state of the SDA line of the I2C bus. -
Parameters:
-
hDevice
|
Handle to the I2CBridge device |
pState
|
Pointer to the location to be filled with the SDA line state:
- LS_RELEASED - if line is released (high)
- LS_DROPPED_BY_I2C_BRIDGE - if I2CBridge device has pulled down the line
- LS_DROPPED_BY_SLAVE - if I2C slave device has pulled down the line
|
-
Returns:
-
- U2C_SUCCESS - The line state was successfully read
- U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found
|
U2C_RESULT _stdcall U2C_ReleaseScl (
|
HANDLE hDevice )
|
|
|
Release SCL.
The U2C_ReleaseScl function releases the SCL line of the I2C bus. If the line is not pulled down by I2C slave device, it will get high. -
Parameters:
-
hDevice
|
Handle to the I2CBridge device |
-
Returns:
-
- U2C_SUCCESS - The line was successfully released
- U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found
|
U2C_RESULT _stdcall U2C_ReleaseSda (
|
HANDLE hDevice )
|
|
|
Release SCL.
The U2C_ReleaseSda function releases the SDA line of the I2C bus. If the line is not pulled down by I2C slave device, it will get high. -
Parameters:
-
hDevice
|
Handle to the I2CBridge device |
-
Returns:
-
- U2C_SUCCESS - The line was successfully released
- U2C_HARDWARE_NOT_FOUND - I2CBridge device referenced by hDevice handle was not found
|
|