app_specific/include/timer_user.h File Reference

System timer configuration. More...

Defines

#define os_timers_init()
 timer initialization function
#define os_timers_start()
 runs timers
#define os_timers_stop()   TA0CTL &= (~0x0030)
 stops timers

Detailed Description

System timer configuration.

Author:
Piotr Romaniuk, (c) ELESOFTROM
Version:
1.0 Jan 24, 2011

Define Documentation

#define os_timers_init ( )

timer initialization function

Initialization of tick interrupt. The initialization may be moved to os_timers_start(). Add here other initialization if is required. This function should be called from user code at the beginning, when is non-empty.

#define os_timers_start ( )
Value:
do{\
         TA0CTL = MC_1 /*Up to CCR0 */\
                  | ID__1 /* Input divider 1 */\
                  | TASSEL__ACLK /* clock select ACLK */\
                  | TACLR ;\
         TA0CCR0 = 29;\
         TA0CCTL0 = CCIE;\
}while(0)

runs timers

The macro starts hardware timer and enables hardware interrupts. It may contain timer setup.

#define os_timers_stop ( )    TA0CTL &= (~0x0030)

stops timers

The macro stops hardware timer used for tick interrupt.