-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathunilcd_8cpp.html
475 lines (442 loc) · 29.5 KB
/
unilcd_8cpp.html
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>YALI: unilcd.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">YALI
</div>
<div id="projectbrief">Yet Another LCD Interface</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">unilcd.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>YALI (Yet Another LCD Interface) library.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include "<a class="el" href="unilcd_8h_source.html">unilcd.h</a>"</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for unilcd.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="unilcd_8cpp__incl.png" border="0" usemap="#aunilcd_8cpp" alt=""/></div>
<map name="aunilcd_8cpp" id="aunilcd_8cpp">
<area shape="rect" title="YALI (Yet Another LCD Interface) library." alt="" coords="5,5,93,32"/>
<area shape="rect" href="unilcd_8h.html" title="YALI (Yet Another LCD Interface) library." alt="" coords="13,80,86,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a1ec9bffaf60216d3bf9c36a9925dcc2f"><td class="memItemLeft" align="right" valign="top"><a id="a1ec9bffaf60216d3bf9c36a9925dcc2f"></a>
#define </td><td class="memItemRight" valign="bottom"><b>LINE1_OFFSET</b>   0x80</td></tr>
<tr class="separator:a1ec9bffaf60216d3bf9c36a9925dcc2f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e98ce404aaa528509b802f6d6f12b13"><td class="memItemLeft" align="right" valign="top"><a id="a1e98ce404aaa528509b802f6d6f12b13"></a>
#define </td><td class="memItemRight" valign="bottom"><b>LINE2_OFFSET</b>   (LINE1_OFFSET + 0x40)</td></tr>
<tr class="separator:a1e98ce404aaa528509b802f6d6f12b13"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a128d7a5c4a216eb7a6545c30933c19ab"><td class="memItemLeft" align="right" valign="top"><a id="a128d7a5c4a216eb7a6545c30933c19ab"></a>
#define </td><td class="memItemRight" valign="bottom"><b>LINE3_OFFSET</b>   0x94</td></tr>
<tr class="separator:a128d7a5c4a216eb7a6545c30933c19ab"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab4d30a887889997ba761d48fa199f691"><td class="memItemLeft" align="right" valign="top"><a id="ab4d30a887889997ba761d48fa199f691"></a>
#define </td><td class="memItemRight" valign="bottom"><b>LINE4_OFFSET</b>   (LINE3_OFFSET + 0x40)</td></tr>
<tr class="separator:ab4d30a887889997ba761d48fa199f691"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a765975271f26fcd076375fc113247bf3"><td class="memItemLeft" align="right" valign="top"><a id="a765975271f26fcd076375fc113247bf3"></a>
#define </td><td class="memItemRight" valign="bottom"><b>LCD_CONFIG_BACKLIGHT</b>   0x80</td></tr>
<tr class="separator:a765975271f26fcd076375fc113247bf3"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0ba6770cdd67f7e54861ed5d780a3b4f"><td class="memItemLeft" align="right" valign="top"><a id="a0ba6770cdd67f7e54861ed5d780a3b4f"></a>
<a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><b>writeLCDInterface</b> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> *data)</td></tr>
<tr class="separator:a0ba6770cdd67f7e54861ed5d780a3b4f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0f36bea067606d2a592b94c22aed7a3c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#a0f36bea067606d2a592b94c22aed7a3c">initLCDInterface</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a>)</td></tr>
<tr class="memdesc:a0f36bea067606d2a592b94c22aed7a3c"><td class="mdescLeft"> </td><td class="mdescRight">Initialize LCD interface. <a href="unilcd_8cpp.html#a0f36bea067606d2a592b94c22aed7a3c">More...</a><br /></td></tr>
<tr class="separator:a0f36bea067606d2a592b94c22aed7a3c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad53245dcdd4cf10125a06d4754003830"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#ad53245dcdd4cf10125a06d4754003830">sendLCDInstruction</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> data, <a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> mode)</td></tr>
<tr class="memdesc:ad53245dcdd4cf10125a06d4754003830"><td class="mdescLeft"> </td><td class="mdescRight">Send instructions or data to the HD44780 controller. <a href="unilcd_8cpp.html#ad53245dcdd4cf10125a06d4754003830">More...</a><br /></td></tr>
<tr class="separator:ad53245dcdd4cf10125a06d4754003830"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af825a18ec569117281a5cdbc2e052fc6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#af825a18ec569117281a5cdbc2e052fc6">initLCD</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a>)</td></tr>
<tr class="memdesc:af825a18ec569117281a5cdbc2e052fc6"><td class="mdescLeft"> </td><td class="mdescRight">Initialize HD44780 controller. <a href="unilcd_8cpp.html#af825a18ec569117281a5cdbc2e052fc6">More...</a><br /></td></tr>
<tr class="separator:af825a18ec569117281a5cdbc2e052fc6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa59191bb2ad57b424d09bd997c6183d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#aa59191bb2ad57b424d09bd997c6183d5">printStringLen</a> (const <a class="el" href="stm32-libopencm3-conf_8h.html#a35cd67ba7bb0db8105eb6267467535d7">CHAR</a> *str, <a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> maxLength)</td></tr>
<tr class="memdesc:aa59191bb2ad57b424d09bd997c6183d5"><td class="mdescLeft"> </td><td class="mdescRight">Print string on LCD. <a href="unilcd_8cpp.html#aa59191bb2ad57b424d09bd997c6183d5">More...</a><br /></td></tr>
<tr class="separator:aa59191bb2ad57b424d09bd997c6183d5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6fa90c6eb1c2943e1bdc10cd6d5e219a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#a6fa90c6eb1c2943e1bdc10cd6d5e219a">gotoLCDPosition</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> x, <a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> y)</td></tr>
<tr class="memdesc:a6fa90c6eb1c2943e1bdc10cd6d5e219a"><td class="mdescLeft"> </td><td class="mdescRight">Move the cursor to the given coordinates. <a href="unilcd_8cpp.html#a6fa90c6eb1c2943e1bdc10cd6d5e219a">More...</a><br /></td></tr>
<tr class="separator:a6fa90c6eb1c2943e1bdc10cd6d5e219a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7bfe0f27dfe60437fc82ad9370426661"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#a7bfe0f27dfe60437fc82ad9370426661">setDisplayState</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> onState)</td></tr>
<tr class="memdesc:a7bfe0f27dfe60437fc82ad9370426661"><td class="mdescLeft"> </td><td class="mdescRight">Control LCD screen. <a href="unilcd_8cpp.html#a7bfe0f27dfe60437fc82ad9370426661">More...</a><br /></td></tr>
<tr class="separator:a7bfe0f27dfe60437fc82ad9370426661"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aef1b2798e0bf3407fc41e25dd0376901"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#aef1b2798e0bf3407fc41e25dd0376901">setCursorState</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> cursorState)</td></tr>
<tr class="memdesc:aef1b2798e0bf3407fc41e25dd0376901"><td class="mdescLeft"> </td><td class="mdescRight">Set cursor display mode. <a href="unilcd_8cpp.html#aef1b2798e0bf3407fc41e25dd0376901">More...</a><br /></td></tr>
<tr class="separator:aef1b2798e0bf3407fc41e25dd0376901"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae8cc5c7ba044ffe0adde1b42e13627c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#ae8cc5c7ba044ffe0adde1b42e13627c7">setCursorBlinkState</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> blinkState)</td></tr>
<tr class="memdesc:ae8cc5c7ba044ffe0adde1b42e13627c7"><td class="mdescLeft"> </td><td class="mdescRight">Set cursor blinking mode. <a href="unilcd_8cpp.html#ae8cc5c7ba044ffe0adde1b42e13627c7">More...</a><br /></td></tr>
<tr class="separator:ae8cc5c7ba044ffe0adde1b42e13627c7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5941dec2e511fb8b848adfa954bf5f6e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#a5941dec2e511fb8b848adfa954bf5f6e">setCustomChar</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> addr, <a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> *buffer)</td></tr>
<tr class="memdesc:a5941dec2e511fb8b848adfa954bf5f6e"><td class="mdescLeft"> </td><td class="mdescRight">Load custom character to the LCD RAM. <a href="unilcd_8cpp.html#a5941dec2e511fb8b848adfa954bf5f6e">More...</a><br /></td></tr>
<tr class="separator:a5941dec2e511fb8b848adfa954bf5f6e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9293c16acea0e6143d60655e7274591a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unilcd_8cpp.html#a9293c16acea0e6143d60655e7274591a">setBacklightState</a> (<a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> backLightState)</td></tr>
<tr class="memdesc:a9293c16acea0e6143d60655e7274591a"><td class="mdescLeft"> </td><td class="mdescRight">Turn on or off the LCD backlight. <a href="unilcd_8cpp.html#a9293c16acea0e6143d60655e7274591a">More...</a><br /></td></tr>
<tr class="separator:a9293c16acea0e6143d60655e7274591a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>YALI (Yet Another LCD Interface) library. </p>
<dl class="section author"><dt>Author</dt><dd>Dilshan R Jayakody (<a href="#" onclick="location.href='mai'+'lto:'+'jay'+'ak'+'ody'+'20'+'00l'+'k@'+'gma'+'il'+'.co'+'m'; return false;">jayak<span style="display: none;">.nosp@m.</span>ody2<span style="display: none;">.nosp@m.</span>000lk<span style="display: none;">.nosp@m.</span>@gma<span style="display: none;">.nosp@m.</span>il.co<span style="display: none;">.nosp@m.</span>m</a>) </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2023-03-23</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (c) 2023 Dilshan R Jayakody.</dd></dl>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a6fa90c6eb1c2943e1bdc10cd6d5e219a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fa90c6eb1c2943e1bdc10cd6d5e219a">◆ </a></span>gotoLCDPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> gotoLCDPosition </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>y</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Move the cursor to the given coordinates. </p>
<p>Set the current cursor position to the given row and column.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">x</td><td>Horizontal (row) position starting from 0. </td></tr>
<tr><td class="paramname">y</td><td>Vertical (column) position. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="af825a18ec569117281a5cdbc2e052fc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af825a18ec569117281a5cdbc2e052fc6">◆ </a></span>initLCD()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> initLCD </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize HD44780 controller. </p>
<p>Initialize the LCD controller and clear the screen. This function initializes the LCD controller into the following configuration.</p>
<ul>
<li>Disable the blinking cursor.</li>
<li>Hide the cursor from the LCD.</li>
<li>Turn on the LCD backlight.</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="a0f36bea067606d2a592b94c22aed7a3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f36bea067606d2a592b94c22aed7a3c">◆ </a></span>initLCDInterface()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> initLCDInterface </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize LCD interface. </p>
<p>This function initializes the MCU's I/O pins used by the LCD interface. The I/O pins used in this function are defined in the platform configuration header file (e.g: <a class="el" href="arduino-conf_8h.html" title="Arduino configuration file for YALI module.">arduino-conf.h</a>).</p>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="aa59191bb2ad57b424d09bd997c6183d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa59191bb2ad57b424d09bd997c6183d5">◆ </a></span>printStringLen()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> printStringLen </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="stm32-libopencm3-conf_8h.html#a35cd67ba7bb0db8105eb6267467535d7">CHAR</a> * </td>
<td class="paramname"><em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>maxLength</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Print string on LCD. </p>
<p>Print the content of the specified string buffer on the LCD screen. This function print contents starting from the current cursor position.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>String buffer. </td></tr>
<tr><td class="paramname">maxLength</td><td>Length of the string buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="ad53245dcdd4cf10125a06d4754003830"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad53245dcdd4cf10125a06d4754003830">◆ </a></span>sendLCDInstruction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> sendLCDInstruction </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>mode</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send instructions or data to the HD44780 controller. </p>
<p>This function sends instructions or data to the HD44780 controller. The transfer type (such as instructions or data) can select using the <code>mode</code> parameter. This function support all WRITE instructions provided by the HD44780 controller.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>8-bit data or instruction code. </td></tr>
<tr><td class="paramname">mode</td><td>Transfer mode, such as <code>INSTRUCTION_MODE_CMD</code> or <code>INSTRUCTION_MODE_CHAR</code>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="a9293c16acea0e6143d60655e7274591a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9293c16acea0e6143d60655e7274591a">◆ </a></span>setBacklightState()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> setBacklightState </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>backLightState</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Turn on or off the LCD backlight. </p>
<p>This function can turn on or off (LED) backlight.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">backLightState</td><td>Set 1 to turn on the LCD backlight. Set 0 to turn off the LCD backlight. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="ae8cc5c7ba044ffe0adde1b42e13627c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8cc5c7ba044ffe0adde1b42e13627c7">◆ </a></span>setCursorBlinkState()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> setCursorBlinkState </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>blinkState</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set cursor blinking mode. </p>
<p>This function can switch the cursor between blinking and static modes.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">blinkState</td><td>Set 1 for blinking, or 0 for the static cursor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="aef1b2798e0bf3407fc41e25dd0376901"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef1b2798e0bf3407fc41e25dd0376901">◆ </a></span>setCursorState()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> setCursorState </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>cursorState</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set cursor display mode. </p>
<p>This function can turn on or off the cursor.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cursorState</td><td>Set 1 to turn on the cursor. Set 0 to turn off the cursor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="a5941dec2e511fb8b848adfa954bf5f6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5941dec2e511fb8b848adfa954bf5f6e">◆ </a></span>setCustomChar()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> setCustomChar </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> * </td>
<td class="paramname"><em>buffer</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load custom character to the LCD RAM. </p>
<p>Load 5×8 custom character to the specified address of the CGRAM.</p>
<p>Make sure to call the <code>clearLCD</code> function after loading all custom characters. Without this function call, the custom characters will not be displayed on the LCD.</p>
<p>To display the custom characters, call the <code>printChar</code> function with the appropriate address.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">addr</td><td>RAM address, ranges from 0 to 7. </td></tr>
<tr><td class="paramname">buffer</td><td>8-byte long custom character buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
<a id="a7bfe0f27dfe60437fc82ad9370426661"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7bfe0f27dfe60437fc82ad9370426661">◆ </a></span>setDisplayState()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="stm32-libopencm3-conf_8h.html#a7f319bfc2492a2136964194204e7a8cf">VOID</a> setDisplayState </td>
<td>(</td>
<td class="paramtype"><a class="el" href="stm32-libopencm3-conf_8h.html#a9a1dc6d243c6f75bb42f87e3f69649e4">UCHAR</a> </td>
<td class="paramname"><em>onState</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Control LCD screen. </p>
<p>This function can turn on or off the entire LCD screen. When turn off, the display data remains in the DDRAM of the LCD controller.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">onState</td><td>Set 1 to turn on the LCD display. Set 0 to turn off the LCD display. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VOID </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>