XPS Unified Programmer’s Manual
7.2.1.59 GPIOAnalogGet
Name
GPIOAnalogGet – Reads one or several analog inputs (ADC) or outputs( DAC).
Input tests
- Refer to section 7.1: “Input Tests Common to all XPS Functions”.
- GPIO name (ADC or DAC): (-8)
- Hardware compatibility or XPS initialization in progress: (-22)
Description
Reads one or several analog IO and returns the value(s) in an array.
Prototype
int GPIOAnalogGet(
int SocketID,
int NbElements,
char * GPIONameList,
double * AnalogValueArray
)
Input parameters
SocketID int Socket identifier gets by the
“TCP_ConnectToServer” function.
NbElements int Number of analog GPIO to read.
GPIONameList char * List of analog GPIO names – separator is
comma.
Output parameters
AnalogGainValueArray double * Analog GPIO value array (DAC or ADC).
Return (In addition to the results of “Input Tests Common to all XPS
Functions”)
• 0: No error.
• -8: Wrong object type for this command.
• -22: Not allowed action.
EDH0373En1023 — 01/18 106