drv_hwtimer.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-04-17 WangBing the first version.
  9. */
  10. #ifndef DRV_HWTIMER_H__
  11. #define DRV_HWTIMER_H__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #ifdef BSP_USING_CTIMER0
  15. #define TIM1_CONFIG \
  16. { \
  17. .tim_handle = CTIMER0, \
  18. .tim_irqn = CTIMER0_IRQn, \
  19. .name = "timer1", \
  20. }
  21. #endif /* TIM1_CONFIG */
  22. #ifdef BSP_USING_CTIMER3
  23. #define TIM3_CONFIG \
  24. { \
  25. .tim_handle = CTIMER3, \
  26. .tim_irqn = CTIMER3_IRQn, \
  27. .name = "timer2", \
  28. }
  29. #endif /* TIM3_CONFIG */
  30. #ifdef BSP_USING_CTIMER4
  31. #define TIM4_CONFIG \
  32. { \
  33. .tim_handle = CTIMER4, \
  34. .tim_irqn = CTIMER4_IRQn, \
  35. .name = "timer3", \
  36. }
  37. #endif /* TIM4_CONFIG */
  38. int rt_hw_hwtimer_init(void);
  39. #endif /* __DRV_HWTIMER_H__ */