User's Manual

Table Of Contents
RK-5424-5 Reference Kit User’s Guide 4-27
iBeanAPI_IO.h
Functions
1. ibApi_IO_GetDeviceCaps()
ibApi_FUNC ibApi_IO_GetDeviceCaps (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_IO_DEVICECAPS *device_caps
);
This function retrieves various static device attributes that are predetermined at
manufacturing time. Thus, these values only need to be queried once for a particular device.
See ibApi_IO_DEVICECAPS above for details.
Note: To avoid memory corruption, size of (ibApi_IO_DEVICECAPS) must
be assigned to the “struct_size” field prior to calling this function.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
device_caps: (output) Pointer to variable storing the result.
Return Value:
An ibApi_RESULT_SUCCESS if successful, error code (<0) if not.
2. ibApi_IO_SetADCConfig()
ibApi_FUNC ibApi_IO_SetADCConfig (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 channel_index,
ibApi_BOOL enabled
);
This sets whether the specified ADC channel is enabled or disabled. The channel must be
enabled before calling ibApi_IO_ReadADC().
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
channel_index: (input) Channel index to access.
enabled: (input) ibApi_TRUE to enable the channel.
Return Value:
An ibApi_RESULT_SUCCESS if successful, or an error code (<0) if not.