mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
add heltec_v4 tft expansion box
This commit is contained in:
parent
459169e8cb
commit
310618e689
8 changed files with 267 additions and 44 deletions
|
|
@ -7,6 +7,10 @@ bool SSD1306Display::i2c_probe(TwoWire& wire, uint8_t addr) {
|
|||
}
|
||||
|
||||
bool SSD1306Display::begin() {
|
||||
if (!_isOn) {
|
||||
if (_peripher_power) _peripher_power->claim();
|
||||
_isOn = true;
|
||||
}
|
||||
#ifdef DISPLAY_ROTATION
|
||||
display.setRotation(DISPLAY_ROTATION);
|
||||
#endif
|
||||
|
|
@ -15,12 +19,18 @@ bool SSD1306Display::begin() {
|
|||
|
||||
void SSD1306Display::turnOn() {
|
||||
display.ssd1306_command(SSD1306_DISPLAYON);
|
||||
_isOn = true;
|
||||
if (!_isOn) {
|
||||
if (_peripher_power) _peripher_power->claim();
|
||||
_isOn = true;
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306Display::turnOff() {
|
||||
display.ssd1306_command(SSD1306_DISPLAYOFF);
|
||||
_isOn = false;
|
||||
if (_isOn) {
|
||||
if (_peripher_power) _peripher_power->release();
|
||||
_isOn = false;
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306Display::clear() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue