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) |
Module to simulate the AVR's on-board timer/counters.
This currently only implements the timer/counter 0.
Definition in file timers.c.
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, avr_new, class_overload_destroy(), timer_intr_construct(), and timer_intr_destroy().
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().
Referenced by timer_int_create().
void timer_intr_destroy | ( | void * | ti | ) |
Destructor for timer interrupt object.
Definition at line 205 of file timers.c.
References avr_core_async_cb_add(), avr_core_irq_raise(), avr_error, vdev_destroy(), and vdev_get_core().
Referenced by timer_int_create().
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.
References avr_new, class_overload_destroy(), timer0_construct(), and timer0_destroy().
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().
Referenced by timer0_create().
void timer0_destroy | ( | void * | timer | ) |
Destructor for timer/counter 0 object.
Definition at line 387 of file timers.c.
References avr_core_clk_cb_add(), avr_core_get_vdev_by_addr(), avr_error, vdev_destroy(), and vdev_get_core().
Referenced by timer0_create().
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, avr_new, class_overload_destroy(), and timer16_construct().
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_core_clk_cb_add(), avr_core_get_vdev_by_addr(), avr_error, vdev_construct(), vdev_destroy(), and vdev_get_core().
Referenced by timer16_create().
VDevice* ocreg16_create | ( | int | addr, |
char * | name, | ||
int | rel_addr, | ||
void * | data | ||
) |
Allocate a new 16 bit Output Compare Register.
ocrdef | The definition struct for the OCR to be created |
Definition at line 909 of file timers.c.
References avr_error, avr_new, class_overload_destroy(), and ocreg16_construct().
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, vdev_construct(), and vdev_destroy().
Referenced by ocreg16_create().