Nut/OS  4.10.3
API Reference
adc.h File Reference

Header for AVR Adc driver. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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, ADC_OFF,
  FREE_RUNNING_T0, FREE_RUNNING_T1, FREE_RUNNING_T2, FREE_RUNNING_EXT,
  SINGLE_CONVERSION
}

Functions

void ADCInit (void)
void ADCSetRef (adc_ref_t reference)
void ADCSetMode (adc_mode_t mode)
uint8_t ADCSetPrescale (uint8_t prescalar)
void ADCSetChannel (adc_channel_t adc_channel)
void ADCBufferFlush (void)
void ADCStartConversion (void)
void ADCStartLowNoiseConversion (void)
void ADCStopConversion (void)
uint8_t ADCRead (uint16_t *value)
adc_mode_t ADCGetMode (void)
enum  adc_channel_type {
  ADC0 = 0, ADC1 = 1, ADC2 = 2, ADC3 = 3,
  ADC4 = 4, ADC5 = 5, ADC6 = 6, ADC7 = 7,
  ADC0 = 0, ADC1 = 1, ADC2 = 2, ADC3 = 3,
  ADC4 = 4, ADC5 = 5, ADC6 = 6, ADC7 = 7,
  ADC_MAX_CHANNEL = 8
}
 enum declaring possible ADC channels More...

Detailed Description

Header for AVR Adc driver.

Definition in file adc.h.