Merge pull request #8462 from tannewt/fix_adc_pin_test_idf5

Fix pin adc unit check
This commit is contained in:
Mark 2023-10-06 18:22:56 -05:00 committed by GitHub
commit f14ca95df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@
void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self,
const mcu_pin_obj_t *pin) {
if (pin->adc_index == 0 || pin->adc_channel == NO_ADC_CHANNEL) {
if (pin->adc_index == NO_ADC || pin->adc_channel == NO_ADC_CHANNEL) {
raise_ValueError_invalid_pin();
}
common_hal_mcu_pin_claim(pin);