EPD_1in54b.h 4.8 KB

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