23#ifndef ST77XX_PARAMS_H
24#define ST77XX_PARAMS_H
28#include "st7735_params.h"
45#ifdef ST7735_PARAM_SPI
46#define ST77XX_PARAM_SPI ST7735_PARAM_SPI
48#ifdef ST7735_PARAM_SPI_CLK
49#define ST77XX_PARAM_SPI_CLK ST7735_PARAM_SPI_CLK
52#define ST77XX_PARAM_CS ST7735_PARAM_CS
54#ifdef ST7735_PARAM_DCX
55#define ST77XX_PARAM_DCX ST7735_PARAM_DCX
57#ifdef ST7735_PARAM_RST
58#define ST77XX_PARAM_RST ST7735_PARAM_RST
60#ifdef ST7735_PARAM_SPI_MODE
61#define ST77XX_PARAM_SPI_MODE ST7735_PARAM_SPI_MODE
63#ifdef ST7735_PARAM_RGB
64#define ST77XX_PARAM_RGB ST7735_PARAM_RGB
66#ifdef ST7735_PARAM_INVERTED
67#define ST77XX_PARAM_INVERTED ST7735_PARAM_INVERTED
69#ifdef ST7735_PARAM_NUM_LINES
70#define ST77XX_PARAM_NUM_LINES ST7735_PARAM_NUM_LINES
72#ifdef ST7735_PARAM_RGB_CHANNELS
73#define ST77XX_PARAM_RGB_CHANNELS ST7735_PARAM_RGB_CHANNELS
75#ifdef ST7735_PARAM_ROTATION
76#define ST77XX_PARAM_ROTATION ST7735_PARAM_ROTATION
78#ifdef ST7735_PARAM_OFFSET_X
79#define ST77XX_PARAM_OFFSET_X ST7735_PARAM_OFFSET_X
81#ifdef ST7735_PARAM_OFFSET_Y
82#define ST77XX_PARAM_OFFSET_Y ST7735_PARAM_OFFSET_Y
85#define ST77XX_PARAMS ST7735_PARAMS
87#ifdef ST7735_PARAM_SCREEN_IDS
88#define ST77XX_PARAM_SCREEN_IDS ST7735_PARAM_SCREEN_IDS
97#ifndef ST77XX_PARAM_CNTRL
98#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7735
100#ifndef ST77XX_PARAM_SPI
101#define ST77XX_PARAM_SPI SPI_DEV(0)
103#ifndef ST77XX_PARAM_SPI_CLK
104#define ST77XX_PARAM_SPI_CLK SPI_CLK_5MHZ
106#ifndef ST77XX_PARAM_CS
107#define ST77XX_PARAM_CS GPIO_PIN(2, 2)
109#ifndef ST77XX_PARAM_DCX
110#define ST77XX_PARAM_DCX GPIO_PIN(3, 13)
112#ifndef ST77XX_PARAM_RST
113#define ST77XX_PARAM_RST GPIO_UNDEF
115#ifndef ST77XX_PARAM_SPI_MODE
116#define ST77XX_PARAM_SPI_MODE SPI_MODE_0
118#ifndef ST77XX_PARAM_RGB
119#define ST77XX_PARAM_RGB 0
121#ifndef ST77XX_PARAM_INVERTED
122#define ST77XX_PARAM_INVERTED 0
124#ifndef ST77XX_PARAM_NUM_LINES
125#define ST77XX_PARAM_NUM_LINES 160U
127#ifndef ST77XX_PARAM_RGB_CHANNELS
128#define ST77XX_PARAM_RGB_CHANNELS 128U
130#ifndef ST77XX_PARAM_ROTATION
131#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_HORZ
133#ifndef ST77XX_PARAM_OFFSET_X
134#define ST77XX_PARAM_OFFSET_X 0
136#ifndef ST77XX_PARAM_OFFSET_Y
137#define ST77XX_PARAM_OFFSET_Y 0
140#if MODULE_LCD_SPI || DOXYGEN
142#define ST77XX_PARAM_IF_SPI .spi = ST77XX_PARAM_SPI, \
143 .spi_clk = ST77XX_PARAM_SPI_CLK, \
144 .spi_mode = ST77XX_PARAM_SPI_MODE,
146#define ST77XX_PARAM_IF_SPI
149#if MODULE_LCD_PARALLEL || DOXYGEN
151#define ST77XX_PARAM_IF_PAR .d0_pin = ST77XX_PARAM_D0, \
152 .d1_pin = ST77XX_PARAM_D1, \
153 .d2_pin = ST77XX_PARAM_D2, \
154 .d3_pin = ST77XX_PARAM_D3, \
155 .d4_pin = ST77XX_PARAM_D4, \
156 .d5_pin = ST77XX_PARAM_D5, \
157 .d6_pin = ST77XX_PARAM_D6, \
158 .d7_pin = ST77XX_PARAM_D7, \
159 .wrx_pin = ST77XX_PARAM_WRX, \
160 .rdx_pin = ST77XX_PARAM_RDX,
162#define ST77XX_PARAM_IF_PAR
165#if MODULE_LCD_PARALLEL_16BIT || DOXYGEN
167#define ST77XX_PARAM_IF_PAR_16BIT .d8_pin = ST77XX_PARAM_D8, \
168 .d9_pin = ST77XX_PARAM_D9, \
169 .d10_pin = ST77XX_PARAM_D10, \
170 .d11_pin = ST77XX_PARAM_D11, \
171 .d12_pin = ST77XX_PARAM_D12, \
172 .d13_pin = ST77XX_PARAM_D13, \
173 .d14_pin = ST77XX_PARAM_D14, \
174 .d15_pin = ST77XX_PARAM_D15,
176#define ST77XX_PARAM_IF_PAR_16BIT
179#if MODULE_LCD_PARALLEL_16BIT || DOXYGEN
181#define ST77XX_PARAM_IF_MODE .mode = LCD_IF_PARALLEL_16BIT,
182#elif MODULE_LCD_PARALLEL
184#define ST77XX_PARAM_IF_MODE .mode = LCD_IF_PARALLEL_8BIT,
187#define ST77XX_PARAM_IF_MODE
202#define ST77XX_PARAMS { ST77XX_PARAM_IF_MODE \
203 ST77XX_PARAM_IF_SPI \
204 ST77XX_PARAM_IF_PAR \
205 ST77XX_PARAM_IF_PAR_16BIT \
206 .cntrl = ST77XX_PARAM_CNTRL, \
207 .cs_pin = ST77XX_PARAM_CS, \
208 .dcx_pin = ST77XX_PARAM_DCX, \
209 .rst_pin = ST77XX_PARAM_RST, \
210 .rgb = ST77XX_PARAM_RGB, \
211 .inverted = ST77XX_PARAM_INVERTED, \
212 .lines = ST77XX_PARAM_NUM_LINES, \
213 .rgb_channels = ST77XX_PARAM_RGB_CHANNELS, \
214 .rotation = ST77XX_PARAM_ROTATION, \
215 .offset_x = ST77XX_PARAM_OFFSET_X, \
216 .offset_y = ST77XX_PARAM_OFFSET_Y, \
224#ifndef ST77XX_PARAM_SCREEN_IDS
225#define ST77XX_PARAM_SCREEN_IDS 0
247#define ST77XX_NUMOF ARRAY_SIZE(st77xx_params)
251#define ST77XX_SCREEN_NUMOF ARRAY_SIZE(st77xx_screen_ids)
static const lcd_params_t st77xx_params[]
Configure LCD.
static const uint8_t st77xx_screen_ids[]
Configure screen identifiers.
#define ST77XX_PARAM_SCREEN_IDS
Default screen identifiers.
#define ST77XX_PARAMS
Default params.
Device initialization parameters.