summaryrefslogtreecommitdiff
path: root/src/drivers/St7789.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-06-07 12:17:45 (GMT)
committerGitea <gitea@fake.local>2020-06-07 12:17:45 (GMT)
commita0e73f5c1a1e652aa6270b7e42a73aee3d12ded6 (patch)
tree6205dfb543bb22245d39a2f6e44d2c26cb381c10 /src/drivers/St7789.cpp
parent8a94750e30399bfb204cbec59a769d9d1b6b5baa (diff)
parentdbdb26ae1fa45cec88f1b9ea0353b3d0a3c39f56 (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/drivers/St7789.cpp')
-rw-r--r--src/drivers/St7789.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp
index db7c27e..09269af 100644
--- a/src/drivers/St7789.cpp
+++ b/src/drivers/St7789.cpp
@@ -1,16 +1,17 @@
#include <hal/nrf_gpio.h>
#include <libraries/delay/nrf_delay.h>
#include "St7789.h"
-#include "SpiMaster.h"
+#include "Spi.h"
using namespace Pinetime::Drivers;
-St7789::St7789(SpiMaster &spiMaster, uint8_t pinDataCommand) : spi{spiMaster}, pinDataCommand{pinDataCommand} {
+St7789::St7789(Spi &spi, uint8_t pinDataCommand) : spi{spi}, pinDataCommand{pinDataCommand} {
}
void St7789::Init() {
+ spi.Init();
nrf_gpio_cfg_output(pinDataCommand);
nrf_gpio_cfg_output(26);
nrf_gpio_pin_set(26);
@@ -173,11 +174,11 @@ void St7789::HardwareReset() {
void St7789::Sleep() {
SleepIn();
nrf_gpio_cfg_default(pinDataCommand);
- spi.Sleep();
+// spi.Sleep(); // TODO sleep SPI
}
void St7789::Wakeup() {
- spi.Wakeup();
+// spi.Wakeup(); // TODO wake up SPI
nrf_gpio_cfg_output(pinDataCommand);
// TODO why do we need to reset the controller?