Browse Source

Merge pull request #2797 from jepler/fix-2792

displayio: Fix "bus type" problem introduced at 8cba145c90
crypto-aes
Scott Shawcroft 2 years ago committed by GitHub
parent
commit
51dbe9109f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      shared-bindings/displayio/FourWire.c
  2. 1
      shared-bindings/displayio/I2CDisplay.c
  3. 1
      shared-bindings/displayio/ParallelBus.c

1
shared-bindings/displayio/FourWire.c

@ -84,6 +84,7 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ @@ -84,6 +84,7 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_
mp_obj_t spi = args[ARG_spi_bus].u_obj;
displayio_fourwire_obj_t* self = &allocate_display_bus_or_raise()->fourwire_bus;
self->base.type = &displayio_fourwire_type;
uint8_t polarity = args[ARG_polarity].u_int;
if (polarity != 0 && polarity != 1) {

1
shared-bindings/displayio/I2CDisplay.c

@ -73,6 +73,7 @@ STATIC mp_obj_t displayio_i2cdisplay_make_new(const mp_obj_type_t *type, size_t @@ -73,6 +73,7 @@ STATIC mp_obj_t displayio_i2cdisplay_make_new(const mp_obj_type_t *type, size_t
mp_obj_t i2c = args[ARG_i2c_bus].u_obj;
displayio_i2cdisplay_obj_t* self = &allocate_display_bus_or_raise()->i2cdisplay_bus;
self->base.type = &displayio_i2cdisplay_type;
common_hal_displayio_i2cdisplay_construct(self,
MP_OBJ_TO_PTR(i2c), args[ARG_device_address].u_int, reset);

1
shared-bindings/displayio/ParallelBus.c

@ -84,6 +84,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t @@ -84,6 +84,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t
mcu_pin_obj_t *reset = validate_obj_is_free_pin(args[ARG_reset].u_obj);
displayio_parallelbus_obj_t* self = &allocate_display_bus_or_raise()->parallel_bus;
self->base.type = &displayio_parallelbus_type;
common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset);
return self;

Loading…
Cancel
Save