ADC_Poll Function
Header: #include <applibs/adc.h>
Gets sample data for an ADC channel.
int ADC_Poll(int fd, ADC_ChannelId channel, uint32_t *outSampleValue);
Parameters
fd
The file descriptor for the ADC controller. The file descriptor is retrieved by ADC_Open.channel
The ID of the channel to access. The range of allowed values is controller-dependent and is typically a zero-based index.outSampleValue
A pointer to the uint32_t that receives the sample data. This parameter must not be set to NULL.
Errors
Returns -1 if an error is encountered and sets errno
to the error value. Such errors aren't deterministic and the same behavior might not be retained through system updates.
Return value
Returns 0 for success, 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.