![]() |
xyControl
0.1
Quadrotor Flight Controller on AVR Basis
|
Analog-to-Digital Converter Library. More...
Files | |
| file | adc.h |
| Analog-to-Digital Converter API Header. | |
| file | adc.c |
| Analog-to-Digital Converter API Implementation. | |
Enumerations | |
| enum | ADCRef { AREF, AVCC, AINT1, AINT2 } |
| ADC Reference Voltage options. More... | |
Functions | |
| void | adcInit (ADCRef ref) |
| Initialize the ADC Hardware. More... | |
| void | adcStart (uint8_t channel) |
| Start a conversion on a given channel. More... | |
| uint8_t | adcReady (void) |
| Check if a result is ready. More... | |
| uint16_t | adcGet (uint8_t next) |
| Get the conversion results. More... | |
| void | adcClose (void) |
| Disable the ADC to save energy. More... | |
Analog-to-Digital Converter Library.
With 10bit Output and selectable Reference Voltage.
| enum ADCRef |
| void adcClose | ( | void | ) |
| uint16_t adcGet | ( | uint8_t | next | ) |
Get the conversion results.
| next | Start next conversion if != 0 |
Definition at line 96 of file adc.c.
References adcReady().
Referenced by getVoltage().
| void adcInit | ( | ADCRef | ref | ) |
| uint8_t adcReady | ( | void | ) |
Check if a result is ready.
Definition at line 86 of file adc.c.
Referenced by adcGet(), and getVoltage().
| void adcStart | ( | uint8_t | channel | ) |
Start a conversion on a given channel.
| channel | Channel (0 - 15) |
Definition at line 70 of file adc.c.
Referenced by getVoltage().
1.8.3.1