epd_bw_spi_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Silke Hofstra
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include "board.h"
22 #include "epd_bw_spi.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 static const uint8_t epd_bw_spi_il3829_lut_default_full[] = {
32  0x50, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
33  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34  0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
35 };
36 
40 static const uint8_t epd_bw_spi_il3829_lut_default_part[] = {
41  0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00,
42  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
43  0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
44 
48 #define EPD_BW_SPI_CONTROLLER_IL3829 { \
49  .vcom = 0xA8, \
50  .size_x = 200, \
51  .size_y = 300, \
52  .lut_size = sizeof epd_bw_spi_il3829_lut_default_full, \
53  .lut_full = epd_bw_spi_il3829_lut_default_full, \
54  .lut_part = epd_bw_spi_il3829_lut_default_part, \
55 }
56 
60 #define EPD_BW_SPI_CONTROLLER_SSD1607 EPD_BW_SPI_CONTROLLER_IL3829
61 
65 #define EPD_BW_SPI_CONTROLLER_SSD1673 { \
66  .vcom = 0xA8, \
67  .size_x = 150, \
68  .size_y = 250, \
69  .lut_size = sizeof epd_bw_spi_il3829_lut_default_full, \
70  .lut_full = epd_bw_spi_il3829_lut_default_full, \
71  .lut_part = epd_bw_spi_il3829_lut_default_part, \
72 }
73 
77 #define EPD_BW_SPI_CONTROLLER_SSD1608 { \
78  .vcom = 0xA8, \
79  .size_x = 240, \
80  .size_y = 320, \
81  .lut_size = sizeof epd_bw_spi_il3829_lut_default_full, \
82  .lut_full = epd_bw_spi_il3829_lut_default_full, \
83  .lut_part = epd_bw_spi_il3829_lut_default_part, \
84 }
85 
86 #ifndef EPD_BW_SPI_DISPLAY_X
90 #define EPD_BW_SPI_DISPLAY_X (200)
91 #endif
92 
93 #ifndef EPD_BW_SPI_DISPLAY_Y
97 #define EPD_BW_SPI_DISPLAY_Y (200)
98 #endif
99 
100 #ifndef EPD_BW_SPI_PARAM_SPI
104 #define EPD_BW_SPI_PARAM_SPI (SPI_DEV(0))
105 #endif
106 
107 #ifndef EPD_BW_SPI_PARAM_SPI_CLK
111 #define EPD_BW_SPI_PARAM_SPI_CLK (SPI_CLK_5MHZ)
112 #endif
113 
117 #ifndef EPD_BW_SPI_PARAM_CS
118 #define EPD_BW_SPI_PARAM_CS (SPI_CS_UNDEF)
119 #endif
120 
124 #ifndef EPD_BW_SPI_PARAM_DC
125 #define EPD_BW_SPI_PARAM_DC (GPIO_UNDEF)
126 #endif
127 
131 #ifndef EPD_BW_SPI_PARAM_RST
132 #define EPD_BW_SPI_PARAM_RST (GPIO_UNDEF)
133 #endif
134 
135 #ifndef EPD_BW_SPI_PARAM_BUSY
139 #define EPD_BW_SPI_PARAM_BUSY (GPIO_UNDEF)
140 #endif
141 
142 #ifndef EPD_BW_SPI_PARAM_BUSY_VAL
146 #define EPD_BW_SPI_PARAM_BUSY_VAL (1)
147 #endif
148 
149 #ifndef EPD_BW_SPI_CONTROLLER
153 #define EPD_BW_SPI_CONTROLLER EPD_BW_SPI_CONTROLLER_IL3829
154 #endif
155 
156 #ifndef EPD_BW_SPI_ENTRY_MODE
160 #define EPD_BW_SPI_ENTRY_MODE EPD_BW_SPI_Y_INC_X_INC
161 #endif
162 
163 #ifndef EPD_BW_SPI_PARTIAL_REFRESH_MAX
169 #define EPD_BW_SPI_PARTIAL_REFRESH_MAX (99)
170 #endif
171 
172 #ifndef EPD_BW_SPI_PARAMS
176 #define EPD_BW_SPI_PARAMS { .spi = EPD_BW_SPI_PARAM_SPI, \
177  .spi_clk = EPD_BW_SPI_PARAM_SPI_CLK, \
178  .cs_pin = EPD_BW_SPI_PARAM_CS, \
179  .dc_pin = EPD_BW_SPI_PARAM_DC, \
180  .rst_pin = EPD_BW_SPI_PARAM_RST, \
181  .busy_pin = EPD_BW_SPI_PARAM_BUSY, \
182  .busy_value = EPD_BW_SPI_PARAM_BUSY_VAL, \
183  .controller = EPD_BW_SPI_CONTROLLER, \
184  .entry_mode = EPD_BW_SPI_ENTRY_MODE, \
185  .size_x = EPD_BW_SPI_DISPLAY_X, \
186  .size_y = EPD_BW_SPI_DISPLAY_Y, \
187  .partial_refresh_max = \
188  EPD_BW_SPI_PARTIAL_REFRESH_MAX, \
189 }
190 #endif
191 
196 {
198 };
199 
200 #ifdef __cplusplus
201 }
202 #endif
Generic black/white e-paper/e-ink display SPI driver.
static const epd_bw_spi_params_t epd_bw_spi_params[]
Display driver configuration.
static const uint8_t epd_bw_spi_il3829_lut_default_full[]
Waveform lookup table for a full display refresh for IL3829.
#define EPD_BW_SPI_PARAMS
Parameters to initialize the display with.
static const uint8_t epd_bw_spi_il3829_lut_default_part[]
Waveform lookup table for a partial display refresh for IL3829.
SPI display device initialisation parameters.
Definition: epd_bw_spi.h:84