1 // Copyright (C) 2022 Beken Corporation 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 #include <stdio.h> 21 #include <soc/soc.h> 22 #include <driver/hal/hal_adc_types.h> 23 #include <driver/hal/hal_gpio_types.h> 24 25 #define INVALID GPIO_NUM 26 27 #define ADC_DEV_MAP \ 28 {\ 29 {0, INVALID, INVALID},\ 30 {ADC_1, GPIO_26, GPIO_DEV_ADC1},\ 31 {ADC_2, GPIO_24, GPIO_DEV_ADC2},\ 32 {ADC_3, GPIO_23, GPIO_DEV_ADC3},\ 33 {ADC_4, GPIO_28, GPIO_DEV_ADC4},\ 34 {ADC_5, GPIO_22, GPIO_DEV_ADC5},\ 35 {ADC_6, GPIO_21, GPIO_DEV_ADC6},\ 36 {ADC_7, INVALID, INVALID},\ 37 {ADC_8, INVALID, INVALID},\ 38 {ADC_9, INVALID, INVALID},\ 39 {ADC_10, GPIO_44, GPIO_DEV_ADC10},\ 40 {ADC_11, GPIO_45, GPIO_DEV_ADC11},\ 41 } 42 43 #ifdef __cplusplus 44 } 45 #endif 46