Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deinit the reset pin when displayio.I2CDisplay fails #7563

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shared-module/displayio/I2CDisplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void common_hal_displayio_i2cdisplay_construct(displayio_i2cdisplay_obj_t *self,
// Probe the bus to see if a device acknowledges the given address.
if (!common_hal_busio_i2c_probe(i2c, device_address)) {
self->base.type = &mp_type_NoneType;
common_hal_displayio_i2cdisplay_deinit(self);
mp_raise_ValueError_varg(translate("Unable to find I2C Display at %x"), device_address);
}

Expand Down