📄 display_8h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>BlueLab: display.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>display.h File Reference</h1>Library for driving LCDs. <a href="#_details">More...</a><p><h2>Data Structures</h2><ul><li>struct <a class="el" href="struct_icon.html">Icon</a><dl class="el"><dd class="mdescRight">Definition of an icon. <a href="struct_icon.html#_details">More...</a><br></dl></ul><h2>Properties of the display</h2><ul><li>#define <a class="el" href="display_8h.html#a0">DISPLAY_MAX_COLUMN</a> 97<li>#define <a class="el" href="display_8h.html#a1">DISPLAY_MAX_GLYPH_WID</a> 15<li>#define <a class="el" href="display_8h.html#a2">DISPLAY_MAX_ICON_WID</a> 16<li>#define <a class="el" href="display_8h.html#a3">DISPLAY_INITIAL_DELAY</a> 2000<li>#define <a class="el" href="display_8h.html#a4">DISPLAY_SCROLL_DELAY</a> 120<li>#define <a class="el" href="display_8h.html#a5">DISPLAY_CHANGE_DELAY</a> 1000<li>#define <a class="el" href="display_8h.html#a6">DISPLAY_FINAL_DELAY</a> 2000</ul><h2>Typedefs</h2><ul><li>typedef enum <a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a7">DisplayResult</a><dl class="el"><dd class="mdescRight">Possible return values from calls into the display library. <a href="#a7"></a><br></dl><li>typedef enum <a class="el" href="display_8h.html#a8">DisplayScrollType</a> <a class="el" href="display_8h.html#a8">DisplayScrollType</a><dl class="el"><dd class="mdescRight">How should the display be scrolled. <a href="#a8"></a><br></dl><li>typedef <a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="display_8h.html#a9">IconId</a><dl class="el"><dd class="mdescRight">Identify an icon. <a href="#a9"></a><br></dl></ul><h2>Enumerations</h2><ul><li>enum <a class="el" href="display_8h.html#a35">DisplayResult</a> { <br> <a class="el" href="display_8h.html#a35a10">DISPLAY_RESULT_SUCCESS</a>, <br> <a class="el" href="display_8h.html#a35a11">DISPLAY_RESULT_LCD_INIT_FAIL</a>, <br> <a class="el" href="display_8h.html#a35a12">DISPLAY_RESULT_FONT_INIT_FAIL</a>, <br> <a class="el" href="display_8h.html#a35a13">DISPLAY_RESULT_INIT_TWICE_FAIL</a>, <br> <a class="el" href="display_8h.html#a35a14">DISPLAY_RESULT_COLUMN_INVALID</a>, <br> <a class="el" href="display_8h.html#a35a15">DISPLAY_RESULT_MALLOC_FAIL</a>, <br> <a class="el" href="display_8h.html#a35a16">DISPLAY_RESULT_TRUNCATED</a>, <br> <a class="el" href="display_8h.html#a35a17">DISPLAY_RESULT_FITS</a>, <br> <a class="el" href="display_8h.html#a35a18">DISPLAY_RESULT_LCD_OUTPUT_FAIL</a>, <br> <a class="el" href="display_8h.html#a35a19">DISPLAY_RESULT_ICON_NOT_FOUND</a>, <br> <a class="el" href="display_8h.html#a35a20">DISPLAY_RESULT_FONT_INVALID</a>, <br> <a class="el" href="display_8h.html#a35a21">DISPLAY_RESULT_GLYPH_NOT_FOUND</a><br> }<dl class="el"><dd class="mdescRight">Possible return values from calls into the display library. <a href="#a35">More...</a><br></dl><li>enum <a class="el" href="display_8h.html#a36">DisplayScrollType</a> { <br> <a class="el" href="display_8h.html#a36a22">DISPLAY_SCROLL_TYPE_NONE</a>, <br> <a class="el" href="display_8h.html#a36a23">DISPLAY_SCROLL_TYPE_ONEWAY_ONCE</a>, <br> <a class="el" href="display_8h.html#a36a24">DISPLAY_SCROLL_TYPE_RETURN_ONCE</a>, <br> <a class="el" href="display_8h.html#a36a25">DISPLAY_SCROLL_TYPE_ONEWAY_ENDLESS</a>, <br> <a class="el" href="display_8h.html#a36a26">DISPLAY_SCROLL_TYPE_RETURN_ENDLESS</a>, <br> <a class="el" href="display_8h.html#a36a27">DISPLAY_SCROLL_TYPE_LIMIT</a><br> }<dl class="el"><dd class="mdescRight">How should the display be scrolled. <a href="#a36">More...</a><br></dl></ul><h2>Functions</h2><ul><li><a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a28">DisplayInit</a> (<a class="el" href="csrtypes_8h.html#a4">uint16</a> number_of_icons, const <a class="el" href="struct_icon.html">Icon</a> *icons)<dl class="el"><dd class="mdescRight">Initialise the display library. <a href="#a28"></a><br></dl><li><a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a29">DisplayClear</a> (void)<dl class="el"><dd class="mdescRight">Clear the display and turn off all hard icons. <a href="#a29"></a><br></dl><li><a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a30">DisplayClearPart</a> (<a class="el" href="csrtypes_8h.html#a8">uint8</a> clear_first, <a class="el" href="csrtypes_8h.html#a8">uint8</a> clear_last)<dl class="el"><dd class="mdescRight">Clear a range of display columns. <a href="#a30"></a><br></dl><li><a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a31">DisplaySelectFont</a> (<a class="el" href="font_8h.html#a0">FontId</a> font)<dl class="el"><dd class="mdescRight">Select the font to use. <a href="#a31"></a><br></dl><li><a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a32">DisplayShowPrompt</a> (const <a class="el" href="font_8h.html#a1">ucs2char</a> *prompt, <a class="el" href="csrtypes_8h.html#a8">uint8</a> prompt_len, <a class="el" href="csrtypes_8h.html#a8">uint8</a> prompt_first, <a class="el" href="csrtypes_8h.html#a8">uint8</a> prompt_last, <a class="el" href="csrtypes_8h.html#a9">bool</a> left_to_right, <a class="el" href="display_8h.html#a8">DisplayScrollType</a> scroll_type)<dl class="el"><dd class="mdescRight">Show a prompt. <a href="#a32"></a><br></dl><li><a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a33">DisplayShowIcon</a> (<a class="el" href="display_8h.html#a9">IconId</a> i, <a class="el" href="csrtypes_8h.html#a8">uint8</a> icon_first, <a class="el" href="csrtypes_8h.html#a8">uint8</a> icon_last, <a class="el" href="csrtypes_8h.html#a9">bool</a> left_to_right)<dl class="el"><dd class="mdescRight">Show a user-defined icon. <a href="#a33"></a><br></dl><li><a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a34">DisplayShowHardwareIcon</a> (<a class="el" href="display_8h.html#a9">IconId</a> i, <a class="el" href="csrtypes_8h.html#a9">bool</a> on)<dl class="el"><dd class="mdescRight">Turn on/off a hard icon on the display. <a href="#a34"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Library for driving LCDs. <p>This library provides routines to drive an LDA33S481J1D LCD module (as found on CSR's DEV-PC-1442 development boards) over I2C.<hr><h2>Define Documentation</h2><a class="anchor" name="a0" doxytag="display.h::DISPLAY_MAX_COLUMN" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DISPLAY_MAX_COLUMN 97 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Last column on the display. </td> </tr></table><a class="anchor" name="a1" doxytag="display.h::DISPLAY_MAX_GLYPH_WID" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DISPLAY_MAX_GLYPH_WID 15 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Maximum width of a glyph. </td> </tr></table><a class="anchor" name="a2" doxytag="display.h::DISPLAY_MAX_ICON_WID" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DISPLAY_MAX_ICON_WID 16 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Maximum width of a user-supplied icon. </td> </tr></table><a class="anchor" name="a3" doxytag="display.h::DISPLAY_INITIAL_DELAY" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DISPLAY_INITIAL_DELAY 2000 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Delay before any scrolling starts (ms). </td> </tr></table><a class="anchor" name="a4" doxytag="display.h::DISPLAY_SCROLL_DELAY" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DISPLAY_SCROLL_DELAY 120 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Delay between each scroll step (ms). </td> </tr></table><a class="anchor" name="a5" doxytag="display.h::DISPLAY_CHANGE_DELAY" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DISPLAY_CHANGE_DELAY 1000 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Delay when changing scroll direction (ms) . </td> </tr></table><a class="anchor" name="a6" doxytag="display.h::DISPLAY_FINAL_DELAY" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DISPLAY_FINAL_DELAY 2000 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Delay after any scrolling ends (ms). </td> </tr></table><hr><h2>Typedef Documentation</h2><a class="anchor" name="a7" doxytag="display.h::DisplayResult" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> typedef enum <a class="el" href="display_8h.html#a7">DisplayResult</a> <a class="el" href="display_8h.html#a7">DisplayResult</a> </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Possible return values from calls into the display library. <p> </td> </tr></table><a class="anchor" name="a8" doxytag="display.h::DisplayScrollType" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> typedef enum <a class="el" href="display_8h.html#a8">DisplayScrollType</a> <a class="el" href="display_8h.html#a8">DisplayScrollType</a> </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>How should the display be scrolled. <p> </td> </tr></table><a class="anchor" name="a9" doxytag="display.h::IconId" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> typedef <a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="display_8h.html#a9">IconId</a> </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Identify an icon. <p> </td> </tr></table><hr><h2>Enumeration Type Documentation</h2><a class="anchor" name="a35" doxytag="display.h::DisplayResult" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> enum <a class="el" href="display_8h.html#a7">DisplayResult</a> </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Possible return values from calls into the display library. <p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a class="anchor" name="a35a10" doxytag="DISPLAY_RESULT_SUCCESS" ></a>DISPLAY_RESULT_SUCCESS</em> </td><td>The operation was successful. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a11" doxytag="DISPLAY_RESULT_LCD_INIT_FAIL" ></a>DISPLAY_RESULT_LCD_INIT_FAIL</em> </td><td>The LCD could not be initialised. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a12" doxytag="DISPLAY_RESULT_FONT_INIT_FAIL" ></a>DISPLAY_RESULT_FONT_INIT_FAIL</em> </td><td>A suitable set of fonts was not found. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a13" doxytag="DISPLAY_RESULT_INIT_TWICE_FAIL" ></a>DISPLAY_RESULT_INIT_TWICE_FAIL</em> </td><td>The display library has already been initialised. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a14" doxytag="DISPLAY_RESULT_COLUMN_INVALID" ></a>DISPLAY_RESULT_COLUMN_INVALID</em> </td><td>The operation specified a non-existent column </td></tr><tr><td valign=top><em><a class="anchor" name="a35a15" doxytag="DISPLAY_RESULT_MALLOC_FAIL" ></a>DISPLAY_RESULT_MALLOC_FAIL</em> </td><td>A memory allocation failed. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a16" doxytag="DISPLAY_RESULT_TRUNCATED" ></a>DISPLAY_RESULT_TRUNCATED</em> </td><td>The prompt or icon was truncated. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a17" doxytag="DISPLAY_RESULT_FITS" ></a>DISPLAY_RESULT_FITS</em> </td><td>The prompt fits and so was not scrolled. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a18" doxytag="DISPLAY_RESULT_LCD_OUTPUT_FAIL" ></a>DISPLAY_RESULT_LCD_OUTPUT_FAIL</em> </td><td>An error occured writing to the LCD. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a19" doxytag="DISPLAY_RESULT_ICON_NOT_FOUND" ></a>DISPLAY_RESULT_ICON_NOT_FOUND</em> </td><td>No such icon exists. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a20" doxytag="DISPLAY_RESULT_FONT_INVALID" ></a>DISPLAY_RESULT_FONT_INVALID</em> </td><td>No such font exists. </td></tr><tr><td valign=top><em><a class="anchor" name="a35a21" doxytag="DISPLAY_RESULT_GLYPH_NOT_FOUND" ></a>DISPLAY_RESULT_GLYPH_NOT_FOUND</em> </td><td>A character in the prompt was not found. </td></tr></table></dl> </td> </tr></table><a class="anchor" name="a36" doxytag="display.h::DisplayScrollType" ></a><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -