1
0
Fork 0

improve layer switching

This commit is contained in:
tmk 2010-10-29 15:17:18 +09:00
parent 6c3b9a2ded
commit 45d4a7a898
21 changed files with 290 additions and 229 deletions

17
timer.h Normal file
View file

@ -0,0 +1,17 @@
#ifndef TIMER_H
#define TIMER_H 1
#include <stdint.h>
#define TIMER_DIFF(a, b) ((a) >= (b) ? (a) - (b) : UINT16_MAX - (b) + (a))
extern uint16_t timer_count;
void timer_init(void);
void timer_clear(void);
uint16_t timer_read(void);
uint16_t timer_elapsed(uint16_t last);
#endif