timer.h 551 B

1234567891011121314151617181920212223
  1. #ifndef _NAS782X_TIMER_H
  2. #define _NAS782X_TIMER_H
  3. #define TIMER1_BASE (RPSA_BASE + 0x200)
  4. #define TIMER2_BASE (RPSA_BASE + 0x220)
  5. #define TIMER_LOAD 0
  6. #define TIMER_CURR 4
  7. #define TIMER_CTRL 8
  8. #define TIMER_INTR 0x0C
  9. #define TIMER_PRESCALE_SHIFT 2
  10. #define TIMER_PRESCALE_1 0
  11. #define TIMER_PRESCALE_16 1
  12. #define TIMER_PRESCALE_256 2
  13. #define TIMER_MODE_SHIFT 6
  14. #define TIMER_MODE_FREE_RUNNING 0
  15. #define TIMER_MODE_PERIODIC 1
  16. #define TIMER_ENABLE_SHIFT 7
  17. #define TIMER_DISABLE 0
  18. #define TIMER_ENABLE 1
  19. #endif /* _NAS782X_TIMER_H */