drv_adc.h 622 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-06-03 BruceOu first implementation
  9. */
  10. #ifndef __DRV_ADC_H__
  11. #define __DRV_ADC_H__
  12. #include <rthw.h>
  13. #include <rtthread.h>
  14. #include <board.h>
  15. #include "drv_gpio.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* gd32 adc dirver class */
  20. struct gd32_adc
  21. {
  22. uint32_t adc_periph;
  23. rcu_periph_enum adc_clk;
  24. rt_base_t adc_pins[16];
  25. struct rt_adc_device *adc;
  26. char *device_name;
  27. };
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif /* __DRV_ADC_H__ */