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
52
53
56
57
60
61
64
65
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
91
92
95
96
99
100
103
104
107
108
109
110
111
112
113
114
/* ... */
#ifndef __LCD_H
#define __LCD_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/* ... */
/* ... */
/* ... */
/* ... */
/* ... */
typedef struct
{
void (*Init)(void);
uint16_t (*ReadID)(void);
void (*DisplayOn)(void);
void (*DisplayOff)(void);
void (*SetCursor)(uint16_t, uint16_t);
void (*WritePixel)(uint16_t, uint16_t, uint16_t);
uint16_t (*ReadPixel)(uint16_t, uint16_t);
void (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t);
void (*DrawHLine)(uint16_t, uint16_t, uint16_t, uint16_t);
void (*DrawVLine)(uint16_t, uint16_t, uint16_t, uint16_t);
uint16_t (*GetLcdPixelWidth)(void);
uint16_t (*GetLcdPixelHeight)(void);
void (*DrawBitmap)(uint16_t, uint16_t, uint8_t*);
void (*DrawRGBImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*);
...}LCD_DrvTypeDef;
/* ... */
/* ... */
/* ... */
/* ... */
/* ... */
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif