aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/St7789.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-05-24 16:58:29 +0200
committerGitea <gitea@fake.local>2020-05-24 16:58:29 +0200
commit82b4ddc25b4c7913e0e6a13a209a4415dff044f1 (patch)
tree8eeafef1f4150a1cf238ee80e53c8901b0ec67af /src/drivers/St7789.cpp
parentbe1ad9b07083e656a649d223750ff4b14b781b7b (diff)
parent073717980f5c00f553ac3b58a50b792b32a14c7a (diff)
Merge branch 'nimble-ota' of JF/PineTime into develop
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 db7c27e2..09269afd 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?