drv_hwtimer.h 700 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-01-15 iysheng first release
  9. */
  10. #ifndef __DRV_HWTIMER_H__
  11. #define __DRV_HWTIMER_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #include <drivers/hwtimer.h>
  16. typedef struct {
  17. TIMER_TypeDef *reg_base;
  18. IRQn_Type irqn;
  19. rcu_periph_enum rcu;
  20. } gd32_hwtimer_data;
  21. typedef struct {
  22. char dev_name[RT_NAME_MAX];
  23. const gd32_hwtimer_data hw_data;
  24. rt_hwtimer_t hwtimer_dev;
  25. const struct rt_hwtimer_info hwtimer_info;
  26. } gd32_hwtimer_device;
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif /* __DRV_HWTIMER_H__ */