Loading...
Searching...
No Matches
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
19#ifndef EPD_BW_SPI_PARAMS_H
20#define EPD_BW_SPI_PARAMS_H
21
22#include "board.h"
23#include "epd_bw_spi.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
32static const uint8_t epd_bw_spi_il3829_lut_default_full[] = {
33 0x50, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
34 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
36};
37
41static const uint8_t epd_bw_spi_il3829_lut_default_part[] = {
42 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00,
43 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
45
49#define EPD_BW_SPI_CONTROLLER_IL3829 { \
50 .vcom = 0xA8, \
51 .size_x = 200, \
52 .size_y = 300, \
53 .lut_size = sizeof epd_bw_spi_il3829_lut_default_full, \
54 .lut_full = epd_bw_spi_il3829_lut_default_full, \
55 .lut_part = epd_bw_spi_il3829_lut_default_part, \
56}
57
61#define EPD_BW_SPI_CONTROLLER_SSD1607 EPD_BW_SPI_CONTROLLER_IL3829
62
66#define EPD_BW_SPI_CONTROLLER_SSD1673 { \
67 .vcom = 0xA8, \
68 .size_x = 150, \
69 .size_y = 250, \
70 .lut_size = sizeof epd_bw_spi_il3829_lut_default_full, \
71 .lut_full = epd_bw_spi_il3829_lut_default_full, \
72 .lut_part = epd_bw_spi_il3829_lut_default_part, \
73}
74
78#define EPD_BW_SPI_CONTROLLER_SSD1608 { \
79 .vcom = 0xA8, \
80 .size_x = 240, \
81 .size_y = 320, \
82 .lut_size = sizeof epd_bw_spi_il3829_lut_default_full, \
83 .lut_full = epd_bw_spi_il3829_lut_default_full, \
84 .lut_part = epd_bw_spi_il3829_lut_default_part, \
85}
86
87#ifndef EPD_BW_SPI_DISPLAY_X
91#define EPD_BW_SPI_DISPLAY_X (200)
92#endif
93
94#ifndef EPD_BW_SPI_DISPLAY_Y
98#define EPD_BW_SPI_DISPLAY_Y (200)
99#endif
100
101#ifndef EPD_BW_SPI_PARAM_SPI
105#define EPD_BW_SPI_PARAM_SPI (SPI_DEV(0))
106#endif
107
108#ifndef EPD_BW_SPI_PARAM_SPI_CLK
112#define EPD_BW_SPI_PARAM_SPI_CLK (SPI_CLK_5MHZ)
113#endif
114
118#ifndef EPD_BW_SPI_PARAM_CS
119#define EPD_BW_SPI_PARAM_CS (SPI_CS_UNDEF)
120#endif
121
125#ifndef EPD_BW_SPI_PARAM_DC
126#define EPD_BW_SPI_PARAM_DC (GPIO_UNDEF)
127#endif
128
132#ifndef EPD_BW_SPI_PARAM_RST
133#define EPD_BW_SPI_PARAM_RST (GPIO_UNDEF)
134#endif
135
136#ifndef EPD_BW_SPI_PARAM_BUSY
140#define EPD_BW_SPI_PARAM_BUSY (GPIO_UNDEF)
141#endif
142
143#ifndef EPD_BW_SPI_PARAM_BUSY_VAL
147#define EPD_BW_SPI_PARAM_BUSY_VAL (1)
148#endif
149
150#ifndef EPD_BW_SPI_CONTROLLER
154#define EPD_BW_SPI_CONTROLLER EPD_BW_SPI_CONTROLLER_IL3829
155#endif
156
157#ifndef EPD_BW_SPI_ENTRY_MODE
161#define EPD_BW_SPI_ENTRY_MODE EPD_BW_SPI_Y_INC_X_INC
162#endif
163
164#ifndef EPD_BW_SPI_PARTIAL_REFRESH_MAX
170#define EPD_BW_SPI_PARTIAL_REFRESH_MAX (99)
171#endif
172
173#ifndef EPD_BW_SPI_PARAMS
177#define EPD_BW_SPI_PARAMS { .spi = EPD_BW_SPI_PARAM_SPI, \
178 .spi_clk = EPD_BW_SPI_PARAM_SPI_CLK, \
179 .cs_pin = EPD_BW_SPI_PARAM_CS, \
180 .dc_pin = EPD_BW_SPI_PARAM_DC, \
181 .rst_pin = EPD_BW_SPI_PARAM_RST, \
182 .busy_pin = EPD_BW_SPI_PARAM_BUSY, \
183 .busy_value = EPD_BW_SPI_PARAM_BUSY_VAL, \
184 .controller = EPD_BW_SPI_CONTROLLER, \
185 .entry_mode = EPD_BW_SPI_ENTRY_MODE, \
186 .size_x = EPD_BW_SPI_DISPLAY_X, \
187 .size_y = EPD_BW_SPI_DISPLAY_Y, \
188 .partial_refresh_max = \
189 EPD_BW_SPI_PARTIAL_REFRESH_MAX, \
190}
191#endif
192
200
201#ifdef __cplusplus
202}
203#endif
204#endif /* EPD_BW_SPI_PARAMS_H */
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:85