Skip to content
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 shared-module/displayio/Display.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
self->core.send(self->core.bus, DISPLAY_COMMAND, CHIP_SELECT_TOGGLE_EVERY_BYTE, cmd, 1);
self->core.send(self->core.bus, DISPLAY_DATA, CHIP_SELECT_UNTOUCHED, data, data_size);
}
self->core.end_transaction(self->core.bus);
displayio_display_core_end_transaction(&self->core);
uint16_t delay_length_ms = 10;
if (delay) {
data_size++;
Expand Down
4 changes: 3 additions & 1 deletion shared-module/displayio/I2CDisplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ bool common_hal_displayio_i2cdisplay_bus_free(mp_obj_t obj) {
if (!common_hal_busio_i2c_try_lock(self->bus)) {
return false;
}
common_hal_busio_i2c_unlock(self->bus);
return true;
}

bool common_hal_displayio_i2cdisplay_begin_transaction(mp_obj_t obj) {
return common_hal_displayio_i2cdisplay_bus_free(obj);
displayio_i2cdisplay_obj_t* self = MP_OBJ_TO_PTR(obj);
return !common_hal_busio_i2c_try_lock(self->bus);
}

void common_hal_displayio_i2cdisplay_send(mp_obj_t obj, display_byte_type_t data_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
Expand Down