drv_adc.h 621 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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-10-19 Nations first version
  9. */
  10. #ifndef __DRV_ADC__
  11. #define __DRV_ADC__
  12. #include <rthw.h>
  13. #include <rtthread.h>
  14. #include <rtdevice.h>
  15. #include <board.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. struct n32_adc_config
  20. {
  21. const char *name;
  22. ADC_Module* adc_periph;
  23. };
  24. struct n32_adc
  25. {
  26. struct rt_adc_device adc_device;
  27. struct n32_adc_config *config;
  28. };
  29. int rt_hw_adc_init(void);
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif /* __DRV_ADC__ */