drv_adc.h 667 B

123456789101112131415161718192021222324252627282930
  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_DRV_ADC_H_
  11. #define DRIVERS_DRV_ADC_H_
  12. #ifdef BSP_ADC_USING_12BIT
  13. #define ADC_RESOLUTION ADC_RESOLUTION_12BIT
  14. #else
  15. #define ADC_RESOLUTION ADC_RESOLUTION_16BIT
  16. #endif
  17. #include "rtdevice.h"
  18. #ifdef BSP_USING_ADC
  19. struct c28x_adc
  20. {
  21. struct rt_adc_device c28x_adc_device;
  22. volatile struct ADC_REGS *adc_regs;
  23. volatile struct ADC_RESULT_REGS *adc_results;
  24. const char *name;
  25. };
  26. #endif /* BSP_USING_ADC */
  27. #endif /* DRIVERS_DRV_ADC_H_ */