Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
70
of
106
ADC_GET_CLOCK_DIVISOR
uint32_t
out
Set the clock divisor of the clock used
for communication with the ADC chip.
ADC_ENABLE_CHANNEL
uint32_t
in
Enable specified channel number to
be included when sampling. Minimum
0 and maximum 15.
ADC_DISABLE_CHANNEL
uint32_t
in
Disable specified channel number to
be included when sampling. Minimum
0 and maximum 15.
Return value
Description
0
Command executed
successfully
-1
see
errno
values
errno values
RTEMS_NOT_DEFINED
Invalid IOCTL
EINVAL
Invalid value supplied to
IOCTL
5.11.3. Usage
The following #define needs to be set by the user application to be able to use the ADC:
CONFIGURE_APPLICATION_NEEDS_ADC_DRIVER
5.11.3.1. RTEMS application example
In order to use the ADC driver on RTEMS environment, the following code structure is
suggested to be used: