Hello. I'm new, so please forgive a rookie question...
I'm using an ePaper display from Adafruit: Adafruit 1.54 Monochrome eInk / ePaper Display with SRAM [200x200 with SSD1681] : ID 4196 : $24.95 : Adafruit Industries, Unique & fun DIY electronics and kits
This display has gone through a revision and now is incompatible with a previous release of an identical-looking device.
I've been using the nifty GxEPD2 library on the previous version for its nice partial update support and have gotten it to work with the newer board as well with a compile-time selection of the type of device.
However, given I have a mix of devices, I'd like to be able to switch which driver I use at boot time so I can support both the old and new devices with one firmware load.
What's the right way to go about this? I've tried declaring one of each type and then tried to make a suitable pointer to select which one I want to work with, but alas, no joy so far...
Any suggestions would be greatly appreciated!
Thanks!
-John
'''
// ADAFRUIT 1.54" ePaper Display. SSD1608
GxEPD2_BW<GxEPD2_154, GxEPD2_154::HEIGHT> display1(GxEPD2_154(/CS=5/ EPD_CS, /DC=/ EPD_DC, /RST=/ EPD_RESET, /BUSY=/ EPD_BUSY)); // GDEH0154D67
// ADAFRUIT 1.54" ePaper Display. SSD1681
GxEPD2_BW<GxEPD2_154_D67, GxEPD2_154_D67::HEIGHT> display2(GxEPD2_154_D67(/CS=5/ EPD_CS, /DC=/ EPD_DC, /RST=/ EPD_RESET, /BUSY=/ EPD_BUSY)); // GDEW0154M09 200x200
SomeKindOfDeclaration??? * display;
//***************************************************************************
void initDisplay()
{
display = &display1;
display->init(0);
display->setRotation(3);
display->setTextSize(2);
display->setTextColor(GxEPD_BLACK);
display->fillScreen(GxEPD_WHITE);
return;
}
'''