test_user.h 921 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include "Cadence.h"
  2. #include "bikespeed.h"
  3. #include "torquesensor.h"
  4. #include "canAppl.h"
  5. #include "hwsetup.h"
  6. #include "typedefine.h"
  7. #ifndef _TEST_USER_H_
  8. #define _TEST_USER_H_
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif // __cplusplus
  12. #define TIMER1 1
  13. #define TIMER_INT_FLAG_UP 0
  14. #define TIMER_INT_FLAG_CH1 1
  15. #define TIMER_INT_FLAG_CH2 2
  16. #define TIMER_INT_FLAG_CH3 3
  17. #define GPIOB 1
  18. #define GPIOC 2
  19. #define TIMER_CH2CV(timex) testCh2CapValue[timex]
  20. #define TIMER_CH3CV(timex) testCh3CapValue[timex]
  21. #define GPIO_ISTAT(gpiox) testGpioBValue[gpiox]
  22. #define abs(x) ((x) >= 0 ? (x) : (-(x)))
  23. extern int testTimerIntFlg[2][4];
  24. extern int testCh2CapValue[2];
  25. extern int testCh3CapValue[2];
  26. extern int testGpioBValue[2];
  27. int timer_interrupt_flag_get(int timer_periph, int interrupt);
  28. void timer_interrupt_flag_clear(int timer_periph, int interrupt);
  29. #ifdef __cplusplus
  30. }
  31. #endif // __cplusplus
  32. #endif