adc_config.h 707 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-08-19 Mr.Tiger first version
  9. */
  10. #ifndef __ADC_CONFIG_H__
  11. #define __ADC_CONFIG_H__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #include "hal_data.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #if defined(BSP_USING_ADC0) || defined(BSP_USING_ADC1)
  19. struct rt_adc_dev
  20. {
  21. struct rt_adc_ops ops;
  22. struct rt_adc_device adc_device;
  23. };
  24. struct ra_adc_map
  25. {
  26. const char *device_name;
  27. const adc_cfg_t *g_cfg;
  28. const adc_ctrl_t *g_ctrl;
  29. const adc_channel_cfg_t *g_channel_cfg;
  30. };
  31. #endif
  32. #endif
  33. #ifdef __cplusplus
  34. }
  35. #endif