#include "./screen.h"
#include "include/config.h"


Adafruit_GFX* BaseScreen::getDisplay()
{
  return this->screenManager->getDisplay();
}


void ScreenManager::init()
{
  pinMode(Config::DisplayPortBL, OUTPUT);
  digitalWrite(Config::DisplayPortBL, HIGH);
}


void ScreenManager::displayOff()
{
  digitalWrite(Config::DisplayPortBL, LOW);
  this->display->sendCommand(ST77XX_SLPIN);
}


void ScreenManager::displayOn()
{
  this->display->sendCommand(ST77XX_SLPOUT);
  digitalWrite(Config::DisplayPortBL, HIGH);
}
