esp32/adc: Raise error if ADC read result is invalid.

Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
This commit is contained in:
Daniël van de Giessen
2026-03-20 16:11:52 +01:00
committed by Damien George
parent e29bcdcb7b
commit b6bc2d473c
+1 -1
View File
@@ -54,7 +54,7 @@ mp_int_t madcblock_read_helper(machine_adc_block_obj_t *self, adc_channel_t chan
adc_is_init_guard(self);
int reading = 0;
adc_oneshot_read(self->handle, channel_id, &reading);
check_esp_err(adc_oneshot_read(self->handle, channel_id, &reading));
return reading;
}