Main Page   Compound List   File List   Compound Members   File Members  

timer.h File Reference

#include "global.h"

Go to the source code of this file.

Defines

#define TIMER_H
#define TIMER_CLK_STOP   0x00
#define TIMER_CLK_DIV1   0x01
#define TIMER_CLK_DIV8   0x02
#define TIMER_CLK_DIV64   0x03
#define TIMER_CLK_DIV256   0x04
#define TIMER_CLK_DIV1024   0x05
#define TIMER_CLK_T_FALL   0x06
#define TIMER_CLK_T_RISE   0x07
#define TIMER_PRESCALE_MASK   0x07
#define TIMER0PRESCALE   TIMER_CLK_DIV8
#define TIMER1PRESCALE   TIMER_CLK_DIV64
#define TIMER2PRESCALE   TIMER_CLK_DIV64
#define TIMER2_CLK_STOP   0x00
#define TIMER2_CLK_DIV1   0x01
#define TIMER2_CLK_DIV8   0x02
#define TIMER2_CLK_DIV32   0x03
#define TIMER2_CLK_DIV646   0x04
#define TIMER2_CLK_DIV128   0x05
#define TIMER2_CLK_DIV256   0x06
#define TIMER2_CLK_DIV1024   0x07
#define TIMER0OVERFLOW_INT   0
#define TIMER1OVERFLOW_INT   1
#define TIMER1OUTCOMPAREA_INT   2
#define TIMER1OUTCOMPAREB_INT   3
#define TIMER1INPUTCAPTURE_INT   4
#define TIMER2OVERFLOW_INT   5
#define TIMER2OUTCOMPARE_INT   6
#define TIMER_NUM_INTERRUPTS   7

Functions

void delay (unsigned short us)
void timerInit (void)
void timer0Init (void)
void timer1Init (void)
void timer2Init (void)
void timer0SetPrescaler (u08 prescale)
void timer1SetPrescaler (u08 prescale)
void timer2SetPrescaler (u08 prescale)
void timerAttach (u08 interruptNum, void(*userFunc)(void))
void timerDetach (u08 interruptNum)
void timerPause (unsigned short pause_ms)
void timer0ClearOverflowCount (void)
long timer0GetOverflowCount (void)
void timer2ClearOverflowCount (void)
long timer2GetOverflowCount (void)
void timer1PWMInit (u08 bitRes)
void timer1PWMOff (void)
void timer1PWMASet (u16 pwmDuty)
void timer1PWMBSet (u16 pwmDuty)
void timer2SetRTCMode (void)
void timer2EnableOutputCompare (void)
void timer2SetOutCompare (u08 compare)


Define Documentation

#define TIMER0OVERFLOW_INT   0
 

Definition at line 138 of file timer.h.

#define TIMER0PRESCALE   TIMER_CLK_DIV8
 

Definition at line 120 of file timer.h.

#define TIMER1INPUTCAPTURE_INT   4
 

Definition at line 142 of file timer.h.

#define TIMER1OUTCOMPAREA_INT   2
 

Definition at line 140 of file timer.h.

#define TIMER1OUTCOMPAREB_INT   3
 

Definition at line 141 of file timer.h.

#define TIMER1OVERFLOW_INT   1
 

Definition at line 139 of file timer.h.

#define TIMER1PRESCALE   TIMER_CLK_DIV64
 

Definition at line 121 of file timer.h.

#define TIMER2OUTCOMPARE_INT   6
 

Definition at line 144 of file timer.h.

#define TIMER2OVERFLOW_INT   5
 

Definition at line 143 of file timer.h.

#define TIMER2PRESCALE   TIMER_CLK_DIV64
 

Definition at line 122 of file timer.h.

#define TIMER2_CLK_DIV1   0x01
 

Definition at line 127 of file timer.h.

#define TIMER2_CLK_DIV1024   0x07
 

Definition at line 133 of file timer.h.

#define TIMER2_CLK_DIV128   0x05
 

