SimAVR
AVR Simulator
avr_adc.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avr_adc.h"
#include "sim_time.h"
Include dependency graph for avr_adc.c:

Functions

static avr_cycle_count_t avr_adc_int_raise (struct avr_t *avr, avr_cycle_count_t when, void *param)
 
static uint8_t avr_adc_read_l (struct avr_t *avr, avr_io_addr_t addr, void *param)
 
static uint8_t avr_adc_read_h (struct avr_t *avr, avr_io_addr_t addr, void *param)
 
static void avr_adc_configure_trigger (struct avr_t *avr, avr_io_addr_t addr, uint8_t v, void *param)
 
static void avr_adc_write_adcsra (struct avr_t *avr, avr_io_addr_t addr, uint8_t v, void *param)
 
static void avr_adc_write_adcsrb (struct avr_t *avr, avr_io_addr_t addr, uint8_t v, void *param)
 
static void avr_adc_irq_notify (struct avr_irq_t *irq, uint32_t value, void *param)
 
static void avr_adc_reset (avr_io_t *port)
 
void avr_adc_init (avr_t *avr, avr_adc_t *p)
 

Variables

static const char * irq_names [ADC_IRQ_COUNT]
 
static avr_io_t _io
 

Function Documentation

static void avr_adc_configure_trigger ( struct avr_t avr,
avr_io_addr_t  addr,
uint8_t  v,
void *  param 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static avr_cycle_count_t avr_adc_int_raise ( struct avr_t avr,
avr_cycle_count_t  when,
void *  param 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void avr_adc_irq_notify ( struct avr_irq_t irq,
uint32_t  value,
void *  param 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static uint8_t avr_adc_read_h ( struct avr_t avr,
avr_io_addr_t  addr,
void *  param 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static uint8_t avr_adc_read_l ( struct avr_t avr,
avr_io_addr_t  addr,
void *  param 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void avr_adc_reset ( avr_io_t port)
static

Here is the call graph for this function:

static void avr_adc_write_adcsra ( struct avr_t avr,
avr_io_addr_t  addr,
uint8_t  v,
void *  param 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void avr_adc_write_adcsrb ( struct avr_t avr,
avr_io_addr_t  addr,
uint8_t  v,
void *  param 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

avr_io_t _io
static
Initial value:
= {
.kind = "adc",
.reset = avr_adc_reset,
.irq_names = irq_names,
}
static void avr_adc_reset(avr_io_t *port)
Definition: avr_adc.c:319
static const char * irq_names[ADC_IRQ_COUNT]
Definition: avr_adc.c:331
const char* irq_names[ADC_IRQ_COUNT]
static
Initial value:
= {
[ADC_IRQ_ADC0] = "16<adc0",
[ADC_IRQ_ADC1] = "16<adc1",
[ADC_IRQ_ADC2] = "16<adc2",
[ADC_IRQ_ADC3] = "16<adc3",
[ADC_IRQ_ADC4] = "16<adc4",
[ADC_IRQ_ADC5] = "16<adc5",
[ADC_IRQ_ADC6] = "16<adc6",
[ADC_IRQ_ADC7] = "16<adc7",
[ADC_IRQ_ADC8] = "16<adc0",
[ADC_IRQ_ADC9] = "16<adc9",
[ADC_IRQ_ADC10] = "16<adc10",
[ADC_IRQ_ADC11] = "16<adc11",
[ADC_IRQ_ADC12] = "16<adc12",
[ADC_IRQ_ADC13] = "16<adc13",
[ADC_IRQ_ADC14] = "16<adc14",
[ADC_IRQ_ADC15] = "16<adc15",
[ADC_IRQ_TEMP] = "16<temp",
[ADC_IRQ_IN_TRIGGER] = "<trigger_in",
[ADC_IRQ_OUT_TRIGGER] = ">trigger_out",
}
Definition: avr_adc.h:48
Definition: avr_adc.h:51
Definition: avr_adc.h:49
Definition: avr_adc.h:50
input IRQ values. Values are /always/ volts * 1000 (millivolts)
Definition: avr_adc.h:47
Definition: avr_adc.h:52
Definition: avr_adc.h:50
Definition: avr_adc.h:47
Definition: avr_adc.h:49
Definition: avr_adc.h:48
Definition: avr_adc.h:47
Definition: avr_adc.h:50
Definition: avr_adc.h:49
Definition: avr_adc.h:53
Definition: avr_adc.h:48
Definition: avr_adc.h:49
Definition: avr_adc.h:47
Definition: avr_adc.h:50
Definition: avr_adc.h:48