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.
49 lines
864 B
49 lines
864 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);
|
|
|
|
struct timer_list *timer_list_match(int (*match)(void *user, void *arg), void *arg, void **r);
|
|
|
|
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
|
|
|
|
#if (TARGET_HAS_TIM4)
|
|
extern struct timer timer3;
|
|
#endif
|
|
|
|
#if (TARGET_HAS_TIM5)
|
|
extern struct timer timer4;
|
|
#endif
|
|
|
|
#if (TARGET_HAS_TIM6)
|
|
extern struct timer timer5;
|
|
#endif
|
|
|
|
#if (TARGET_HAS_TIM7)
|
|
extern struct timer timer6;
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|