mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-25 12:46:41 +00:00
18 lines
295 B
C
18 lines
295 B
C
#ifndef TIMER_H
|
|
#define TIMER_H 1
|
|
|
|
#include <stdint.h>
|
|
|
|
#define TIMER_DIFF(a, b) ((a) >= (b) ? (a) - (b) : UINT16_MAX - (b) + (a))
|
|
|
|
|
|
extern volatile 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
|