<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3id="example-custom-character"tabindex="-1">Custom Character Definition <aclass="header-anchor"href="#example-custom-character"aria-label="Permalink to "Custom Character Definition {#example-custom-character}""></a></h3><p>Up to eight custom characters can be defined. This data is stored in the Character Generator RAM (CGRAM), and is not persistent across power cycles.</p><p>This example defines the QMK Psi as the first custom character. The first 16 positions in the character set are reserved for the eight custom characters duplicated.</p><divclass="language- vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang"></span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><span>Byte | 16 8 4 2 1</span></span>
<spanclass="line"><span> 1 | x x x ■ □ ■ □ ■</span></span>
<spanclass="line"><span> 2 | x x x ■ □ ■ □ ■</span></span>
<spanclass="line"><span> 3 | x x x ■ □ ■ □ ■</span></span>
<spanclass="line"><span> 4 | x x x □ ■ ■ ■ □</span></span>
<spanclass="line"><span> 5 | x x x □ □ ■ □ □</span></span>
<spanclass="line"><span> 6 | x x x □ □ ■ □ □</span></span>
<spanclass="line"><span> 7 | x x x □ □ ■ □ □</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Cursor is incremented while defining characters so must be reset</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2id="api"tabindex="-1">API <aclass="header-anchor"href="#api"aria-label="Permalink to "API {#api}""></a></h2><h3id="api-hd44780-init"tabindex="-1"><code>void hd44780_init(bool cursor, bool blink)</code><aclass="header-anchor"href="#api-hd44780-init"aria-label="Permalink to "`void hd44780_init(bool cursor, bool blink)` {#api-hd44780-init}""></a></h3><p>Initialize the display.</p><p>This function should be called only once, before any of the other functions can be called.</p><h4id="api-hd44780-init-arguments"tabindex="-1">Arguments <aclass="header-anchor"href="#api-hd44780-init-arguments"aria-label="Permalink to "Arguments {#api-hd44780-init-arguments}""></a></h4><ul><li><code>bool cursor</code><br> Whether to show the cursor.</li><li><code>bool blink</code><br> Whether to blink the cursor, if shown.</li></ul><hr><h3id="api-hd44780-clear"tabindex="-1"><code>void hd44780_clear(void)</code><aclass="header-anchor"href="#api-hd44780-clear"aria-label="Permalink to "`void hd44780_clear(void)` {#api-hd44780-clear}""></a></h3><p>Clear the display.</p><p>This function is called on init.</p><hr><h3id="api-hd44780-home"tabindex="-1"><code>void hd44780_home(void)</code><aclass="header-anchor"href="#api-hd44780-home"aria-label="Permalink to "`void hd44780_home(void)` {#api-hd44780-home}""></a></h3><p>Move the cursor to the home position.</p><p>This function is called on init.</p><hr><h3id="api-hd44780-on"tabindex="-1"><code>void hd44780_on(bool cursor, bool blink)</code><aclass="header-anchor"href="#api-hd44780-on"aria-label="Permalink to "`void hd44780_on(bool cursor, bool blink)` {#api-hd44780-on}""></a></h3><p>Turn the display on, and/or set the cursor properties.</p><p>This function is called on init.</p><h4id="api-hd44780-on-arguments"tabindex="-1">Arguments <aclass="header-anchor"href="#api-hd44780-on-arguments"aria-label="Permalink to "Arguments {#api-hd44780-on-arguments}""></a></h4><ul><li><code>bool cursor</code><br> Whether to show the cursor.</li><li><code>bool blink</code><br> Whether to blink the cursor, if shown.</li></ul><hr><h3id="api-hd44780-off"tabindex="-1"><code>void hd44780_off(void)</code><aclass="header-anchor"href="#api-hd44780-off"aria-label="Permalink to "`void hd44780_off(void)` {#api-hd44780-off}""></a></h3><p>Turn the display off.</p><hr><h3id="api-hd44780-set-cursor"tabindex="-1"><code>void hd44780_set_cursor(uint8_t col, uint8_t line)</code><aclass="header-anchor"href="#api-hd44780-set-cursor"aria-label="Permalink to "`void hd44780_set_cursor(uint8_t col, uint8_t line)` {#api-hd44780-set-cursor}""></a></h3><p>Move the cursor to the specified position on the display.</p><h4id="api-hd44780-set-cursor-arguments"tabindex="-1">Arguments <aclass="header-anchor"href="#api-hd44780-set-cursor-arguments"aria-label="Permalink to "Arguments {#api-hd44780-set-cursor-arguments}""></a></h4><ul><li><code>uint8_t col</code><br> The column number to move to, from 0 to 15 on 16x2 displays.</li><li><code>bool line</code><br> The line number to move to, either 0 or 1 on 16x2 displays.</li></ul><hr><h3id="api-hd44780-putc"tabindex="-1"><code>void hd44780_putc(char c)</code><aclass="header-anchor"href="#api-hd44780-putc"aria-label="Permalink to "`void hd44780_putc(char c)` {#api-hd44780-putc}""></a></h3><p>Print a character to the display. The newline character <code>\n</code> will move the cursor to the start of the next line.</p><p>The exact character shown may depend on the ROM code of your particular display - refer to the datasheet for the full character set.</p><h4id="api-hd44780-putc-arguments"tabindex="-1">Arguments <aclass="header-anchor"href="#api-hd44780-putc-arguments"aria-label="Permalink to "Arguments {#api-hd44780-putc-arguments}""></a></h4><ul><li><code>char c</code><br> The chara