adc_config.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. * 2020-06-27 AHTYDHD the first version
  9. */
  10. #ifndef __ADC_CONFIG_H__
  11. #define __ADC_CONFIG_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #ifdef BSP_USING_ADC0
  16. #ifndef ADC0_CONFIG
  17. #define ADC0_CONFIG \
  18. { \
  19. .name ="adc0", \
  20. .adcbase = ADC0_BASE, \
  21. .channel = 0 , \
  22. .sequence = 2 , \
  23. .trigermode = ADC_TRIGGER_PROCESSOR, \
  24. .sequencepriority = 0 \
  25. }
  26. #endif /* ADC0_CONFIG */
  27. #endif /* BSP_USING_ADC0 */
  28. #ifdef BSP_USING_ADC1
  29. #ifndef ADC1_CONFIG
  30. #define ADC1_CONFIG \
  31. { \
  32. .name = "adc1", \
  33. .adcbase = ADC1_BASE, \
  34. .channel = 0 , \
  35. .sequence = 3 , \
  36. .syncMode = ADC_TRIGGER_PROCESSOR, \
  37. .sequencepriority = 0 \
  38. }
  39. #endif /* ADC1_CONFIG */
  40. #endif /* BSP_USING_ADC1 */
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif /*__ADC_CONFIG_H__*/
  45. /************************** end of file ******************/