api_rt_timer.h 457 B

1234567891011121314151617181920212223
  1. #ifndef _API_RT_TIMER_H_
  2. #define _API_RT_TIMER_H_
  3. #include "api_timer.h"
  4. #include <stdint.h>
  5. #include "api_rt_common.h"
  6. #include "gd32f30x.h"
  7. #define GENERAL_TIMER_COUNT 3
  8. #define SYSTEM_TICK_TIMER_INDEX GENERAL_TIMER_COUNT
  9. typedef struct
  10. {
  11. uint32_t TimerBase;
  12. ApiRt_Interrupt TickISR;
  13. } ApiRtTimer_Handle;
  14. extern ApiRtTimer_Handle Timers[GENERAL_TIMER_COUNT + 1];
  15. void iRtTimer_Init();
  16. void iRtTimer_Isr(uint8_t devIndex);
  17. #endif