diff options
| author | JF <jf@codingfield.com> | 2020-05-24 14:58:29 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2020-05-24 14:58:29 (GMT) |
| commit | 82b4ddc25b4c7913e0e6a13a209a4415dff044f1 (patch) | |
| tree | 8eeafef1f4150a1cf238ee80e53c8901b0ec67af /src/drivers/St7789.cpp | |
| parent | be1ad9b07083e656a649d223750ff4b14b781b7b (diff) | |
| parent | 073717980f5c00f553ac3b58a50b792b32a14c7a (diff) | |
Merge branch 'nimble-ota' of JF/PineTime into develop
Diffstat (limited to 'src/drivers/St7789.cpp')
| -rw-r--r-- | src/drivers/St7789.cpp | 9 |
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? |
