access to ADC and analog multiplexer More...
Go to the source code of this file.
Enumerations | |
| enum | hl_adc_channel { adc_chan0, adc_ref } |
decide which channel to sample More... | |
Functions | |
| void | hl_adc_init (void) |
| prepare ADC for use | |
| void | hl_adc_off (void) |
| switch off ADC | |
| void | hl_adc_select (hl_adc_channel chan) |
| select channel to sample | |
| void | hl_adc_start (void) |
| start ADC sampling process | |
| uint8_t | hl_adc_isready (void) |
| check whether sampling process has finished | |
| void | hl_adc_StartNwait4conversion (void) |
| Do a polled AD measurement. | |
| uint16_t | hl_adc_result (void) |
| get result from ADC | |
access to ADC and analog multiplexer
| enum hl_adc_channel |
| void hl_adc_init | ( | void | ) |
prepare ADC for use
hl_adc_init() powers up the ADC, defines PF0 as analog input, sets the ADC prescaler and selects left-adjustment for the result.
| void hl_adc_off | ( | void | ) |
switch off ADC
hl_adc_off() powers down the ADC to conserve power between sampling.
| void hl_adc_StartNwait4conversion | ( | void | ) |
Do a polled AD measurement.
The function is doing a measurement w/o interrupt support
1.7.1