Main Page   Data Structures   File List   Data Fields   Globals  

/timer.c File Reference

System Timer function library. More...

#include <avr/io.h>
#include <avr/signal.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "global.h"
#include "timer.h"

Go to the source code of this file.

Functions

void timerInit (void)
 initializes timing system (all timers)

void timer0Init ()
 initialize timer0

void timer1Init (void)
 initialize timer1

void timer2Init (void)
 initialize timer2

void timer0SetPrescaler (u08 prescale)
 set timer0 prescaler

void timer1SetPrescaler (u08 prescale)
 set timer1 prescaler

void timer2SetPrescaler (u08 prescale)
 set timer2 prescaler

void timerAttach (u08 interruptNum, void(*userFunc)(void))
 Attach a user function to a timer interrupt.

void timerDetach (u08 interruptNum)
 Detach a user function from a timer interrupt.

void timerPause (unsigned short pause_ms)
 timerPause pauses for the number of milliseconds specified in <pause_ms>

void timer0ClearOverflowCount (void)
 clear timer0's overflow counter

long timer0GetOverflowCount (void)
 read timer0's overflow counter

void timer2ClearOverflowCount (void)
 clear timer2's overflow counter

long timer2GetOverflowCount (void)
 read timer0's overflow counter

void timer1PWMInit (u08 bitRes)
 initialize and set timer1 mode to PWM

void timer1PWMOff (void)
 turn off all timer1 PWM output and set timer mode to normal

void timer1PWMAOn (void)
 turn on timer1 Channel A (OC1A) PWM output

void timer1PWMBOn (void)
 turn on timer1 Channel B (OC1B) PWM output

void timer1PWMAOff (void)
 turn off timer1 Channel A (OC1A) PWM output

void timer1PWMBOff (void)
 turn off timer1 Channel B (OC1B) PWM output

void timer1PWMASet (u16 pwmDuty)
 set duty of timer1 Channel A (OC1A) PWM output

void timer1PWMBSet (u16 pwmDuty)
 set duty of timer1 Channel B (OC1B) PWM output

 TIMER_INTERRUPT_HANDLER (SIG_OVERFLOW0)
 Interrupt handler for tcnt0 overflow interrupt.


Detailed Description

System Timer function library.

Definition in file timer.c.


Generated on Fri Aug 1 10:42:43 2003 for Procyon AVRlib by doxygen1.2.18