summaryrefslogtreecommitdiff
path: root/bsp/at32/Libraries/rt_drivers/drv_adc.h
blob: d113d1338af9cf6dcde41da925941ab379c4213c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * Copyright (c) 2006-2018, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2018-12-07     Leo         first version
 */

#ifndef __ADC_CONFIG_H__
#define __ADC_CONFIG_H__

#include <rtthread.h>
#include <drivers/adc.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(BSP_USING_ADC1) || defined(BSP_USING_ADC2) || defined(BSP_USING_ADC3)
  
#ifndef ADC1_CONFIG
#define ADC1_CONFIG                 \
    {                              \
       .ADC_Handler = ADC1,        \
       .name        = "adc1",      \
    }  
#endif /* ADC1_CONFIG */
    
#ifndef ADC2_CONFIG
#define ADC2_CONFIG                \
    {                              \
       .ADC_Handler = ADC2,        \
       .name        = "adc2",      \
    }  
#endif /* ADC2_CONFIG */
    
#ifndef ADC3_CONFIG
#define ADC3_CONFIG                \
    {                              \
       .ADC_Handler = ADC3,        \
       .name        = "adc3",      \
    }  
#endif /* ADC3_CONFIG */    
    
#endif  


#ifdef __cplusplus
}
#endif

#endif /* __ADC_CONFIG_H__ */