Loading...
Searching...
No Matches
st77xx.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Koen Zandberg
3 * SPDX-FileCopyrightText: 2021 Francisco Molina
4 * SPDX-FileCopyrightText: 2023 Gunar Schorcht
5 * SPDX-License-Identifier: LGPL-2.1-only
6 */
7
8#pragma once
9
51
52#include "lcd.h"
53
54#ifdef MODULE_DISP_DEV
55#include "disp_dev.h"
56#endif
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
68#ifndef CONFIG_ST7735_CUSTOM_CONFIG
69#define CONFIG_ST7735_CUSTOM_CONFIG 0
70#endif
71
79#ifndef CONFIG_ST7735_AVDD
80#define CONFIG_ST7735_AVDD 4900
81#endif
82
90#ifndef CONFIG_ST7735_GVDD
91#define CONFIG_ST7735_GVDD 4600
92#endif
93
101#ifndef CONFIG_ST7735_GVCL
102#define CONFIG_ST7735_GVCL -4600
103#endif
104
114#ifndef CONFIG_ST7735_VCOM
115#define CONFIG_ST7735_VCOM -775
116#endif
117
125#ifndef CONFIG_ST7735_VGH
126#define CONFIG_ST7735_VGH 14700
127#endif
128
136#ifndef CONFIG_ST7735_VGL
137#define CONFIG_ST7735_VGL -10000
138#endif
139
146#ifndef CONFIG_ST7789_CUSTOM_CONFIG
147#define CONFIG_ST7789_CUSTOM_CONFIG 0
148#endif
149
157#ifndef CONFIG_ST7789_AVDD
158#define CONFIG_ST7789_AVDD 6800
159#endif
160
168#ifndef CONFIG_ST7789_AVCL
169#define CONFIG_ST7789_AVCL -4800
170#endif
171
187#ifndef CONFIG_ST7789_VCOM
188#define CONFIG_ST7789_VCOM 900
189#endif
190
205#ifndef CONFIG_ST7789_VCOM_OFFSET
206#define CONFIG_ST7789_VCOM_OFFSET 0
207#endif
208
222#ifndef CONFIG_ST7789_VDV
223#define CONFIG_ST7789_VDV 0
224#endif
225
239#ifndef CONFIG_ST7789_VRH
240#define CONFIG_ST7789_VRH 4100
241#endif
242
249#ifndef CONFIG_ST7796_CUSTOM_CONFIG
250#define CONFIG_ST7796_CUSTOM_CONFIG 0
251#endif
252
260#ifndef CONFIG_ST7796_AVDD
261#define CONFIG_ST7796_AVDD 6600
262#endif
263
271#ifndef CONFIG_ST7796_AVCL
272#define CONFIG_ST7796_AVCL -4400
273#endif
274
290#ifndef CONFIG_ST7796_VCOM
291#define CONFIG_ST7796_VCOM 1000
292#endif
293
308#ifndef CONFIG_ST7796_VCOM_OFFSET
309#define CONFIG_ST7796_VCOM_OFFSET 0
310#endif
311
325#ifndef CONFIG_ST7796_VRH
326#define CONFIG_ST7796_VRH 4100
327#endif
328
361#define ST77XX_ROTATION_VERT 0
362#define ST77XX_ROTATION_VERT_FLIP LCD_MADCTL_MX | \
363 LCD_MADCTL_MY
364#define ST77XX_ROTATION_HORZ LCD_MADCTL_MV | \
365 LCD_MADCTL_MX
366#define ST77XX_ROTATION_HORZ_FLIP LCD_MADCTL_MV | \
367 LCD_MADCTL_MY
368
369#define ST77XX_ROTATION_0 0
370#define ST77XX_ROTATION_90 LCD_MADCTL_MV | \
371 LCD_MADCTL_MY
372#define ST77XX_ROTATION_180 LCD_MADCTL_MX | \
373 LCD_MADCTL_MY
374#define ST77XX_ROTATION_270 LCD_MADCTL_MV | \
375 LCD_MADCTL_MX
376
377
381enum {
382 ST77XX_CNTRL_ST7735,
383 ST77XX_CNTRL_ST7789,
384 ST77XX_CNTRL_ST7796,
385};
386
391typedef struct {
393} st77xx_t;
394
399
400#ifdef __cplusplus
401}
402#endif
struct lcd_driver lcd_driver_t
LCD driver interface.
Definition lcd.h:167
const lcd_driver_t lcd_st77xx_driver
LCD device operations table.
Device descriptor for a lcd.
Definition lcd.h:172
Device descriptor for a ST77xx display.
Definition st77xx.h:391
lcd_t dev
Pointer to the common lcd device.
Definition st77xx.h:392