GxEPD2_SD_AVR_boards_added.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Display Library example for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
  2. // Requires HW SPI and Adafruit_GFX. Caution: the e-paper panels require 3.3V supply AND data lines!
  3. //
  4. // Display Library 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. // non-AVR board can also be used with GxEPD2 base display classes, e.g. for SD bitmap drawing
  12. #ifndef _GxEPD2_SD_AVR_boards_added_H_
  13. #define _GxEPD2_SD_AVR_boards_added_H_
  14. #if defined (ESP8266)
  15. #define SD_CS SS // e.g. for RobotDyn Wemos D1 mini SD board
  16. #define EPD_CS D1 // alternative I use with RobotDyn Wemos D1 mini SD board
  17. GxEPD2_DRIVER_CLASS display(/*CS=*/ EPD_CS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4);
  18. #endif
  19. #if defined(ESP32)
  20. #define SD_CS 2 // adapt to your wiring
  21. #define EPD_CS SS // adapt to your wiring
  22. GxEPD2_DRIVER_CLASS display(/*CS=5*/ EPD_CS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4);
  23. #endif
  24. #if defined(_BOARD_GENERIC_STM32F103C_H_)
  25. #define SD_CS 0 // adapt to your wiring
  26. #define EPD_CS SS // adapt to your wiring
  27. GxEPD2_DRIVER_CLASS display(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1);
  28. #endif
  29. #if defined(ARDUINO_ARCH_SAM)
  30. #define SD_CS 0 // adapt to your wiring
  31. #define EPD_CS SS // adapt to your wiring
  32. GxEPD2_DRIVER_CLASS display(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7);
  33. #endif
  34. #if defined(ARDUINO_ARCH_SAMD)
  35. #define SD_CS 0 // adapt to your wiring
  36. #define EPD_CS SS // adapt to your wiring
  37. GxEPD2_DRIVER_CLASS display(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5);
  38. #endif
  39. #endif