SimAVR
AVR Simulator
avr_adc.h File Reference
#include "sim_avr.h"
Include dependency graph for avr_adc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  avr_adc_mux_t
 
struct  avr_adc_t
 

Macros

#define AVR_IOCTL_ADC_GETIRQ   AVR_IOCTL_DEF('a','d','c',' ')
 Get the internal IRQ corresponding to the INT. More...
 
#define AVR_ADC_SINGLE(_chan)
 
#define AVR_ADC_DIFF(_a, _b, _g)
 
#define AVR_ADC_REF(_t)
 
#define AVR_ADC_TEMP()
 
#define AVR_ADC_VCC4()
 

Typedefs

typedef struct avr_adc_mux_t avr_adc_mux_t
 
typedef struct avr_adc_t avr_adc_t
 

Enumerations

enum  {
  ADC_IRQ_ADC0 = 0, ADC_IRQ_ADC1, ADC_IRQ_ADC2, ADC_IRQ_ADC3,
  ADC_IRQ_ADC4, ADC_IRQ_ADC5, ADC_IRQ_ADC6, ADC_IRQ_ADC7,
  ADC_IRQ_ADC8, ADC_IRQ_ADC9, ADC_IRQ_ADC10, ADC_IRQ_ADC11,
  ADC_IRQ_ADC12, ADC_IRQ_ADC13, ADC_IRQ_ADC14, ADC_IRQ_ADC15,
  ADC_IRQ_TEMP, ADC_IRQ_IN_TRIGGER, ADC_IRQ_OUT_TRIGGER, ADC_IRQ_COUNT
}
 
enum  {
  ADC_MUX_NONE = 0, ADC_MUX_NOISE, ADC_MUX_SINGLE, ADC_MUX_DIFF,
  ADC_MUX_TEMP, ADC_MUX_REF, ADC_MUX_VCC4
}
 Definition of a ADC mux mode. More...
 
enum  {
  ADC_VREF_AREF = 0, ADC_VREF_VCC, ADC_VREF_AVCC, ADC_VREF_V110 = 1100,
  ADC_VREF_V256 = 2560
}
 
enum  avr_adts_type {
  avr_adts_none = 0, avr_adts_free_running, avr_adts_analog_comparator_0, avr_adts_analog_comparator_1,
  avr_adts_analog_comparator_2, avr_adts_analog_comparator_3, avr_adts_external_interrupt_0, avr_adts_timer_0_compare_match_a,
  avr_adts_timer_0_compare_match_b, avr_adts_timer_0_overflow, avr_adts_timer_1_compare_match_b, avr_adts_timer_1_overflow,
  avr_adts_timer_1_capture_event, avr_adts_pin_change_interrupt, avr_adts_psc_module_0_sync_signal, avr_adts_psc_module_1_sync_signal,
  avr_adts_psc_module_2_sync_signal
}
 ADC trigger sources. More...
 

Functions

void avr_adc_init (avr_t *avr, avr_adc_t *port)