File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed
libraries/HAL_Drivers/drivers/config Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ extern "C"
9292#include "ra2e2/pwm_config.h"
9393#endif
9494
95+ #ifdef BSP_USING_ADC
96+ #include "ra2e2/adc_config.h"
97+ #endif
98+
9599#endif /* SOC_SERIES_R7FA2E2 */
96100
97101#ifdef SOC_SERIES_R7FA2L1
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2006-2025, RT-Thread Development Team
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ *
6+ * Change Logs:
7+ * Date Author Notes
8+ * 2025-08-17 CYFS first version
9+ */
10+
11+ #ifndef __ADC_CONFIG_H__
12+ #define __ADC_CONFIG_H__
13+
14+ #include <rtthread.h>
15+ #include <rtdevice.h>
16+ #include "hal_data.h"
17+ #ifdef __cplusplus
18+ extern "C" {
19+ #endif
20+
21+ #if defined(BSP_USING_ADC0 )
22+
23+ struct rt_adc_dev
24+ {
25+ struct rt_adc_ops ops ;
26+ struct rt_adc_device adc_device ;
27+ };
28+
29+ struct ra_adc_map
30+ {
31+ const char * device_name ;
32+ const adc_cfg_t * g_cfg ;
33+ const adc_ctrl_t * g_ctrl ;
34+ const adc_channel_cfg_t * g_channel_cfg ;
35+ };
36+ #endif
37+ #endif
38+
39+ #ifdef __cplusplus
40+ }
41+ #endif
42+
Original file line number Diff line number Diff line change @@ -93,6 +93,16 @@ menu "Hardware Drivers Config"
9393 default n
9494
9595 endif
96+
97+ menuconfig BSP_USING_ADC
98+ bool "Enable ADC"
99+ default n
100+ select RT_USING_ADC
101+ if BSP_USING_ADC
102+ config BSP_USING_ADC0
103+ bool "Enable ADC0"
104+ default n
105+ endif
96106
97107 endmenu
98108
You can’t perform that action at this time.
0 commit comments