openchronos-ng
opensource firmware for the ez430 chronos
timer.h
Go to the documentation of this file.
00001 
00008 #include <openchronos.h>
00009 
00010 #ifndef __TIMER_H__
00011 #define __TIMER_H__
00012 
00019 void timer0_init(void);
00020 
00026 volatile uint16_t timer0_20hz_counter;
00027 
00034 void timer0_create_prog_timer(
00035         uint16_t duration 
00036 );
00037 
00042 void timer0_destroy_prog_timer();
00043 
00050 void timer0_delay(
00051         uint16_t duration, 
00052                         uint16_t LPM_bits  
00053 );
00054 
00058 enum timer0_event {
00059         TIMER0_EVENT_1HZ        = BIT0, 
00060         TIMER0_EVENT_20HZ       = BIT1, 
00061         TIMER0_EVENT_PROG       = BIT2  
00062 };
00063 
00070 volatile enum timer0_event timer0_last_event;
00071 
00072 #endif /* __TIMER_H__ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines