-
Notifications
You must be signed in to change notification settings - Fork 0
/
API
150 lines (77 loc) · 3.57 KB
/
API
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
int lcdinit(int rs, int clock, int serial);
Initialize the display.
You can open up to 16 devices at once
Returns file descriptor of opened to LCD connector
rs - GPIO pin connected to rs pin of LCD (4)
clock - GPIO pin connected to clocl pin of LCD (6)
serial - GPIO pin connected to serial pine of LCD (5)
void lcdSet(int fdlcd, int disp, int cur, int blin);
Set display on/off, cursor on/off cursor blinking on/off
1 - ON, 0 - OFF, 99 - unchanged
fdlcd - file descriptor returned by lcdinit()
void lcd_graph(int fdlcd);
Switch to graphic mode
fdlcd - file descriptor returned by lcdinit()
void lcd_alpha(int fdlcd);
Switch to alphanumeric mode
fdlcd - file descriptor returned by lcdinit()
void lcdLoc(int fdlcd, int col, int line);
Move cursor to position line, column in alphanumeric mode
fdlcd - file descriptor returned by lcdinit()
void lcdClr(int fdlcd);
Clear the screen in alphanumeric mode, move cursor to line 0, column 0
fdlcd - file descriptor returned by lcdinit()
void lcdChar(int fdlcd, char val);
Display character val in alphanumeric mode at current cursor position
fdlcd - file descriptor returned by lcdinit()
void lcdLine(int fdlcd, int x, int y, char* text);
Display the line of text in alphanumeric, mode
truncated on the right if necessary
fdlcd - file descriptor returned by lcdinit()
x - column to start displaying text
y - line to display text
text - text to display
void lcdBlock(int fdlcd, int x, int y, char* text);
Display block of text in alphanumeric mode, wrap lines, truncated on the
end of display if necessary
fdlcd - file descriptor returned by lcdinit()
x, y - start column / line of the displayed text
y - line to display text
text - text to display
void lcdRun(int fdlcd, int mode, int speed, int line, char* text);
Start animation of text. Available in alphanumeric mode only.
the animation is done in the thread, you can do other tasks,
to stop animation use lcdStop(int fdlcd)
You can animate text up to 200 characters long.
fdlcd - file descriptor returned by lcdinit()
speed - speed of animation, in in 1/10 sec increments
line - line of display to show animated text (200 charactersi max)
text - string to display and animate
mode:
0 - at end of displayed text start from begining
1 - append begining of text to end of text
void lcdStop(int fdlcd);
Finish animation of text
fdlcd - file descriptor returned by lcdinit()
void lcd_graph_cls(int fdlcd);
Clear the screen in graphic mode, move cursor to line 0, column 0
fdlcd - file descriptor returned by lcdinit()
void lcdLocG(int fdlcd, int col, int row);
Move cursor to position line, column in graphical mode
fdlcd - file descriptor returned by lcdinit()
void lcd_dot(int fdlcd, int x, int y, int color);
Display dot at x/y position
fdlcd - file descriptor returned by lcdinit()
x - column
y - row
color: 1 - set dot, 0 - clear dot
void lcdCharG(int fdlcd, unsigned int val);
Display character val in graphical mode at current cursor position
fdlcd - file descriptor returned by lcdinit()
void lcdLineG(int fdlcd, int x, int y, char* text);
Display the line of text in graphic mode, truncated on the right if necessary
fdlcd - file descriptor returned by lcdinit()
int lcd_displ_file(int fdlcd, char* filename);
Display image file in graphical mode .
filename of image file in RAWW PBM formet (P4)
fdlcd - file descriptor returned by lcdinit()