adc_config.h 710 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2006-2021, 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 ra_adc_map
  20. {
  21. char name;
  22. const adc_cfg_t *g_cfg;
  23. const adc_instance_ctrl_t *g_ctrl;
  24. const adc_channel_cfg_t *g_channel_cfg;
  25. };
  26. struct ra_dev
  27. {
  28. rt_adc_device_t ra_adc_device_t;
  29. struct ra_adc_map *ra_adc_dev;
  30. };
  31. #endif
  32. #endif
  33. #ifdef __cplusplus
  34. }
  35. #endif