User's Manual

Table Of Contents
4-28 Millennial Net
Using the MeshScape API
3. ibApi_IO_GetADCConfig()
ibApi_FUNC ibApi_IO_GetADCConfig (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 channel_index
);
This queries whether the specified ADCchannel is enabled or disabled.
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.
Return Value:
An ibApi_TRUE if enabled, ibApi_FALSE if disabled, or an error code (<0) if not.
4. ibApi_IO_ReadADC()
ibApi_FUNC ibApi_IO_ReadADC (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 channel_index,
ibApi_FLOAT * adc_value
);
This retrieves the value of the specified ADC channel as a float voltage value.
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.
adc_value: (output) ADC channel voltage.
Return Value:
An ibApi_RESULT_SUCCESSFUL if successful, or an error code (<0) if not.