Naze32 clone with Frysky receiver
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

timer.h 342B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Time-Keeping helper
  3. */
  4. #ifndef _TIMER_H
  5. #define _TIMER_H
  6. #include <stdint.h>
  7. #ifdef __AVR__
  8. #include <util/delay.h>
  9. #define delay_us(x) _delay_us(x)
  10. #define delay_ms(x) _delay_ms(x)
  11. #else
  12. // TODO!!!
  13. #define delay_us(x)
  14. #define delay_ms(x)
  15. #endif
  16. typedef uint64_t time_t;
  17. void timerInit(void);
  18. time_t timerGet(void);
  19. #endif