mirror of
https://github.com/revspace/operame
synced 2024-12-04 21:57:30 +00:00
Move display init to display.h
This commit is contained in:
parent
fa79001736
commit
a9e697066e
@ -5,8 +5,17 @@
|
||||
#include <src/logo.h>
|
||||
#include <list>
|
||||
|
||||
namespace {
|
||||
TFT_eSPI tft;
|
||||
TFT_eSprite sprite(&tft);
|
||||
}
|
||||
|
||||
void setup_display() {
|
||||
tft.init();
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setRotation(1);
|
||||
sprite.createSprite(tft.width(), tft.height());
|
||||
}
|
||||
|
||||
void clear_sprite(int bg = TFT_BLACK) {
|
||||
sprite.fillSprite(bg);
|
||||
|
@ -156,10 +156,7 @@ void setup() {
|
||||
Serial.println("Operame start");
|
||||
|
||||
digitalWrite(pin_backlight, HIGH);
|
||||
tft.init();
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setRotation(1);
|
||||
sprite.createSprite(tft.width(), tft.height());
|
||||
setup_display();
|
||||
|
||||
OperameLanguage::select(T, LANGUAGE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user