Main Page

Functions
timers.c File Reference

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

## § timer_int_create()

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.

## § timer_intr_construct()

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().

## § timer_intr_destroy()

void timer_intr_destroy | ( | void * | ti | ) |

Destructor for timer interrupt object.

Definition at line 205 of file timers.c.

References vdev_destroy().

## § timer0_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.

## § timer0_construct()

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().

## § timer0_destroy()

void timer0_destroy | ( | void * | timer | ) |

Destructor for timer/counter 0 object.

Definition at line 387 of file timers.c.

References vdev_destroy().

## § timer16_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.

## § 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_error, and vdev_construct().

## § ocreg16_create()

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.

## § 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, and vdev_construct().

Automatically generated by Doxygen 1.8.12 on Sun Apr 2 2017.