drv_hwtimer.h 582 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2029-05-06 hqfang first implementation.
  9. */
  10. #ifndef __DRV_HWTIMER__
  11. #define __DRV_HWTIMER__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #include <rthw.h>
  15. #include <drv_config.h>
  16. /* gd32 config class */
  17. struct gd32_hwtimer_config
  18. {
  19. const char *name;
  20. rt_uint32_t timer_periph;
  21. IRQn_Type irqn;
  22. };
  23. struct gd32_hwtimer
  24. {
  25. rt_hwtimer_t time_device;
  26. struct gd32_hwtimer_config *config;
  27. };
  28. #endif