GxEPD2.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
  2. // Requires HW SPI and Adafruit_GFX. Caution: these e-papers require 3.3V supply AND data lines!
  3. //
  4. // based on Demo Example from Good Display: http://www.e-paper-display.com/download_list/downloadcategoryid=34&isMode=false.html
  5. //
  6. // Author: Jean-Marc Zingg
  7. //
  8. // Version: see library.properties
  9. //
  10. // Library: https://github.com/ZinggJM/GxEPD2
  11. #ifndef _GxEPD2_H_
  12. #define _GxEPD2_H_
  13. #include <Arduino.h>
  14. #include <SPI.h>
  15. #define GxEPD_BLACK 0x0000
  16. #define GxEPD_DARKGREY 0x7BEF /* 128, 128, 128 */
  17. #define GxEPD_LIGHTGREY 0xC618 /* 192, 192, 192 */
  18. #define GxEPD_WHITE 0xFFFF
  19. #define GxEPD_RED 0xF800 /* 255, 0, 0 */
  20. #define GxEPD_YELLOW GxEPD_RED
  21. #define GxEPD_COLORED GxEPD_RED
  22. class GxEPD2
  23. {
  24. public:
  25. enum Panel
  26. {
  27. GDEP015OC1, Waveshare_1_54_bw = GDEP015OC1,
  28. GDE0213B1, Waveshare_2_13_bw = GDE0213B1,
  29. GDEW0213I5F, Waveshare_2_13_flex = GDEW0213I5F,
  30. GDEH029A1, Waveshare_2_9_bw = GDEH029A1,
  31. GDEW027W3, Waveshare_2_7_bw = GDEW027W3,
  32. GDEW042T2, Waveshare_4_2_bw = GDEW042T2,
  33. GDEW0583T7, Waveshare_5_83_bw = GDEW0583T7,
  34. GDEW075T8, Waveshare_7_5_bw = GDEW075T8,
  35. // 3-color
  36. GDEW0154Z04, Waveshare_1_54_bwr = GDEW0154Z04,
  37. GDEW0213Z16, Waveshare_2_13_bwr = GDEW0213Z16,
  38. GDEW029Z10, Waveshare_2_9_bwr = GDEW029Z10,
  39. GDEW027C44, Waveshare_2_7_bwr = GDEW027C44,
  40. GDEW042Z15, Waveshare_4_2_bwr = GDEW042Z15,
  41. GDEW0583Z21, Waveshare_5_83_bwr = GDEW0583Z21,
  42. GDEW075Z09, Waveshare_7_5_bwr = GDEW075Z09
  43. };
  44. };
  45. #endif