adc0.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void adc0_init (void)
 
uint16_t adc0_get_reading (uint8_t channel_num)
 

Detailed Description

20131202 : Enclosed adc conversion inside critical section 20131101 : Fix possible divide by zero. i was set to 0 during loop init

Function Documentation

uint16_t adc0_get_reading ( uint8_t  channel_num)

Gets an ADC reading from a channel number between 0 - 7

Returns
12-bit ADC value read from the ADC.
Note
If FreeRTOS is running, adc conversion will use interrupts and not poll for the result.
void adc0_init ( void  )

Initializes the ADC Peripheral

Note
The PIN that will be used by ADC needs to be selected using PINSEL externally