waveshare_epaper

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

EPD_1in54.h (4687B)


      1 /*****************************************************************************
      2 * | File      	:   EPD_1in54.h
      3 * | Author      :   Waveshare team
      4 * | Function    :   1.54inch e-paper
      5 * | Info        :
      6 *----------------
      7 * |	This version:   V3.1
      8 * | Date        :   2019-06-12
      9 * | Info        :
     10 * -----------------------------------------------------------------------------
     11 * V3.1(2019-06-12):
     12 * 1.Change:
     13 *    lut_full_update[] => EPD_1IN54_lut_full_update[]
     14 *    lut_partial_update[] => EPD_1IN54_lut_partial_update[] 
     15 *    EPD_Reset() => EPD_1IN54_Reset()
     16 *    EPD_SendCommand() => EPD_1IN54_SendCommand()
     17 *    EPD_SendData() => EPD_1IN54_SendData()
     18 *    EPD_WaitUntilIdle() => EPD_1IN54_ReadBusy()
     19 *    EPD_SetLut() => EPD_1IN54_SetLut()
     20 *    EPD_SetWindow() => EPD_1IN54_SetWindow()
     21 *    EPD_SetCursor() => EPD_1IN54_SetCursor()
     22 *    EPD_TurnOnDisplay() => EPD_1IN54_TurnOnDisplay()
     23 *    EPD_Init() => EPD_1IN54_Init()
     24 *    EPD_Clear() => EPD_1IN54_Clear()
     25 *    EPD_Display() => EPD_1IN54_Display()
     26 *    EPD_Sleep() => EPD_1IN54_Sleep()
     27 * 2.remove commands define:
     28 *   #define PANEL_SETTING                               0x00
     29 *   #define POWER_SETTING                               0x01
     30 *   #define POWER_OFF                                   0x02
     31 *   #define POWER_OFF_SEQUENCE_SETTING                  0x03
     32 *   #define POWER_ON                                    0x04
     33 *   #define POWER_ON_MEASURE                            0x05
     34 *   #define BOOSTER_SOFT_START                          0x06
     35 *   #define DEEP_SLEEP                                  0x07
     36 *   #define DATA_START_TRANSMISSION_1                   0x10
     37 *   #define DATA_STOP                                   0x11
     38 *   #define DISPLAY_REFRESH                             0x12
     39 *   #define DATA_START_TRANSMISSION_2                   0x13
     40 *   #define PLL_CONTROL                                 0x30
     41 *   #define TEMPERATURE_SENSOR_COMMAND                  0x40
     42 *   #define TEMPERATURE_SENSOR_CALIBRATION              0x41
     43 *   #define TEMPERATURE_SENSOR_WRITE                    0x42
     44 *   #define TEMPERATURE_SENSOR_READ                     0x43
     45 *   #define VCOM_AND_DATA_INTERVAL_SETTING              0x50
     46 *   #define LOW_POWER_DETECTION                         0x51
     47 *   #define TCON_SETTING                                0x60
     48 *   #define TCON_RESOLUTION                             0x61
     49 *   #define SOURCE_AND_GATE_START_SETTING               0x62
     50 *   #define GET_STATUS                                  0x71
     51 *   #define AUTO_MEASURE_VCOM                           0x80
     52 *   #define VCOM_VALUE                                  0x81
     53 *   #define VCM_DC_SETTING_REGISTER                     0x82
     54 *   #define PROGRAM_MODE                                0xA0
     55 *   #define ACTIVE_PROGRAM                              0xA1
     56 *   #define READ_OTP_DATA                               0xA2
     57 * -----------------------------------------------------------------------------
     58 * V2.0(2018-10-30):
     59 * 1.Remove:ImageBuff[EPD_1IN54_HEIGHT * EPD_1IN54_WIDTH / 8]
     60 * 2.Change:EPD_Display(UBYTE *Image)
     61 *   Need to pass parameters: pointer to cached data
     62 * 3.Change:
     63 *   EPD_RST -> EPD_RST_PIN
     64 *   EPD_DC -> EPD_DC_PIN
     65 *   EPD_CS -> EPD_CS_PIN
     66 *   EPD_BUSY -> EPD_BUSY_PIN
     67 #
     68 # Permission is hereby granted, free of charge, to any person obtaining a copy
     69 # of this software and associated documnetation files (the "Software"), to deal
     70 # in the Software without restriction, including without limitation the rights
     71 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     72 # copies of the Software, and to permit persons to  whom the Software is
     73 # furished to do so, subject to the following conditions:
     74 #
     75 # The above copyright notice and this permission notice shall be included in
     76 # all copies or substantial portions of the Software.
     77 #
     78 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     79 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     80 # FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     81 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     82 # LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     83 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     84 # THE SOFTWARE.
     85 #
     86 ******************************************************************************/
     87 #ifndef __EPD_1IN54_H_
     88 #define __EPD_1IN54_H_
     89 
     90 #include "DEV_Config.h"
     91 
     92 // Display resolution
     93 #define EPD_1IN54_WIDTH			200
     94 #define EPD_1IN54_HEIGHT		200
     95 
     96 #define EPD_1IN54_FULL			0
     97 #define EPD_1IN54_PART			1
     98 
     99 void EPD_1IN54_Init(UBYTE Mode);
    100 void EPD_1IN54_Clear(void);
    101 void EPD_1IN54_Display(UBYTE *Image);
    102 void EPD_1IN54_Sleep(void);
    103 
    104 #endif