Defines | |
| #define | ADC_PRESCALE_DIV2 0x00 |
| 0x01,0x00 -> CPU clk/2 | |
| #define | ADC_PRESCALE_DIV4 0x02 |
| 0x02 -> CPU clk/4 | |
| #define | ADC_PRESCALE_DIV8 0x03 |
| 0x03 -> CPU clk/8 | |
| #define | ADC_PRESCALE_DIV16 0x04 |
| 0x04 -> CPU clk/16 | |
| #define | ADC_PRESCALE_DIV32 0x05 |
| 0x05 -> CPU clk/32 | |
| #define | ADC_PRESCALE_DIV64 0x06 |
| 0x06 -> CPU clk/64 | |
| #define | ADC_PRESCALE_DIV128 0x07 |
| 0x07 -> CPU clk/128 | |
Typedefs | |
| typedef enum adc_ref_type | adc_ref_t |
| typedef enum adc_mode_type | adc_mode_t |
| typedef enum adc_channel_type | adc_channel_t |
Enumerations | |
| enum | adc_ref_type { AVCC = 0, AREF, INTERNAL_256 } |
| enum | adc_mode_type { ADC_OFF, FREE_RUNNING, SINGLE_CONVERSION } |
| enum | adc_channel_type { ADC0 = 0, ADC1 = 1, ADC2 = 2, ADC3 = 3, ADC4 = 4, ADC5 = 5, ADC6 = 6, ADC7 = 7 } |
Functions | |
| void | ADCInit (void) |
| void | ADCSetRef (adc_ref_t reference) |
| void | ADCSetMode (adc_mode_t mode) |
| u_char | ADCSetPrescale (u_char prescalar) |
| void | ADCSetChannel (adc_channel_t adc_channel) |
| void | ADCBufferFlush (void) |
| void | ADCStartConversion (void) |
| void | ADCStartLowNoiseConversion (void) |
| void | ADCStopConversion (void) |
| u_char | ADCRead (u_short *value) |
| adc_mode_t | ADCGetMode (void) |