Skip to content

Classmap

Martin edited this page Jun 13, 2020 · 1 revision

CalEpd C++ classmap

Implementation examples

All models that have a single SPI interface with one controller need to get injected the EpdSpi class

#include <gdew0583t7.h>
#include <Fonts/FreeSerif12pt7b.h> // Optionally include a font from Adafruit GFX
EpdSpi io;
Gdew0583T7 display(io);

void app_main(void)
{
   display.init(true);       // Activate debug
   display.setRotation(0);   // Optionally change rotation
   display.setFont(&FreeSerif12pt7b);
   display.setTextColor(EPD_BLACK);
   display.setCursor(10,10); // On rotation 0 will move the cursor to top-left corner
   display.println("Hello CalEPD component");
   display.update();         // Sends the pixel buffer and refreshes the epaper display
}

The Waveshare 12 inches composite epaper needs to inject a different IO class

#include "wave12i48.h"
Epd4Spi io;
Wave12I48 display(io);
Clone this wiki locally