LibTiePie  0.5
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Modules Pages

Description

Functions to control the I2C clock speed.

Functions

double I2CGetSpeedMax (TpDeviceHandle_t hDevice)
 Get the maximum clock speed on the I2C bus controlled by a specified I2C host. More...
 
double I2CGetSpeed (TpDeviceHandle_t hDevice)
 Get the current clock speed on the I2C bus controlled by a specified I2C host. More...
 
double I2CSetSpeed (TpDeviceHandle_t hDevice, double dSpeed)
 Set the clock speed on the I2C bus controlled by a specified I2C host. More...
 

Function Documentation

double I2CGetSpeedMax ( TpDeviceHandle_t  hDevice)

Get the maximum clock speed on the I2C bus controlled by a specified I2C host.

Parameters
[in]hDeviceA device handle identifying the I2C host.
Returns
The maximum I2C clock speed in Hz.
Status values
INVALID_HANDLE The handle is not a valid I2C host handle.
DEVICE_GONE The device indicated by the device handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
I2CGetSpeed
I2CSetSpeed
Since
0.4.0
double I2CGetSpeed ( TpDeviceHandle_t  hDevice)

Get the current clock speed on the I2C bus controlled by a specified I2C host.

Parameters
[in]hDeviceA device handle identifying the I2C host.
Returns
The currently set I2C clock speed in Hz.
Status values
UNSUCCESSFUL An error occurred during execution of the last called function.
INVALID_HANDLE The handle is not a valid I2C host handle.
DEVICE_GONE The device indicated by the device handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
I2CGetSpeedMax
I2CSetSpeed
Since
0.4.0
double I2CSetSpeed ( TpDeviceHandle_t  hDevice,
double  dSpeed 
)

Set the clock speed on the I2C bus controlled by a specified I2C host.

Parameters
[in]hDeviceA device handle identifying the I2C host.
[in]dSpeedThe requested I2C clock speed in Hz.
Returns
The actually set I2C clock speed in Hz.
Status values
VALUE_CLIPPED The requested I2C clock speed is outside the valid range and clipped to that range.
VALUE_MODIFIED The requested I2C clock speed is inside the valid range but not available. The closest valid value is set.
INVALID_HANDLE The handle is not a valid I2C host handle.
DEVICE_GONE The device indicated by the device handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
I2CGetSpeedMax
I2CGetSpeed
Since
0.4.0