Loading...
Searching...
No Matches
st77xx.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Koen Zandberg
3 * 2021 Francisco Molina
4 * 2023 Gunar Schorcht
5 *
6 * This file is subject to the terms and conditions of the GNU Lesser
7 * General Public License v2.1. See the file LICENSE in the top level
8 * directory for more details.
9 */
10
53#ifndef ST77XX_H
54#define ST77XX_H
55
56#include "lcd.h"
57
58#ifdef MODULE_DISP_DEV
59#include "disp_dev.h"
60#endif
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
72#ifndef CONFIG_ST7735_CUSTOM_CONFIG
73#define CONFIG_ST7735_CUSTOM_CONFIG 0
74#endif
75
83#ifndef CONFIG_ST7735_AVDD
84#define CONFIG_ST7735_AVDD 4900
85#endif
86
94#ifndef CONFIG_ST7735_GVDD
95#define CONFIG_ST7735_GVDD 4600
96#endif
97
105#ifndef CONFIG_ST7735_GVCL
106#define CONFIG_ST7735_GVCL -4600
107#endif
108
118#ifndef CONFIG_ST7735_VCOM
119#define CONFIG_ST7735_VCOM -775
120#endif
121
129#ifndef CONFIG_ST7735_VGH
130#define CONFIG_ST7735_VGH 14700
131#endif
132
140#ifndef CONFIG_ST7735_VGL
141#define CONFIG_ST7735_VGL -10000
142#endif
143
150#ifndef CONFIG_ST7789_CUSTOM_CONFIG
151#define CONFIG_ST7789_CUSTOM_CONFIG 0
152#endif
153
161#ifndef CONFIG_ST7789_AVDD
162#define CONFIG_ST7789_AVDD 6800
163#endif
164
172#ifndef CONFIG_ST7789_AVCL
173#define CONFIG_ST7789_AVCL -4800
174#endif
175
191#ifndef CONFIG_ST7789_VCOM
192#define CONFIG_ST7789_VCOM 900
193#endif
194
209#ifndef CONFIG_ST7789_VCOM_OFFSET
210#define CONFIG_ST7789_VCOM_OFFSET 0
211#endif
212
226#ifndef CONFIG_ST7789_VDV
227#define CONFIG_ST7789_VDV 0
228#endif
229
243#ifndef CONFIG_ST7789_VRH
244#define CONFIG_ST7789_VRH 4100
245#endif
246
253#ifndef CONFIG_ST7796_CUSTOM_CONFIG
254#define CONFIG_ST7796_CUSTOM_CONFIG 0
255#endif
256
264#ifndef CONFIG_ST7796_AVDD
265#define CONFIG_ST7796_AVDD 6600
266#endif
267
275#ifndef CONFIG_ST7796_AVCL
276#define CONFIG_ST7796_AVCL -4400
277#endif
278
294#ifndef CONFIG_ST7796_VCOM
295#define CONFIG_ST7796_VCOM 1000
296#endif
297
312#ifndef CONFIG_ST7796_VCOM_OFFSET
313#define CONFIG_ST7796_VCOM_OFFSET 0
314#endif
315
329#ifndef CONFIG_ST7796_VRH
330#define CONFIG_ST7796_VRH 4100
331#endif
332
365#define ST77XX_ROTATION_VERT 0
366#define ST77XX_ROTATION_VERT_FLIP LCD_MADCTL_MX | \
367 LCD_MADCTL_MY
368#define ST77XX_ROTATION_HORZ LCD_MADCTL_MV | \
369 LCD_MADCTL_MX
370#define ST77XX_ROTATION_HORZ_FLIP LCD_MADCTL_MV | \
371 LCD_MADCTL_MY
373#define ST77XX_ROTATION_0 0
374#define ST77XX_ROTATION_90 LCD_MADCTL_MV | \
375 LCD_MADCTL_MY
376#define ST77XX_ROTATION_180 LCD_MADCTL_MX | \
377 LCD_MADCTL_MY
378#define ST77XX_ROTATION_270 LCD_MADCTL_MV | \
379 LCD_MADCTL_MX
385enum {
386 ST77XX_CNTRL_ST7735,
387 ST77XX_CNTRL_ST7789,
388 ST77XX_CNTRL_ST7796,
389};
390
395typedef struct {
397} st77xx_t;
398
403
404#ifdef __cplusplus
405}
406#endif
407#endif /* ST77XX_H */
const lcd_driver_t lcd_st77xx_driver
LCD device operations table.
LCD driver interface.
Definition lcd.h:196
Device descriptor for a lcd.
Definition lcd.h:176
Device descriptor for a ST77xx display.
Definition st77xx.h:395
lcd_t dev
Pointer to the common lcd device.
Definition st77xx.h:396