diff options
Diffstat (limited to 'src/drivers/St7789.cpp')
| -rw-r--r-- | src/drivers/St7789.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp index e18c43a3..7855bc31 100644 --- a/src/drivers/St7789.cpp +++ b/src/drivers/St7789.cpp @@ -6,13 +6,13 @@ using namespace Pinetime::Drivers; -St7789::St7789(Spi& spi, uint8_t pinDataCommand) : spi {spi}, pinDataCommand {pinDataCommand} { +St7789::St7789(Spi& spi, uint8_t pinDataCommand, uint8_t pinReset) : spi {spi}, pinDataCommand {pinDataCommand}, pinReset{pinReset} { } void St7789::Init() { nrf_gpio_cfg_output(pinDataCommand); - nrf_gpio_cfg_output(26); - nrf_gpio_pin_set(26); + nrf_gpio_cfg_output(pinReset); + nrf_gpio_pin_set(pinReset); HardwareReset(); SoftwareReset(); SleepOut(); @@ -178,15 +178,15 @@ void St7789::DrawBuffer(uint16_t x, uint16_t y, uint16_t width, uint16_t height, } void St7789::HardwareReset() { - nrf_gpio_pin_clear(26); + nrf_gpio_pin_clear(pinReset); nrf_delay_ms(10); - nrf_gpio_pin_set(26); + nrf_gpio_pin_set(pinReset); } void St7789::Sleep() { SleepIn(); nrf_gpio_cfg_default(pinDataCommand); - nrf_gpio_cfg_default(26); + nrf_gpio_cfg_default(pinReset); NRF_LOG_INFO("[LCD] Sleep"); } |
