waveshare_epaper

Waveshare e-paper display shenanigans
git clone git://bsandro.tech/waveshare_epaper
Log | Files | Refs | README

EPD_2in7b.h (4971B)


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