Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

timerx8.c File Reference

Detailed Description

Definition in file timerx8.c.

#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <avr/sleep.h>
#include "global.h"
#include "timerx8.h"

Go to the source code of this file.


typedef void(* voidFuncPtr )(void)


unsigned short __attribute__ ((progmem))
void delay_us (unsigned short time_us)
void timerInit (void)
 initializes timing system (all timers)
void timer0Init ()
 initialize timer0
void timer1Init (void)
 initialize timer1
void timer0SetPrescaler (u08 prescale)
 set timer0 prescaler
void timer1SetPrescaler (u08 prescale)
 set timer1 prescaler
u16 timer0GetPrescaler (void)
 get timer0 prescaler
u16 timer1GetPrescaler (void)
 get timer0 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)
void timer0ClearOverflowCount (void)
 Clear timer0's overflow counter.
long timer0GetOverflowCount (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
 Interrupt handler for tcnt0 overflow interrupt.
 Interrupt handler for tcnt1 overflow interrupt.
 Interrupt handler for CutputCompare1A match (OC1A) interrupt.
 Interrupt handler for OutputCompare1B match (OC1B) interrupt.
 Interrupt handler for InputCapture1 (IC1) interrupt.
 Interrupt handler for OutputCompare2A match (OC2A) interrupt.
 Interrupt handler for OutputCompare2B match (OC2B) interrupt.


volatile unsigned long TimerPauseReg
volatile unsigned long Timer0Reg0
volatile unsigned long Timer2Reg0

Generated on Sun Oct 29 03:41:09 2006 for Procyon AVRlib by  doxygen 1.4.2