EPD_2in7.h (4831B)
1 /***************************************************************************** 2 * | File : EPD_2in7.h 3 * | Author : Waveshare team 4 * | Function : 2.7inch e-paper 5 * | Info : 6 *---------------- 7 * | This version: V3.1 8 * | Date : 2019-10-10 9 * | Info : 10 * ----------------------------------------------------------------------------- 11 * V3.1(2019-10-10): 12 * 1. Add 4 grayscale display 13 * Add EPD_2in7_gray_lut_vcom[] 14 * Add EPD_2in7_gray_lut_ww[] 15 * Add EPD_2in7_gray_lut_bw[] 16 * Add EPD_2in7_gray_lut_wb[] 17 * Add EPD_2in7_gray_lut_bb[] 18 * Add EPD_2in7_gray_SetLut() 19 * Add EPD_2IN7_Init_4Gray() 20 * Add EPD_2IN7_4GrayDisplay() 21 * 22 * V3.0(2019-06-12): 23 * 1.Change: 24 * lut_vcom_dc[] => EPD_2in7_lut_vcom_dc[] 25 * lut_ww[] => EPD_2in7_lut_ww[] 26 * lut_bw[] => EPD_2in7_lut_bw[] 27 * lut_bb[] => EPD_2in7_lut_bb[] 28 * lut_wb[] => EPD_2in7_lut_wb[] 29 * EPD_Reset() => EPD_2in7_Reset() 30 * EPD_SendCommand() => EPD_2in7_SendCommand() 31 * EPD_SendData() => EPD_2in7_SendData() 32 * EPD_WaitUntilIdle() => EPD_2in7_ReadBusy() 33 * EPD_SetLut() => EPD_2in7_SetLut() 34 * EPD_Init() => EPD_2in7_Init() 35 * EPD_Clear() => EPD_2in7_Clear() 36 * EPD_Display() => EPD_2in7_Display() 37 * EPD_Sleep() => EPD_2in7_Sleep() 38 * 2.remove commands define: 39 * #define PANEL_SETTING 0x00 40 * #define POWER_SETTING 0x01 41 * #define POWER_OFF 0x02 42 * #define POWER_OFF_SEQUENCE_SETTING 0x03 43 * #define POWER_ON 0x04 44 * #define POWER_ON_MEASURE 0x05 45 * #define BOOSTER_SOFT_START 0x06 46 * #define DEEP_SLEEP 0x07 47 * #define DATA_START_TRANSMISSION_1 0x10 48 * #define DATA_STOP 0x11 49 * #define DISPLAY_REFRESH 0x12 50 * #define DATA_START_TRANSMISSION_2 0x13 51 * #define PLL_CONTROL 0x30 52 * #define TEMPERATURE_SENSOR_COMMAND 0x40 53 * #define TEMPERATURE_SENSOR_CALIBRATION 0x41 54 * #define TEMPERATURE_SENSOR_WRITE 0x42 55 * #define TEMPERATURE_SENSOR_READ 0x43 56 * #define VCOM_AND_DATA_INTERVAL_SETTING 0x50 57 * #define LOW_POWER_DETECTION 0x51 58 * #define TCON_SETTING 0x60 59 * #define TCON_RESOLUTION 0x61 60 * #define SOURCE_AND_GATE_START_SETTING 0x62 61 * #define GET_STATUS 0x71 62 * #define AUTO_MEASURE_VCOM 0x80 63 * #define VCOM_VALUE 0x81 64 * #define VCM_DC_SETTING_REGISTER 0x82 65 * #define PROGRAM_MODE 0xA0 66 * #define ACTIVE_PROGRAM 0xA1 67 * #define READ_OTP_DATA 0xA2 68 * ----------------------------------------------------------------------------- 69 * V2.0(2018-11-06): 70 * 1.Remove:ImageBuff[EPD_HEIGHT * EPD_WIDTH / 8] 71 * 2.Change:EPD_Display(UBYTE *Image) 72 * Need to pass parameters: pointer to cached data 73 # 74 # Permission is hereby granted, free of charge, to any person obtaining a copy 75 # of this software and associated documnetation files (the "Software"), to deal 76 # in the Software without restriction, including without limitation the rights 77 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 78 # copies of the Software, and to permit persons to whom the Software is 79 # furished to do so, subject to the following conditions: 80 # 81 # The above copyright notice and this permission notice shall be included in 82 # all copies or substantial portions of the Software. 83 # 84 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 85 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 86 # FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 87 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 88 # LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 89 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 90 # THE SOFTWARE. 91 # 92 ******************************************************************************/ 93 #ifndef __EPD_2IN7_H_ 94 #define __EPD_2IN7_H_ 95 96 #include "DEV_Config.h" 97 98 // Display resolution 99 #define EPD_2IN7_WIDTH 176 100 #define EPD_2IN7_HEIGHT 264 //46464 101 102 103 104 void EPD_2IN7_Init(void); 105 void EPD_2IN7_Clear(void); 106 void EPD_2IN7_Display(const UBYTE *Image); 107 void EPD_2IN7_Sleep(void); 108 109 void EPD_2IN7_Init_4Gray(void); 110 void EPD_2IN7_4GrayDisplay(const UBYTE *Image); 111 #endif