adc_config.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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-07 qiyu first version
  9. */
  10. #ifndef DRIVERS_CONFIG_ADC_CONFIG_H_
  11. #define DRIVERS_CONFIG_ADC_CONFIG_H_
  12. #include "F28x_Project.h" // Device Headerfile and Examples Include File
  13. #include "F2837xD_adc.h"
  14. #include "rtthread.h"
  15. #include "drv_config.h"
  16. #define BSP_USING_ADC1
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #ifdef BSP_USING_ADC1
  21. #ifndef ADC1_CONFIG
  22. #define ADC1_CONFIG \
  23. { \
  24. .name = "adc1", \
  25. .adc_regs = &AdcaRegs, \
  26. .adc_results = &AdcaResultRegs, \
  27. }
  28. #endif
  29. #endif
  30. #ifdef BSP_USING_ADC2
  31. #ifndef ADC2_CONFIG
  32. #define ADC2_CONFIG \
  33. { \
  34. .name = "adc2", \
  35. .adc_regs = &AdcbRegs, \
  36. .adc_results = &AdcbResultRegs \
  37. }
  38. #endif
  39. #endif
  40. #ifdef BSP_USING_ADC3
  41. #ifndef ADC3_CONFIG
  42. #define ADC3_CONFIG \
  43. { \
  44. .name = "adc3", \
  45. .adc_regs = &AdccRegs, \
  46. .adc_results = &AdccResultRegs \
  47. }
  48. #endif
  49. #endif
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* DRIVERS_CONFIG_ADC_CONFIG_H_ */