kleine Optimierungen

This commit is contained in:
dAjaY85 2023-03-05 16:56:01 +01:00
parent ce20d7c1b4
commit 0ff821aeac
5 changed files with 12 additions and 8 deletions

View file

@ -9,7 +9,7 @@ static const uint32_t spiClk = 4000000; // 4 MHz
SPIClass hspi(HSPI);
#endif
std::map<uint8_t, std::function<GxEPD2_GFX*(uint8_t, uint8_t, uint8_t, uint8_t)>> _ePaperTypes = {
std::map<uint8_t, std::function<GxEPD2_GFX *(uint8_t, uint8_t, uint8_t, uint8_t)>> _ePaperTypes = {
// DEPG0150BN 200x200, SSD1681, TTGO T5 V2.4.1
{11, [](uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY) { return new GxEPD2_BW<GxEPD2_150_BN, GxEPD2_150_BN::HEIGHT>(GxEPD2_150_BN(_CS, _DC, _RST, _BUSY)); }},
// GDEW027C44 2.7 " b/w/r 176x264, IL91874
@ -24,7 +24,7 @@ DisplayEPaperClass::~DisplayEPaperClass() {
delete _display;
}
//***************************************************************************
void DisplayEPaperClass::init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY, uint8_t _SCK, uint8_t _MOSI) {
void DisplayEPaperClass::init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY, uint8_t _SCK, uint8_t _MOSI, const char *version) {
if (type > 3) {
Serial.begin(115200);
auto constructor = _ePaperTypes[type];