diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-03-08 12:47:56 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-03-08 12:47:56 +1100 |
| commit | 0fce4fcc06a600aac6b0cb6fc1ef1ebb91bcdf27 (patch) | |
| tree | 0a19839fc2b92551e25775c8264e010b601cd19b /src/drivers/display.cpp | |
| parent | d01f1bee1082840fdf50aa7ddd36dbcbff286d7e (diff) | |
| download | tangara-fw-0fce4fcc06a600aac6b0cb6fc1ef1ebb91bcdf27.tar.gz | |
update to faceplate bodge
Diffstat (limited to 'src/drivers/display.cpp')
| -rw-r--r-- | src/drivers/display.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/drivers/display.cpp b/src/drivers/display.cpp index 6ec82787..d3c2c923 100644 --- a/src/drivers/display.cpp +++ b/src/drivers/display.cpp @@ -60,7 +60,7 @@ auto Display::create(GpioExpander* expander, const displays::InitialisationData& init_data) -> std::unique_ptr<Display> { // First, turn on the LED backlight. - expander->set_pin(GpioExpander::DISPLAY_LED, 0); + expander->set_pin(GpioExpander::DISPLAY_LED, 1); expander->set_pin(GpioExpander::DISPLAY_POWER_ENABLE, 1); expander->Write(); @@ -118,6 +118,14 @@ Display::Display(GpioExpander* gpio, spi_device_handle_t handle) Display::~Display() {} void Display::SendInitialisationSequence(const uint8_t* data) { + // Reset the display manually to get it into a predictable state. + gpio_->set_pin(GpioExpander::DISPLAY_RESET, false); + gpio_->Write(); + vTaskDelay(pdMS_TO_TICKS(10)); + gpio_->set_pin(GpioExpander::DISPLAY_RESET, false); + gpio_->Write(); + vTaskDelay(pdMS_TO_TICKS(10)); + // Hold onto the bus for the entire sequence so that we're not interrupted // part way through. spi_device_acquire_bus(handle_, portMAX_DELAY); |
