adc.c File Reference

Go to the source code of this file.

Functions

VDevice * adc_int_create (int addr, char *name, int rel_addr, void *data)
 
ADCIntr_T * adc_intr_new (int addr, char *name, int rel_addr)
 
void adc_intr_construct (ADCIntr_T *adc, int addr, char *name, int rel_addr)
 
void adc_intr_destroy (void *adc)
 
VDevice * adc_create (int addr, char *name, int rel_addr, void *data)
 
ADC_T * adc_new (int addr, char *name, uint8_t uier, int rel_addr)
 
void adc_construct (ADC_T *adc, int addr, char *name, uint8_t uier, int rel_addr)
 
void adc_destroy (void *adc)
 
uint16_t adc_port_rd (uint8_t mux)
 
void adc_port_wr (uint8_t val)
 

Detailed Description

Module to simulate the AVR's ADC module.

Definition in file adc.c.

Function Documentation

VDevice* adc_int_create ( int  addr,
char *  name,
int  rel_addr,
void *  data 
)

Allocate a new ADC interrupt.

Definition at line 79 of file adc.c.

References adc_intr_construct(), adc_intr_destroy(), avr_new, and class_overload_destroy().

void adc_intr_construct ( ADCIntr_T *  adc,
int  addr,
char *  name,
int  rel_addr 
)

Constructor for adc interrupt object.

Definition at line 99 of file adc.c.

References avr_error, and vdev_construct().

Referenced by adc_int_create().

void adc_intr_destroy ( void *  adc)

Destructor for adc interrupt object.

Definition at line 138 of file adc.c.

References avr_core_async_cb_add(), avr_core_clk_cb_add(), avr_core_get_vdev_by_addr(), avr_core_irq_raise(), avr_error, vdev_destroy(), and vdev_get_core().

Referenced by adc_int_create().

VDevice* adc_create ( int  addr,
char *  name,
int  rel_addr,
void *  data 
)

Allocate a new ADC structure.

Definition at line 292 of file adc.c.

References adc_construct(), adc_destroy(), avr_error, avr_new, and class_overload_destroy().

void adc_construct ( ADC_T *  adc,
int  addr,
char *  name,
uint8_t  uier,
int  rel_addr 
)

Constructor for ADC object.

Definition at line 318 of file adc.c.

References avr_error, and vdev_construct().

Referenced by adc_create().

void adc_destroy ( void *  adc)

Destructor for ADC object.

Definition at line 357 of file adc.c.

References avr_core_get_vdev_by_addr(), avr_error, vdev_destroy(), and vdev_get_core().

Referenced by adc_create().


Automatically generated by Doxygen 1.8.11 on Mon Aug 8 2016.