adc.h 982 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * File : adc.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2011, RT-Thread Develop Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2011-03-03 lgnq
  13. */
  14. #ifndef __ADC_H__
  15. #define __ADC_H__
  16. /* Exported constants ---------------------------------------------------------*/
  17. /* Exported macro -------------------------------------------------------------*/
  18. #define ADC_MODE_SINGLE 0x00UL
  19. #define ADC_MODE_SCAN 0x01UL
  20. #define ADC_MODE_TAILGATE 0x02UL
  21. #define RT_DEVICE_CTRL_ADC_START 0xF1 /* start ADC conversion */
  22. #define RT_DEVICE_CTRL_ADC_RESULT 0xF2 /* get ADC result */
  23. #define ADC_UPDATE 0
  24. /* Exported functions --------------------------------------------------------- */
  25. void rt_hw_adc_init(void);
  26. #endif /*__ADC_H__ */