Power optimization - Improve SPI sleep mode

ST7789 driver : replace the constant '26' with a named constant to specify the pin number of the reset pin of the LCD controller.
This commit is contained in:
Jean-François Milants
2023-05-18 15:19:44 +02:00
committed by JF
parent 62848b33fb
commit 9bd90c906e
4 changed files with 10 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ namespace Pinetime {
class St7789 {
public:
explicit St7789(Spi& spi, uint8_t pinDataCommand);
explicit St7789(Spi& spi, uint8_t pinDataCommand, uint8_t pinReset);
St7789(const St7789&) = delete;
St7789& operator=(const St7789&) = delete;
St7789(St7789&&) = delete;
@@ -29,6 +29,7 @@ namespace Pinetime {
private:
Spi& spi;
uint8_t pinDataCommand;
uint8_t pinReset;
uint8_t verticalScrollingStartAddress = 0;
void HardwareReset();