Skip to content

Fix some DisplayIO crashes, add ESP32-S2 debugging capability #3392

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

Merged
merged 5 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ports/esp32s2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ CFLAGS += $(OPTIMIZATION_FLAGS)

CFLAGS += $(INC) -Werror -Wall -mlongcalls -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT)

LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,[email protected] -Wl,-cref
LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,[email protected] -Wl,-cref -Wl,--undefined=uxTopUsedPriority
LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp32s2 \
-Tesp32s2_out.ld \
-L$(BUILD)/esp-idf/esp-idf/esp32s2/ld \
Expand Down
4 changes: 3 additions & 1 deletion shared-module/displayio/FourWire.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self) {

common_hal_reset_pin(self->command.pin);
common_hal_reset_pin(self->chip_select.pin);
common_hal_reset_pin(self->reset.pin);
if (self->reset.pin) {
common_hal_reset_pin(self->reset.pin);
}
}

bool common_hal_displayio_fourwire_reset(mp_obj_t obj) {
Expand Down
5 changes: 4 additions & 1 deletion shared-module/displayio/I2CDisplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,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;
mp_raise_ValueError_varg(translate("Unable to find I2C Display at %x"), device_address);
}

Expand All @@ -71,7 +72,9 @@ void common_hal_displayio_i2cdisplay_deinit(displayio_i2cdisplay_obj_t* self) {
common_hal_busio_i2c_deinit(self->bus);
}

common_hal_reset_pin(self->reset.pin);
if (self->reset.base.type == &digitalio_digitalinout_type) {
common_hal_digitalio_digitalinout_deinit(&self->reset);
}
}

bool common_hal_displayio_i2cdisplay_reset(mp_obj_t obj) {
Expand Down