Main Page | File List | Globals

timer.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define TB0_PERIOD_MAX   1000000

Functions

void init_timer_a (void)
void init_timer_b (void)

Variables

volatile unsigned long vspeed4_period_uS
volatile int vspeed4_data_ready
volatile int tick_10mS


Define Documentation

#define TB0_PERIOD_MAX   1000000
 

Definition at line 53 of file timer.h.

Referenced by interrupt().


Function Documentation

void init_timer_a void   ) 
 

Definition at line 54 of file timer.c.

Referenced by init_bsp().

00054                         {
00055   // SMCLK/8 SOURCE 
00056   // Timer in Continuous Mode 
00057   // 1mS interrupt rate 
00058   TACTL=TASSEL1|ID1|ID0|MC1|TACLR; 
00059   TACCTL0=CCIE;            
00060   TACCR0=50000;              
00061 }

void init_timer_b void   ) 
 

Definition at line 68 of file timer.c.

Referenced by init_bsp().

00068                         {
00069   // Timer Setup
00070   TBCTL = TBSSEL1+ID1+ID0+TBIE;          // SMCLK/8, Enable the Timer B interrupt, Timer off
00071 
00072   // TB0 Capture Setup 
00073   TBCCTL0 = CM0+CCIS0+SCS+CAP+CCIE;      // Rising Edge, Synchronize, Enable Interrupt   
00074   TBCCTL3 = CM0+CCIS0+SCS+CAP+CCIE;      // Rising Edge, Synchronize, Enable Interrupt   
00075 
00076   // Start Timer B 
00077   TBCTL |= MC1;                          // Continuous 16 bit counter mode 
00078 }


Variable Documentation

volatile int tick_10mS
 

Definition at line 52 of file timer.c.

Referenced by interrupt().

volatile int vspeed4_data_ready
 

Definition at line 51 of file timer.c.

Referenced by interrupt().

volatile unsigned long vspeed4_period_uS
 

Definition at line 50 of file timer.c.

Referenced by interrupt().


Generated on Fri Nov 3 14:40:13 2006 for hwiflib by  doxygen 1.3.9.1