summaryrefslogtreecommitdiff
path: root/src/drivers/St7789.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/St7789.cpp')
-rw-r--r--src/drivers/St7789.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp
index 0c18a610..7c52f179 100644
--- a/src/drivers/St7789.cpp
+++ b/src/drivers/St7789.cpp
@@ -12,6 +12,9 @@ St7789::St7789(SpiMaster &spiMaster, uint8_t pinDataCommand) : spi{spiMaster}, p
void St7789::Init() {
nrf_gpio_cfg_output(pinDataCommand);
+ nrf_gpio_cfg_output(26);
+ nrf_gpio_pin_set(26);
+ HardwareReset();
SoftwareReset();
SleepOut();
ColMod();
@@ -158,4 +161,11 @@ void St7789::NextDrawBuffer(const uint8_t *data, size_t size) {
spi.Write(data, size);
}
+void St7789::HardwareReset() {
+ nrf_gpio_pin_clear(26);
+ nrf_delay_ms(200);
+ nrf_gpio_pin_set(26);
+
+}
+