2011-07-24 13:44:35 +00:00
|
|
|
#define MAXQENTRIES 8
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
void (*callback)(void);
|
|
|
|
} QENTRY;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int qstart;
|
|
|
|
int qend;
|
|
|
|
QENTRY queue[MAXQENTRIES];
|
|
|
|
} QUEUE;
|
|
|
|
|
|
|
|
extern QUEUE the_queue;
|
|
|
|
extern volatile uint32_t _timectr;
|
|
|
|
|
|
|
|
void work_queue(void);
|
2011-07-24 14:03:19 +00:00
|
|
|
void delayms_queue(uint32_t delayms);
|
|
|
|
void delayms_power(uint32_t delayms);
|
2011-07-24 13:44:35 +00:00
|
|
|
int push_queue(void (*new)(void));
|
|
|
|
int magic(void *new);
|
|
|
|
#define incTimer(void) do{_timectr++;}while(0);
|
|
|
|
|
|
|
|
|