EPD_2in13g.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*****************************************************************************
  2. * | File : EPD_2in13g.h
  3. * | Author : Waveshare team
  4. * | Function : 2inch13 e-paper (G)
  5. * | Info :
  6. *----------------
  7. * | This version: V1.0
  8. * | Date : 2023-05-29
  9. * | Info :
  10. * -----------------------------------------------------------------------------
  11. ******************************************************************************/
  12. #ifndef __EPD_2IN13G_H_
  13. #define __EPD_2IN13G_H_
  14. #include "epdif.h"
  15. // Display resolution
  16. #define EPD_2IN13G_WIDTH 122
  17. #define EPD_2IN13G_HEIGHT 250
  18. #define UWORD unsigned int
  19. #define UBYTE unsigned char
  20. #define UDOUBLE unsigned long
  21. // Color
  22. #define BLACK 0x0
  23. #define WHITE 0x1
  24. #define YELLOW 0x2
  25. #define RED 0x3
  26. #define Source_BITS 128
  27. class Epd : EpdIf {
  28. public:
  29. unsigned long WIDTH;
  30. unsigned long HEIGHT;
  31. Epd();
  32. ~Epd();
  33. int Init();
  34. void SendCommand(unsigned char command);
  35. void SendData(unsigned char data);
  36. void Reset(void);
  37. void SetWindows(void);
  38. void ReadBusy(void);
  39. void TurnOnDisplay(void);
  40. void Clear(UBYTE color);
  41. void Display(const UBYTE *Image);
  42. void Sleep(void);
  43. private:
  44. unsigned int reset_pin;
  45. unsigned int dc_pin;
  46. unsigned int cs_pin;
  47. unsigned int busy_pin;
  48. };
  49. #endif /* EPD4IN37_H */
  50. /* END OF FILE */