25 lines
440 B
C
25 lines
440 B
C
#ifndef AT91_PITC_H_
|
|
#define AT91_PITC_H_
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include "list.h"
|
|
|
|
#define PITC_RESTART_TIMER 0
|
|
#define PITC_REMOVE_TIMER 1
|
|
|
|
struct pitc_timer {
|
|
struct list_head list;
|
|
uint32_t interval;
|
|
uint32_t nextrun;
|
|
uint32_t (*func)(struct pitc_timer *);
|
|
void *privdata;
|
|
};
|
|
|
|
void pitc_schedule_timer(struct pitc_timer *timer);
|
|
|
|
uint32_t pitc_get_ticks(void);
|
|
void at91_pitc_init(void);
|
|
|
|
#endif /*AT91_PITC_H_*/
|