Select one of the symbols to view example projects that use it.
 
Outline
#define __ST7789H2_H
#include <stdio.h>
#include "../Common/lcd.h"
#define ST7789H2_ID
#define ST7789H2_LCD_PIXEL_WIDTH
#define ST7789H2_LCD_PIXEL_HEIGHT
#define ST7789H2_ORIENTATION_PORTRAIT
#define ST7789H2_ORIENTATION_LANDSCAPE
#define ST7789H2_ORIENTATION_LANDSCAPE_ROT180
#define ST7789H2_LCD_ID
#define ST7789H2_SLEEP_IN
#define ST7789H2_SLEEP_OUT
#define ST7789H2_PARTIAL_DISPLAY
#define ST7789H2_DISPLAY_INVERSION
#define ST7789H2_DISPLAY_ON
#define ST7789H2_WRITE_RAM
#define ST7789H2_READ_RAM
#define ST7789H2_CASET
#define ST7789H2_RASET
#define ST7789H2_VSCRDEF
#define ST7789H2_VSCSAD
#define ST7789H2_TEARING_EFFECT
#define ST7789H2_NORMAL_DISPLAY
#define ST7789H2_IDLE_MODE_OFF
#define ST7789H2_IDLE_MODE_ON
#define ST7789H2_COLOR_MODE
#define ST7789H2_WRCABCMB
#define ST7789H2_RDCABCMB
#define ST7789H2_PORCH_CTRL
#define ST7789H2_GATE_CTRL
#define ST7789H2_VCOM_SET
#define ST7789H2_DISPLAY_OFF
#define ST7789H2_LCM_CTRL
#define ST7789H2_VDV_VRH_EN
#define ST7789H2_VDV_SET
#define ST7789H2_VCOMH_OFFSET_SET
#define ST7789H2_FR_CTRL
#define ST7789H2_POWER_CTRL
#define ST7789H2_PV_GAMMA_CTRL
#define ST7789H2_NV_GAMMA_CTRL
ST7789H2_Init();
ST7789H2_SetOrientation(uint32_t);
ST7789H2_ReadID();
ST7789H2_WriteReg(uint8_t, uint8_t *, uint8_t);
ST7789H2_ReadReg(uint8_t);
ST7789H2_DisplayOn();
ST7789H2_DisplayOff();
ST7789H2_SetCursor(uint16_t, uint16_t);
ST7789H2_WritePixel(uint16_t, uint16_t, uint16_t);
ST7789H2_ReadPixel(uint16_t, uint16_t);
ST7789H2_DrawHLine(uint16_t, uint16_t, uint16_t, uint16_t);
ST7789H2_DrawVLine(uint16_t, uint16_t, uint16_t, uint16_t);
ST7789H2_DrawBitmap(uint16_t, uint16_t, uint8_t *);
ST7789H2_DrawRGBImage(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t *);
ST7789H2_SetDisplayWindow(uint16_t, uint16_t, uint16_t, uint16_t);
ST7789H2_GetLcdPixelWidth();
ST7789H2_GetLcdPixelHeight();
ST7789H2_drv;
LCD_IO_Init();
LCD_IO_WriteMultipleData(uint16_t *, uint32_t);
LCD_IO_WriteReg(uint8_t);
LCD_IO_WriteData(uint16_t);
LCD_IO_ReadData();
LCD_IO_Delay(uint32_t);
Files
loading...
SourceVuSTM32 Libraries and Samplesst7789h2st7789h2.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file st7789h2.h * @author MCD Application Team * @brief This file contains all the functions prototypes for the st7789h2.c * driver. ****************************************************************************** * @attention * * Copyright (c) 2016 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __ST7789H2_H #define __ST7789H2_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include <stdio.h> #include "../Common/lcd.h" /** @addtogroup BSP * @{ *//* ... */ /** @addtogroup Components * @{ *//* ... */ /** @addtogroup ST7789H2 * @{ *//* ... */ /** @defgroup ST7789H2_Exported_Types ST7789H2 Exported Types * @{ *//* ... */ /** * @} *//* ... */ /** @defgroup ST7789H2_Exported_Constants ST7789H2 Exported Constants * @{ *//* ... */ /** * @brief ST7789H2 ID *//* ... */ #define ST7789H2_ID 0x85 /** * @brief ST7789H2 Size *//* ... */ #define ST7789H2_LCD_PIXEL_WIDTH ((uint16_t)240) #define ST7789H2_LCD_PIXEL_HEIGHT ((uint16_t)240) /** * @brief LCD_OrientationTypeDef * Possible values of Display Orientation *//* ... */ #define ST7789H2_ORIENTATION_PORTRAIT ((uint32_t)0x00) /* Portrait orientation choice of LCD screen */ #define ST7789H2_ORIENTATION_LANDSCAPE ((uint32_t)0x01) /* Landscape orientation choice of LCD screen */ #define ST7789H2_ORIENTATION_LANDSCAPE_ROT180 ((uint32_t)0x02) /* Landscape rotated 180� orientation choice of LCD screen */ /** * @brief ST7789H2 Registers *//* ... */ #define ST7789H2_LCD_ID 0x04 #define ST7789H2_SLEEP_IN 0x10 #define ST7789H2_SLEEP_OUT 0x11 #define ST7789H2_PARTIAL_DISPLAY 0x12 #define ST7789H2_DISPLAY_INVERSION 0x21 #define ST7789H2_DISPLAY_ON 0x29 #define ST7789H2_WRITE_RAM 0x2C #define ST7789H2_READ_RAM 0x2E #define ST7789H2_CASET 0x2A #define ST7789H2_RASET 0x2B #define ST7789H2_VSCRDEF 0x33 /* Vertical Scroll Definition */ #define ST7789H2_VSCSAD 0x37 /* Vertical Scroll Start Address of RAM */ #define ST7789H2_TEARING_EFFECT 0x35 #define ST7789H2_NORMAL_DISPLAY 0x36 #define ST7789H2_IDLE_MODE_OFF 0x38 #define ST7789H2_IDLE_MODE_ON 0x39 #define ST7789H2_COLOR_MODE 0x3A #define ST7789H2_WRCABCMB 0x5E /* Write Content Adaptive Brightness Control */ #define ST7789H2_RDCABCMB 0x5F /* Read Content Adaptive Brightness Control */ #define ST7789H2_PORCH_CTRL 0xB2 #define ST7789H2_GATE_CTRL 0xB7 #define ST7789H2_VCOM_SET 0xBB #define ST7789H2_DISPLAY_OFF 0xBD #define ST7789H2_LCM_CTRL 0xC0 #define ST7789H2_VDV_VRH_EN 0xC2 #define ST7789H2_VDV_SET 0xC4 #define ST7789H2_VCOMH_OFFSET_SET 0xC5 #define ST7789H2_FR_CTRL 0xC6 #define ST7789H2_POWER_CTRL 0xD0 #define ST7789H2_PV_GAMMA_CTRL 0xE0 #define ST7789H2_NV_GAMMA_CTRL 0xE1 37 defines /** * @} *//* ... */ /** @defgroup ST7789H2_Exported_Functions ST7789H2 Exported Functions * @{ *//* ... */ void ST7789H2_Init(void); void ST7789H2_SetOrientation(uint32_t orientation); uint16_t ST7789H2_ReadID(void); void ST7789H2_WriteReg(uint8_t Command, uint8_t *Parameters, uint8_t NbParameters); uint8_t ST7789H2_ReadReg(uint8_t Command); void ST7789H2_DisplayOn(void); void ST7789H2_DisplayOff(void); void ST7789H2_SetCursor(uint16_t Xpos, uint16_t Ypos); void ST7789H2_WritePixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode); uint16_t ST7789H2_ReadPixel(uint16_t Xpos, uint16_t Ypos); void ST7789H2_DrawHLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length); void ST7789H2_DrawVLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length); void ST7789H2_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp); void ST7789H2_DrawRGBImage(uint16_t Xpos, uint16_t Ypos, uint16_t Xsize, uint16_t Ysize, uint8_t *pdata); void ST7789H2_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); uint16_t ST7789H2_GetLcdPixelWidth(void); uint16_t ST7789H2_GetLcdPixelHeight(void); /* LCD driver structure */ extern LCD_DrvTypeDef ST7789H2_drv; /* LCD IO functions */ extern void LCD_IO_Init(void); extern void LCD_IO_WriteMultipleData(uint16_t *pData, uint32_t Size); extern void LCD_IO_WriteReg(uint8_t Reg); extern void LCD_IO_WriteData(uint16_t RegValue); extern uint16_t LCD_IO_ReadData(void); extern void LCD_IO_Delay(uint32_t delay); /** * @} *//* ... */ #ifdef __cplusplus }extern "C" { ... } #endif /* ... */ #endif /* __ST7789H2_H */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.