esp32/adc: Fix wrong mapping between ADC2 channel and GPIO number.
According to the IO_MUX table in the ESP32 datasheet, the ADC2 channels are mapped to different GPIO numbers.
This commit is contained in:
parent
eae2e3516c
commit
b18d4392b4
|
@ -50,16 +50,16 @@ STATIC const madc_obj_t madc_obj[] = {
|
|||
{{&machine_adc_type}, ADCBLOCK1, ADC_CHANNEL_5, GPIO_NUM_33},
|
||||
{{&machine_adc_type}, ADCBLOCK1, ADC_CHANNEL_6, GPIO_NUM_34},
|
||||
{{&machine_adc_type}, ADCBLOCK1, ADC_CHANNEL_7, GPIO_NUM_35},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_0, GPIO_NUM_0},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_1, GPIO_NUM_2},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_2, GPIO_NUM_4},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_3, GPIO_NUM_12},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_0, GPIO_NUM_4},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_1, GPIO_NUM_0},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_2, GPIO_NUM_2},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_3, GPIO_NUM_15},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_4, GPIO_NUM_13},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_5, GPIO_NUM_14},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_6, GPIO_NUM_15},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_7, GPIO_NUM_25},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_8, GPIO_NUM_26},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_9, GPIO_NUM_27},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_5, GPIO_NUM_12},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_6, GPIO_NUM_14},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_7, GPIO_NUM_27},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_8, GPIO_NUM_25},
|
||||
{{&machine_adc_type}, ADCBLOCK2, ADC_CHANNEL_9, GPIO_NUM_26},
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
{{&machine_adc_type}, ADCBLOCK1, ADC_CHANNEL_0, GPIO_NUM_0},
|
||||
{{&machine_adc_type}, ADCBLOCK1, ADC_CHANNEL_1, GPIO_NUM_1},
|
||||
|
|
Loading…
Reference in New Issue