Definition at line 131 of file timer.h.

#define TIMER2_CLK_DIV256   0x06
 

Definition at line 132 of file timer.h.

#define TIMER2_CLK_DIV32   0x03
 

Definition at line 129 of file timer.h.

#define TIMER2_CLK_DIV646   0x04
 

Definition at line 130 of file timer.h.

#define TIMER2_CLK_DIV8   0x02
 

Definition at line 128 of file timer.h.

#define TIMER2_CLK_STOP   0x00
 

Definition at line 126 of file timer.h.

#define TIMER_CLK_DIV1   0x01
 

Definition at line 108 of file timer.h.

#define TIMER_CLK_DIV1024   0x05
 

Definition at line 112 of file timer.h.

#define TIMER_CLK_DIV256   0x04
 

Definition at line 111 of file timer.h.

#define TIMER_CLK_DIV64   0x03
 

Definition at line 110 of file timer.h.

#define TIMER_CLK_DIV8   0x02
 

Definition at line 109 of file timer.h.

#define TIMER_CLK_STOP   0x00
 

Definition at line 107 of file timer.h.

#define TIMER_CLK_T_FALL   0x06
 

Definition at line 113 of file timer.h.

#define TIMER_CLK_T_RISE   0x07
 

Definition at line 114 of file timer.h.

#define TIMER_H
 

Value:

Definition at line 56 of file timer.h.

#define TIMER_NUM_INTERRUPTS   7
 

Definition at line 145 of file timer.h.

#define TIMER_PRESCALE_MASK   0x07
 

Definition at line 115 of file timer.h.


Function Documentation

void delay ( unsigned short us )
 

Definition at line 47 of file timer.c.

void timer0ClearOverflowCount ( void )
 

Definition at line 155 of file timer.c.

long timer0GetOverflowCount ( void )
 

Definition at line 162 of file timer.c.

void timer0Init ( void )
 

Definition at line 73 of file timer.c.

void timer0SetPrescaler ( u08 prescale )
 

Definition at line 104 of file timer.c.

Referenced by timer0Init().

void timer1Init ( void )
 

Definition at line 84 of file timer.c.

void timer1PWMASet ( u16 pwmDuty )
 

Definition at line 237 of file timer.c.

void timer1PWMBSet ( u16 pwmDuty )
 

Definition at line 248 of file timer.c.

void timer1PWMInit ( u08 bitRes )
 

Definition at line 184 of file timer.c.

void timer1PWMOff ( void )
 

Definition at line 222 of file timer.c.

void timer1SetPrescaler ( u08 prescale )
 

Definition at line 110 of file timer.c.

Referenced by timer1Init().

void timer2ClearOverflowCount ( void )
 

Definition at line 169 of file timer.c.

void timer2EnableOutputCompare ( void )
 

Definition at line 336 of file timer.c.

long timer2GetOverflowCount ( void )
 

Definition at line 176 of file timer.c.

void timer2Init ( void )
 

Definition at line 93 of file timer.c.

void timer2SetOutCompare ( u08 compare )
 

Definition at line 341 of file timer.c.

void timer2SetPrescaler ( u08 prescale )
 

Definition at line 116 of file timer.c.

Referenced by rtcInit(), and timer2Init().

void timer2SetRTCMode ( void )
 

Definition at line 331 of file timer.c.

void timerAttach ( u08 interruptNum,
void(* userFunc)(void) )
 

Definition at line 122 of file timer.c.

Referenced by pulseT1Init(), and rtcInit().

void timerDetach ( u08 interruptNum )
 

Definition at line 133 of file timer.c.

Referenced by pulseT1Off(), and timerInit().

void timerInit ( void )
 

Definition at line 58 of file timer.c.

void timerPause ( unsigned short pause_ms )
 

Definition at line 143 of file timer.c.

Referenced by debugFlash().


Generated at Fri Oct 25 15:36:38 2002 for avrlib by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001