timers.h 457 B

123456789101112131415161718192021
  1. #ifndef INCLUDE_TIMERS_H
  2. #define INCLUDE_TIMERS_H
  3. #ifdef __cplusplus
  4. extern
  5. "C" {
  6. #endif
  7. // TODO : Move these functions to C++ namespace
  8. // TODO : add defines/const values to make the modes more clearer to read
  9. void timer_init(unsigned timer);
  10. void timer_restore(unsigned timer);
  11. void timer_mode(unsigned timer, unsigned mode);
  12. void timer_load(unsigned timer, unsigned value);
  13. unsigned timer_read(unsigned timer);
  14. #ifdef __cplusplus
  15. }
  16. #endif
  17. #endif