drv_adc.h 547 B

1234567891011121314151617181920212223242526272829303132
  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. * 2020-06-03 hqfang first implementation.
  9. */
  10. #ifndef __DRV_ADC__
  11. #define __DRV_ADC__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #include <rthw.h>
  15. #include <drv_config.h>
  16. /* gd32 config class */
  17. struct gd32_adc_config
  18. {
  19. const char *name;
  20. rt_uint32_t adc_periph;
  21. };
  22. struct gd32_adc
  23. {
  24. struct rt_adc_device adc_device;
  25. struct gd32_adc_config *config;
  26. };
  27. #endif