rt-thread-official/bsp/mb9bf500r/adc.h

29 lines
798 B
C
Raw Normal View History

2013-01-08 22:40:58 +08:00
/*
2021-03-21 23:31:45 +08:00
* Copyright (c) 2006-2021, RT-Thread Development Team
2013-01-08 22:40:58 +08:00
*
2021-03-21 23:31:45 +08:00
* SPDX-License-Identifier: Apache-2.0
2013-01-08 22:40:58 +08:00
*
* Change Logs:
* Date Author Notes
* 2011-03-03 lgnq
*/
2021-03-21 23:31:45 +08:00
2013-01-08 22:40:58 +08:00
#ifndef __ADC_H__
#define __ADC_H__
/* Exported constants ---------------------------------------------------------*/
/* Exported macro -------------------------------------------------------------*/
2021-03-21 23:31:45 +08:00
#define ADC_MODE_SINGLE 0x00UL
#define ADC_MODE_SCAN 0x01UL
#define ADC_MODE_TAILGATE 0x02UL
2013-01-08 22:40:58 +08:00
#define RT_DEVICE_CTRL_ADC_START 0xF1 /* start ADC conversion */
2021-03-21 23:31:45 +08:00
#define RT_DEVICE_CTRL_ADC_RESULT 0xF2 /* get ADC result */
2013-01-08 22:40:58 +08:00
#define ADC_UPDATE 0
/* Exported functions --------------------------------------------------------- */
void rt_hw_adc_init(void);
#endif /*__ADC_H__ */