EPD_2in7.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*****************************************************************************
  2. * | File : EPD_2in7.h
  3. * | Author : Waveshare team
  4. * | Function : 2.7inch e-paper
  5. * | Info :
  6. *----------------
  7. * | This version: V3.0
  8. * | Date : 2019-06-12
  9. * | Info :
  10. * -----------------------------------------------------------------------------
  11. * V3.0(2019-06-12):
  12. * 1.Change:
  13. * lut_vcom_dc[] => EPD_2in7_lut_vcom_dc[]
  14. * lut_ww[] => EPD_2in7_lut_ww[]
  15. * lut_bw[] => EPD_2in7_lut_bw[]
  16. * lut_bb[] => EPD_2in7_lut_bb[]
  17. * lut_wb[] => EPD_2in7_lut_wb[]
  18. * EPD_Reset() => EPD_2in7_Reset()
  19. * EPD_SendCommand() => EPD_2in7_SendCommand()
  20. * EPD_SendData() => EPD_2in7_SendData()
  21. * EPD_WaitUntilIdle() => EPD_2in7_ReadBusy()
  22. * EPD_SetLut() => EPD_2in7_SetLut()
  23. * EPD_Init() => EPD_2in7_Init()
  24. * EPD_Clear() => EPD_2in7_Clear()
  25. * EPD_Display() => EPD_2in7_Display()
  26. * EPD_Sleep() => EPD_2in7_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-11-06):
  59. * 1.Remove:ImageBuff[EPD_HEIGHT * EPD_WIDTH / 8]
  60. * 2.Change:EPD_Display(UBYTE *Image)
  61. * Need to pass parameters: pointer to cached data
  62. #
  63. # Permission is hereby granted, free of charge, to any person obtaining a copy
  64. # of this software and associated documnetation files (the "Software"), to deal
  65. # in the Software without restriction, including without limitation the rights
  66. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  67. # copies of the Software, and to permit persons to whom the Software is
  68. # furished to do so, subject to the following conditions:
  69. #
  70. # The above copyright notice and this permission notice shall be included in
  71. # all copies or substantial portions of the Software.
  72. #
  73. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  74. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  75. # FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  76. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  77. # LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  78. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  79. # THE SOFTWARE.
  80. #
  81. ******************************************************************************/
  82. #ifndef __EPD_2IN7_H_
  83. #define __EPD_2IN7_H_
  84. #include "DEV_Config.h"
  85. // Display resolution
  86. #define EPD_2IN7_WIDTH 176
  87. #define EPD_2IN7_HEIGHT 264
  88. void EPD_2IN7_Init(void);
  89. void EPD_2IN7_Clear(void);
  90. void EPD_2IN7_Display(UBYTE *Image);
  91. void EPD_2IN7_Sleep(void);
  92. #endif