Main Page   Compound List   File List   Compound Members   File Members  

timer.h

Go to the documentation of this file.
00001 #ifndef _TIMER_H_
00002 #define _TIMER_H_
00003 
00004 #include <io.h>
00005 
00006 enum {
00007   STOP             = 0,
00008   CK               = 1,
00009   CK8              = 2,
00010   CK64             = 3,
00011   CK256            = 4,
00012   CK1024           = 5,
00013   T0_FALLING_EDGE  = 6,
00014   T0_RISING_EDGE   = 7
00015 };
00016 
00017 static inline void timer0_source (unsigned int src)
00018 {
00019   outb (src, TCCR0);
00020 }
00021 
00022 static inline void timer0_stop (void)
00023 {
00024   outb (0, TCNT0);
00025 }
00026 
00027 static inline void timer0_start (void)
00028 {
00029   outb (0x1, TCNT0);
00030 }
00031 
00032 #endif /* _TIMER_H_ */

Generated at Fri Jul 19 14:55:42 2002 for avrgcc by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001