timers.c File Reference

Module to simulate the AVR's on-board timer/counters. More...

Go to the source code of this file.

Functions

VDevice * timer_int_create (int addr, char *name, int rel_addr, void *data)
TimerIntr_T * timer_intr_new (int addr, char *name, uint8_t func_mask)
void timer_intr_construct (TimerIntr_T *ti, int addr, char *name, uint8_t func_mask)
void timer_intr_destroy (void *ti)
VDevice * timer0_create (int addr, char *name, int rel_addr, void *data)
Timer0_T * timer0_new (int addr, char *name, int rel_addr)
void timer0_construct (Timer0_T *timer, int addr, char *name, int rel_addr)
void timer0_destroy (void *timer)
16 Bit Timer Functions



VDevice * timer16_create (int addr, char *name, int rel_addr, void *data)
Timer16_T * timer16_new (int addr, char *name, int rel_addr, Timer16Def timerdef)
void timer16_construct (Timer16_T *timer, int addr, char *name, int rel_addr, Timer16Def timerdef)
16 Bit Output Compare Register Functions



VDevice * ocreg16_create (int addr, char *name, int rel_addr, void *data)
OCReg16_T * ocreg16_new (int addr, char *name, OCReg16Def ocrdef)
void ocreg16_construct (OCReg16_T *ocreg, int addr, char *name, OCReg16Def ocrdef)

Detailed Description

Module to simulate the AVR's on-board timer/counters.

This currently only implements the timer/counter 0.

Definition in file timers.c.


Function Documentation

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

Allocate a new timer interrupt.

Definition at line 138 of file timers.c.

References avr_error.

void timer_intr_construct ( TimerIntr_T *  ti,
int  addr,
char *  name,
uint8_t  func_mask 
)

Constructor for timer interrupt object.

Definition at line 163 of file timers.c.

References avr_error, and vdev_construct().

void timer_intr_destroy ( void *  ti  ) 

Destructor for timer interrupt object.

Definition at line 205 of file timers.c.

References vdev_destroy().

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

Allocate a new timer/counter 0.

Definition at line 350 of file timers.c.

void timer0_construct ( Timer0_T *  timer,
int  addr,
char *  name,
int  rel_addr 
)

Constructor for timer/counter 0 object.

Definition at line 370 of file timers.c.

References avr_error, and vdev_construct().

void timer0_destroy ( void *  timer  ) 

Destructor for timer/counter 0 object.

Definition at line 387 of file timers.c.

References vdev_destroy().

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

Allocate a new 16 bit timer/counter.

Definition at line 582 of file timers.c.

References avr_error.

void timer16_construct ( Timer16_T *  timer,
int  addr,
char *  name,
int  rel_addr,
Timer16Def  timerdef 
)

Constructor for 16 bit timer/counter object.

Definition at line 608 of file timers.c.

References avr_error, and vdev_construct().

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

Allocate a new 16 bit Output Compare Register.

Parameters:
ocrdef The definition struct for the OCR to be created

Definition at line 909 of file timers.c.

References avr_error.

void ocreg16_construct ( OCReg16_T *  ocreg,
int  addr,
char *  name,
OCReg16Def  ocrdef 
)

Constructor for 16 bit Output Compare Register object.

Definition at line 935 of file timers.c.

References avr_error, and vdev_construct().


Automatically generated by Doxygen 1.6.1 on 4 Apr 2010.