mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/adc_outof_bound_read_v5.0' into 'release/v5.0'
adc: fix out of bound read See merge request espressif/esp-idf!24170
This commit is contained in:
commit
e37618cda7
@ -104,7 +104,7 @@ static void adc_dma_intr_handler(void *arg);
|
||||
|
||||
static int8_t adc_digi_get_io_num(adc_unit_t adc_unit, uint8_t adc_channel)
|
||||
{
|
||||
assert(adc_unit <= SOC_ADC_PERIPH_NUM);
|
||||
assert(adc_unit < SOC_ADC_PERIPH_NUM);
|
||||
uint8_t adc_n = (adc_unit == ADC_UNIT_1) ? 0 : 1;
|
||||
return adc_channel_io_map[adc_n][adc_channel];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user