drv_adc.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. * 2022-03-28 shelton first version
  9. */
  10. #ifndef __ADC_CONFIG_H__
  11. #define __ADC_CONFIG_H__
  12. #include <rtthread.h>
  13. #include <drivers/adc.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #if defined(BSP_USING_ADC1) || defined(BSP_USING_ADC2) || defined(BSP_USING_ADC3)
  18. #ifndef ADC1_CONFIG
  19. #define ADC1_CONFIG \
  20. { \
  21. .adc_x = ADC1, \
  22. .name = "adc1", \
  23. }
  24. #endif /* ADC1_CONFIG */
  25. #ifndef ADC2_CONFIG
  26. #define ADC2_CONFIG \
  27. { \
  28. .adc_x = ADC2, \
  29. .name = "adc2", \
  30. }
  31. #endif /* ADC2_CONFIG */
  32. #ifndef ADC3_CONFIG
  33. #define ADC3_CONFIG \
  34. { \
  35. .adc_x = ADC3, \
  36. .name = "adc3", \
  37. }
  38. #endif /* ADC3_CONFIG */
  39. #endif
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif /* __ADC_CONFIG_H__ */