mirror of
https://github.com/micropython/micropython.git
synced 2026-04-24 01:40:22 +02:00
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:
committed by
Damien George
parent
e29bcdcb7b
commit
b6bc2d473c
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user