sketchbook
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
EPD_2in9.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * | File : EPD_2in9.h
3 * | Author : Waveshare team
4 * | Function :
5 * | Info :
6 *----------------
7 * | This version: V1.0
8 * | Date : 2018-06-07
9 * | Info : Basic version
10 *
11 ******************************************************************************/
12 #ifndef _EPD2IN9_H
13 #define _EPD2IN9_H
14 
15 #include "DEV_Config.h"
16 #include "SPI_RAM.h"
17 
18 // Display resolution
19 #define EPD_WIDTH 128
20 #define EPD_HEIGHT 296
21 
22 // EPD2IN9 commands
23 #define DRIVER_OUTPUT_CONTROL 0x01
24 #define BOOSTER_SOFT_START_CONTROL 0x0C
25 #define GATE_SCAN_START_POSITION 0x0F
26 #define DEEP_SLEEP_MODE 0x10
27 #define DATA_ENTRY_MODE_SETTING 0x11
28 #define SW_RESET 0x12
29 #define TEMPERATURE_SENSOR_CONTROL 0x1A
30 #define MASTER_ACTIVATION 0x20
31 #define DISPLAY_UPDATE_CONTROL_1 0x21
32 #define DISPLAY_UPDATE_CONTROL_2 0x22
33 #define WRITE_RAM 0x24
34 #define WRITE_VCOM_REGISTER 0x2C
35 #define WRITE_LUT_REGISTER 0x32
36 #define SET_DUMMY_LINE_PERIOD 0x3A
37 #define SET_GATE_TIME 0x3B
38 #define BORDER_WAVEFORM_CONTROL 0x3C
39 #define SET_RAM_X_ADDRESS_START_END_POSITION 0x44
40 #define SET_RAM_Y_ADDRESS_START_END_POSITION 0x45
41 #define SET_RAM_X_ADDRESS_COUNTER 0x4E
42 #define SET_RAM_Y_ADDRESS_COUNTER 0x4F
43 #define TERMINATE_FRAME_READ_WRITE 0xFF
44 
45 extern DEV *Dev;
46 extern const unsigned char lut_full_update[];
47 extern const unsigned char lut_partial_update[];
48 
49 class EPD2IN9
50 {
51  void EPD_Reset(void);
52  void EPD_SendCommand(UBYTE Reg);
53  void EPD_SendData(UBYTE Data);
54  void EPD_WaitUntilIdle(void);
55  void EPD_SetWindows(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend);
56  void EPD_SetCursor(UWORD Xstart, UWORD Ystart) ;
57  void EPD_TurnOnDisplay(void);
58 
59 public:
60  UBYTE EPD_Init(const unsigned char* lut);
61  void EPD_Clear(void);
62  void EPD_Display(void);
63  void EPD_Sleep(void);
64 
65 };
66 
67 
68 #endif /* EPD2IN13_H */
69 
70 /* END OF FILE */
void EPD_Sleep(void)
Definition: EPD_2in9.cpp:212
void EPD_Clear(void)
Definition: EPD_2in9.cpp:170
UBYTE EPD_Init(const unsigned char *lut)
Definition: EPD_2in9.cpp:135
const unsigned char lut_partial_update[]
Definition: EPD_2in9.cpp:25
void EPD_Display(void)
Definition: EPD_2in9.cpp:191
DEV * Dev
Definition: EPD_2in9.h:49
const unsigned char lut_full_update[]
Definition: EPD_2in9.cpp:17