A lib to handle a E-Paper display from Jiaxian Displays. The lib can handle graphic and text drawing and is using external fonts. SPI interface.

Dependents:   EPD_GDE021A1_demo

This E-ink display can be found from here, Factory datasheet, Controller: SSD1606

/media/uploads/steeven/image1.jpg

Revision:
0:e7a39129f419
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EpdGDE021A1.h	Wed Apr 15 11:16:20 2015 +0000
@@ -0,0 +1,45 @@
+#ifndef EPDGDE021A1_H_
+#define EPDGDE021A1_H_
+
+#include "mbed.h"
+#include "Graphic.h"
+
+#define GED021A1_BUF_SIZE 3096
+#define GED021A1_WIDH 172
+#define GED021A1_HIGHT 72
+#define GED021A1_BITS 2
+
+class EpdGDE021A1: public Graphic {
+
+public:
+    EpdGDE021A1(PinName mosi = p5, PinName sclk = p7, PinName cs = p8,
+            PinName dc = p9, PinName reset = p10);
+
+    void setup();
+    void update();
+    void sleep();
+
+public:
+    virtual ~EpdGDE021A1() {
+    }
+
+protected:
+    void draw(unsigned char *data);
+    void reset();
+    void wait_busy();
+    void write_lut();
+    void init();
+    void spi_write(int cmd, unsigned char val);
+    void spi_cmd(unsigned char cmd);
+    void spi_data(unsigned char val);
+    SPI _spi;
+    DigitalOut _spi_ncs;
+    DigitalOut _spi_ndc;
+    DigitalOut _reset;
+    int _spi3w;
+
+public:
+    unsigned char _buf[GED021A1_BUF_SIZE];
+};
+
+#endif /* EPDGDE021A1_H_ */