LibTiePie  0.9.16
Library for interfacing TiePie engineering instruments

Description

Functions to control the I2C clock speed.

Functions

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

Function Documentation

double I2CGetSpeedMax ( LibTiePieHandle_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.
OBJECT_GONE The object indicated by the 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 ( LibTiePieHandle_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.
OBJECT_GONE The object indicated by the 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 ( LibTiePieHandle_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.
OBJECT_GONE The object indicated by the 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