mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Add heltec_vision_master_t190 board.
This commit is contained in:
parent
9108a709ee
commit
bd6bd065ac
9 changed files with 385 additions and 2 deletions
|
|
@ -18,7 +18,11 @@ bool ST7789Display::begin() {
|
|||
pinMode(PIN_TFT_VDD_CTL, OUTPUT);
|
||||
pinMode(PIN_TFT_LEDA_CTL, OUTPUT);
|
||||
digitalWrite(PIN_TFT_VDD_CTL, LOW);
|
||||
#ifdef PIN_TFT_LEDA_CTL_ACTIVE
|
||||
digitalWrite(PIN_TFT_LEDA_CTL, PIN_TFT_LEDA_CTL_ACTIVE);
|
||||
#else
|
||||
digitalWrite(PIN_TFT_LEDA_CTL, LOW);
|
||||
#endif
|
||||
digitalWrite(PIN_TFT_RST, HIGH);
|
||||
|
||||
display.init();
|
||||
|
|
@ -43,15 +47,22 @@ void ST7789Display::turnOn() {
|
|||
delay(20);
|
||||
|
||||
// Now turn on the backlight
|
||||
#ifdef PIN_TFT_LEDA_CTL_ACTIVE
|
||||
digitalWrite(PIN_TFT_LEDA_CTL, PIN_TFT_LEDA_CTL_ACTIVE);
|
||||
#else
|
||||
digitalWrite(PIN_TFT_LEDA_CTL, LOW);
|
||||
|
||||
#endif
|
||||
_isOn = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ST7789Display::turnOff() {
|
||||
digitalWrite(PIN_TFT_VDD_CTL, HIGH);
|
||||
#ifdef PIN_TFT_LEDA_CTL_ACTIVE
|
||||
digitalWrite(PIN_TFT_LEDA_CTL, !PIN_TFT_LEDA_CTL_ACTIVE);
|
||||
#else
|
||||
digitalWrite(PIN_TFT_LEDA_CTL, HIGH);
|
||||
#endif
|
||||
digitalWrite(PIN_TFT_RST, LOW);
|
||||
_isOn = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue