ADC_Open Function
Header: #include <applibs/adc.h>
Opens an ADC controller, and returns a file descriptor to use for subsequent calls.
int ADC_Open(ADC_ControllerId id);
Parameters
id
The ID of the ADC controller to open. The ID is a zero-based index. The maximum value permitted depends on the platform.
Errors
Returns -1 if an error is encountered and sets errno
to the error value.
- EACCES: access to the ADC controller isn't permitted. Verify that the controller exists and is listed in the "Adc" field of the application manifest.
Any other errno
may also be specified; such errors aren't deterministic and the same behavior might not be retained through system updates.
Return value
Returns the file descriptor for the ADC controller if it was opened successfully, or -1 for failure, in which case errno
is set to the error value.
Application manifest requirements
To access an ADC controller, your application must identify it in the Adc field of the application manifest.