1 /*
2  * Copyright 2023, NXP
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef _ZEPHYR_DRIVERS_DISPLAY_ST7796S_H_
8 #define _ZEPHYR_DRIVERS_DISPLAY_ST7796S_H_
9 
10 #define ST7796S_CMD_SLPIN	0x10 /* Sleep in */
11 #define ST7796S_CMD_SLPOUT	0x11 /* Sleep out */
12 #define ST7796S_CMD_INVOFF	0x20 /* Display inversion off */
13 #define ST7796S_CMD_INVON	0x21 /* Display inversion on */
14 #define ST7796S_CMD_CASET	0x2A /* Column address set */
15 #define ST7796S_CMD_RASET	0x2B /* Row address set */
16 #define ST7796S_CMD_RAMWR	0x2C /* Memory write */
17 #define ST7796S_CMD_DISPOFF	0x28 /* Display off */
18 #define ST7796S_CMD_DISPON	0x29 /* Display on */
19 #define ST7796S_CMD_MADCTL	0x36 /* Memory data access control */
20 #define ST7796S_CMD_COLMOD	0x3A /* Interface pixel format */
21 #define ST7796S_CMD_FRMCTR1	0xB1 /* Frame rate control 1 (normal mode) */
22 #define ST7796S_CMD_FRMCTR2	0xB2 /* Frame rate control 2 (idle mode) */
23 #define ST7796S_CMD_FRMCTR3	0xB3 /* Frame rate control 3 (partial mode) */
24 #define ST7796S_CMD_DIC		0xB4 /* Display inversion control */
25 #define ST7796S_CMD_BPC		0xB5 /* Blanking porch control */
26 #define ST7796S_CMD_DFC		0xB6 /* Display function control */
27 #define ST7796S_CMD_PWR1	0xC0 /* Power control 1 */
28 #define ST7796S_CMD_PWR2	0xC1 /* Power control 1 */
29 #define ST7796S_CMD_PWR3	0xC2 /* Power control 1 */
30 #define ST7796S_CMD_VCMPCTL	0xC5 /* VCOM control */
31 #define ST7796S_CMD_PGC		0xE0 /* Positive gamma control */
32 #define ST7796S_CMD_NGC		0xE1 /* Negative gamma control */
33 #define ST7796S_CMD_DOCA	0xE8 /* Display output control adjust */
34 #define ST7796S_CMD_CSCON	0xF0 /* Command set control */
35 
36 #define ST7796S_CONTROL_16BIT 0x5 /* Sets control interface to 16 bit mode */
37 #define ST7796S_MADCTL_BGR BIT(3) /* Sets BGR color mode */
38 
39 
40 #endif /* _ZEPHYR_DRIVERS_DISPLAY_ST7796S_H_ */
41