Keyboard firmwares for Atmel AVR and Cortex-M
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617
  1. #ifndef TIMER_H
  2. #define TIMER_H 1
  3. #include <stdint.h>
  4. #define TIMER_DIFF(a, b) ((a) >= (b) ? (a) - (b) : UINT16_MAX - (b) + (a))
  5. extern volatile uint16_t timer_count;
  6. void timer_init(void);
  7. void timer_clear(void);
  8. uint16_t timer_read(void);
  9. uint16_t timer_elapsed(uint16_t last);
  10. #endif