2020-07-01 23:44:57 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2019, RT-Thread Development Team
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-06-27 AHTYDHD the first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ADC_CONFIG_H__
|
|
|
|
#define __ADC_CONFIG_H__
|
2020-06-24 19:54:42 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BSP_USING_ADC0
|
|
|
|
#ifndef ADC0_CONFIG
|
|
|
|
#define ADC0_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name ="adc0", \
|
|
|
|
.adcbase = ADC0_BASE, \
|
|
|
|
.channel = 0 , \
|
2020-07-02 14:43:10 +08:00
|
|
|
.sequence = 2 , \
|
|
|
|
.trigermode = ADC_TRIGGER_PROCESSOR, \
|
2020-06-24 19:54:42 +08:00
|
|
|
.sequencepriority = 0 \
|
|
|
|
}
|
|
|
|
#endif /* ADC0_CONFIG */
|
|
|
|
#endif /* BSP_USING_ADC0 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_ADC1
|
|
|
|
#ifndef ADC1_CONFIG
|
|
|
|
#define ADC1_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "adc1", \
|
|
|
|
.adcbase = ADC1_BASE, \
|
|
|
|
.channel = 0 , \
|
2020-07-02 14:43:10 +08:00
|
|
|
.sequence = 3 , \
|
|
|
|
.syncMode = ADC_TRIGGER_PROCESSOR, \
|
2020-06-24 19:54:42 +08:00
|
|
|
.sequencepriority = 0 \
|
|
|
|
}
|
|
|
|
#endif /* ADC1_CONFIG */
|
2020-07-02 14:43:10 +08:00
|
|
|
#endif /* BSP_USING_ADC1 */
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
#endif /*__ADC_CONFIG_H__*/
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
/************************** end of file ******************/
|