You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
536 B

#ifndef __TIMER_H___
#define __TIMER_H___
#include "config.h"
struct timer;
int timer_setup(struct timer *tm, unsigned int ms, int (*irq)(struct timer *, void *user), void *user);
void timer_start(struct timer *tm);
void timer_set_period(struct timer *tm, unsigned int ms);
void timer_stop(struct timer *tm);
void timer_close(struct timer *tm);
#if (TARGET_HAS_TIM1)
extern struct timer timer0;
#endif
#if (TARGET_HAS_TIM2)
extern struct timer timer1;
#endif
#if (TARGET_HAS_TIM3)
extern struct timer timer2;
#endif
#endif