From 6b7acc65b655dd203b08b2d53f08ad56c7da1041 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 25 Mar 2020 11:22:46 -0700 Subject: Add polarity and phase to FourWire. It was fixed as 0/0 even though it used to get it from the current SPI state. This makes it more explicit with kwargs. Thanks to magpie_lark and kmatocha on the Adafruit Support forum for finding the issue: https://forums.adafruit.com/viewtopic.php?f=60&t=162515 --- shared-module/displayio/FourWire.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'shared-module/displayio/FourWire.c') diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c index 256c29642..fe7234aa7 100644 --- a/shared-module/displayio/FourWire.c +++ b/shared-module/displayio/FourWire.c @@ -40,7 +40,8 @@ void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, busio_spi_obj_t* spi, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint32_t baudrate) { + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint32_t baudrate, + uint8_t polarity, uint8_t phase) { self->bus = spi; common_hal_busio_spi_never_reset(self->bus); @@ -49,8 +50,8 @@ void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, gc_never_free(self->bus); self->frequency = baudrate; - self->polarity = 0; - self->phase = 0; + self->polarity = polarity; + self->phase = phase; common_hal_digitalio_digitalinout_construct(&self->command, command); common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); -- cgit v1.2.3