adc.h File Reference
Analog to Digital Converter driver (ADC). More...
#include <cfg/compiler.h>#include <cfg/debug.h>#include <cpu/attr.h>#include "drv/PP_CAT3(adc, _, CPU_ID).h"Go to the source code of this file.
Defines | |
| #define | ADC_RANGECONV(data, y1, y2) (((((int32_t)(data)) * ((y2) - (y1))) / ((1 << ADC_BITS) - 1)) + (y1)) |
| Macro used to convert data from adc range (0. | |
Typedefs | |
| typedef uint16_t | adcread_t |
| Type for ADC return value. | |
| typedef uint8_t | adc_ch_t |
| Type for channel. | |
Functions | |
| adcread_t | adc_read (adc_ch_t ch) |
| Read the ADC channel ch. | |
| void | adc_init (void) |
| Initialize the ADC hardware. | |
Detailed Description
Analog to Digital Converter driver (ADC).
- Version:
- Id
- adc.h 2531 2009-04-17 09:52:39Z batt
- Version:
- Id
- adc.h 2531 2009-04-17 09:52:39Z batt
Definition in file adc.h.
Define Documentation
| #define ADC_RANGECONV | ( | data, | |||
| y1, | |||||
| y2 | ) | (((((int32_t)(data)) * ((y2) - (y1))) / ((1 << ADC_BITS) - 1)) + (y1)) |
