moved timer.c and .h into tmr.c and .h so that these names don't

conflict with the timers in Contiki.
This commit is contained in:
Mariano Alvira 2011-01-17 10:08:40 -05:00
parent 53e4a06ac9
commit 377f849a02
3 changed files with 15 additions and 54 deletions

View file

@ -239,4 +239,18 @@ static volatile struct TMR_struct * const TMR3 = (void *) (TMR3_BASE);
#endif /* REG_NO_COMPAT */
/* Initialize timer. This just counts and interrupts, doesn't drive an output.
timer_num = 0, 1, 2, 3
rate = desired rate in Hz,
enable_int = whether to enable an interrupt on every cycle
Returns actual timer rate. */
uint32_t timer_setup_ex(int timer_num, uint32_t rate, int enable_int);
/* Initialize timer. This just counts and interrupts, doesn't drive an output.
timer = TMR0, TMR1, TMR2, TMR3
rate = desired rate in Hz,
enable_int = whether to enable an interrupt on every cycle
Returns actual timer rate. */
#define timer_setup(timer,rate,enable_int) timer_setup_ex(TMR_NUM(timer), rate, enable_int)
#endif