api_rt_timer.h 436 B

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