For #4154 - change TFT driver to use virtual GPIO for backlight enable

This commit is contained in:
Kevin Hester
2024-08-22 10:38:19 -07:00
parent 02c34e6214
commit db6e591c07
2 changed files with 25 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include <GpioLogic.h>
#include <OLEDDisplay.h>
/**
@@ -39,6 +40,12 @@ class TFTDisplay : public OLEDDisplay
*/
void setDetected(uint8_t detected);
/**
* This is normally managed entirely by TFTDisplay, but some rare applications (heltec tracker) might need to replace the
* default GPIO behavior with something a bit more complex.
*/
GpioPin *backlightEnable;
protected:
// the header size of the buffer used, e.g. for the SPI command header
virtual int getBufferOffset(void) override { return 0; }