Timers.h 462 B

123456789101112131415161718192021
  1. #ifndef INCLUDE_TIMERS_H
  2. #define INCLUDE_TIMERS_H
  3. #include <cstdint>
  4. #define TIMER_FREQ 32768
  5. namespace WalrusRPG
  6. {
  7. namespace Timers
  8. {
  9. void init(uint32_t timer);
  10. void restore(uint32_t timer);
  11. void mode(uint32_t timer, bool free_run, bool oneshot, bool interrupt,
  12. uint32_t div, bool full_width_counter);
  13. void load(uint32_t timer, uint32_t value);
  14. uint32_t read(uint32_t timer);
  15. }
  16. }
  17. #endif