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
11#pragma once
12
54
55#include "lcd.h"
56
57#ifdef MODULE_DISP_DEV
58#include "disp_dev.h"
59#endif
60
61#ifdef __cplusplus
62extern "C" {
63#endif
64
71#ifndef CONFIG_ST7735_CUSTOM_CONFIG
72#define CONFIG_ST7735_CUSTOM_CONFIG 0
73#endif
74
82#ifndef CONFIG_ST7735_AVDD
83#define CONFIG_ST7735_AVDD 4900
84#endif
85
93#ifndef CONFIG_ST7735_GVDD
94#define CONFIG_ST7735_GVDD 4600
95#endif
96
104#ifndef CONFIG_ST7735_GVCL
105#define CONFIG_ST7735_GVCL -4600
106#endif
107
117#ifndef CONFIG_ST7735_VCOM
118#define CONFIG_ST7735_VCOM -775
119#endif
120
128#ifndef CONFIG_ST7735_VGH
129#define CONFIG_ST7735_VGH 14700
130#endif
131
139#ifndef CONFIG_ST7735_VGL
140#define CONFIG_ST7735_VGL -10000
141#endif
142
149#ifndef CONFIG_ST7789_CUSTOM_CONFIG
150#define CONFIG_ST7789_CUSTOM_CONFIG 0
151#endif
152
160#ifndef CONFIG_ST7789_AVDD
161#define CONFIG_ST7789_AVDD 6800
162#endif
163
171#ifndef CONFIG_ST7789_AVCL
172#define CONFIG_ST7789_AVCL -4800
173#endif
174
190#ifndef CONFIG_ST7789_VCOM
191#define CONFIG_ST7789_VCOM 900
192#endif
193
208#ifndef CONFIG_ST7789_VCOM_OFFSET
209#define CONFIG_ST7789_VCOM_OFFSET 0
210#endif
211
225#ifndef CONFIG_ST7789_VDV
226#define CONFIG_ST7789_VDV 0
227#endif
228
242#ifndef CONFIG_ST7789_VRH
243#define CONFIG_ST7789_VRH 4100
244#endif
245
252#ifndef CONFIG_ST7796_CUSTOM_CONFIG
253#define CONFIG_ST7796_CUSTOM_CONFIG 0
254#endif
255
263#ifndef CONFIG_ST7796_AVDD
264#define CONFIG_ST7796_AVDD 6600
265#endif
266
274#ifndef CONFIG_ST7796_AVCL
275#define CONFIG_ST7796_AVCL -4400
276#endif
277
293#ifndef CONFIG_ST7796_VCOM
294#define CONFIG_ST7796_VCOM 1000
295#endif
296
311#ifndef CONFIG_ST7796_VCOM_OFFSET
312#define CONFIG_ST7796_VCOM_OFFSET 0
313#endif
314
328#ifndef CONFIG_ST7796_VRH
329#define CONFIG_ST7796_VRH 4100
330#endif
331
364#define ST77XX_ROTATION_VERT 0
365#define ST77XX_ROTATION_VERT_FLIP LCD_MADCTL_MX | \
366 LCD_MADCTL_MY
367#define ST77XX_ROTATION_HORZ LCD_MADCTL_MV | \
368 LCD_MADCTL_MX
369#define ST77XX_ROTATION_HORZ_FLIP LCD_MADCTL_MV | \
370 LCD_MADCTL_MY
371
372#define ST77XX_ROTATION_0 0
373#define ST77XX_ROTATION_90 LCD_MADCTL_MV | \
374 LCD_MADCTL_MY
375#define ST77XX_ROTATION_180 LCD_MADCTL_MX | \
376 LCD_MADCTL_MY
377#define ST77XX_ROTATION_270 LCD_MADCTL_MV | \
378 LCD_MADCTL_MX
379
380
384enum {
385 ST77XX_CNTRL_ST7735,
386 ST77XX_CNTRL_ST7789,
387 ST77XX_CNTRL_ST7796,
388};
389
394typedef struct {
396} st77xx_t;
397
402
403#ifdef __cplusplus
404}
405#endif
struct lcd_driver lcd_driver_t
LCD driver interface.
Definition lcd.h:170
const lcd_driver_t lcd_st77xx_driver
LCD device operations table.
Device descriptor for a lcd.
Definition lcd.h:175
Device descriptor for a ST77xx display.
Definition st77xx.h:394
lcd_t dev
Pointer to the common lcd device.
Definition st77xx.h:395