qmk_firmware/assets/drivers_is31fl3218.md.DgfDKi5r.js

16 lines
16 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
const __pageData = JSON.parse('{"title":"IS31FL3218 Driver","description":"","frontmatter":{},"headers":[],"relativePath":"drivers/is31fl3218.md","filePath":"drivers/is31fl3218.md","lastUpdated":null}');
const _sfc_main = { name: "drivers/is31fl3218.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="is31fl3218-driver" tabindex="-1">IS31FL3218 Driver <a class="header-anchor" href="#is31fl3218-driver" aria-label="Permalink to &quot;IS31FL3218 Driver {#is31fl3218-driver}&quot;"></a></h1><p>I²C LED driver by Lumissil. Supports up to 18 single-color LEDs, or 6 RGB LEDs.</p><p><a href="https://www.lumissil.com/assets/pdf/core/IS31FL3218_DS.pdf" target="_blank" rel="noreferrer">IS31FL3218 Datasheet</a></p><h2 id="usage" tabindex="-1">Usage <a class="header-anchor" href="#usage" aria-label="Permalink to &quot;Usage {#usage}&quot;"></a></h2><p>The IS31FL3218 driver code is automatically included if you are using the <a href="./../features/led_matrix">LED Matrix</a> or <a href="./../features/rgb_matrix">RGB Matrix</a> feature with the <code>is31fl3218</code> driver set, and you would use those APIs instead.</p><p>However, if you need to use the driver standalone, add this to your <code>rules.mk</code>:</p><div class="language-make vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">make</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">COMMON_VPATH += </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">$(</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">DRIVER_PATH</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">/led/issi</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SRC += is31fl3218-mono.c </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For single-color</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SRC += is31fl3218.c </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For RGB</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">I2C_DRIVER_REQUIRED = yes</span></span></code></pre></div><h2 id="basic-configuration" tabindex="-1">Basic Configuration <a class="header-anchor" href="#basic-configuration" aria-label="Permalink to &quot;Basic Configuration {#basic-configuration}&quot;"></a></h2><p>Add the following to your <code>config.h</code>:</p><table><thead><tr><th>Define</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>IS31FL3218_SDB_PIN</code></td><td><em>Not defined</em></td><td>The GPIO pin connected to the driver&#39;s shutdown pin</td></tr><tr><td><code>IS31FL3218_I2C_TIMEOUT</code></td><td><code>100</code></td><td>The I²C timeout in milliseconds</td></tr><tr><td><code>IS31FL3218_I2C_PERSISTENCE</code></td><td><code>0</code></td><td>The number of times to retry I²C transmissions</td></tr></tbody></table><h3 id="i2c-addressing" tabindex="-1">I²C Addressing <a class="header-anchor" href="#i2c-addressing" aria-label="Permalink to &quot;I²C Addressing {#i2c-addressing}&quot;"></a></h3><p>The IS31FL3218&#39;s 7-bit I²C address is <code>0x54</code>, available as <code>IS31FL3218_I2C_ADDRESS</code>.</p><h2 id="arm-configuration" tabindex="-1">ARM/ChibiOS Configuration <a class="header-anchor" href="#arm-configuration" aria-label="Permalink to &quot;ARM/ChibiOS Configuration {#arm-configuration}&quot;"></a></h2><p>Depending on the ChibiOS board configuration, you may need to <a href="./i2c#arm-configuration">enable and configure I²C</a> at the keyboard level.</p><h2 id="led-mapping" tabindex="-1">LED Mapping <a class="header-anchor" href="#led-mapping" aria-label="Permalink to &quot;LED Mapping {#led-mapping}&quot;"></a></h2><p>In order to use this driver, each output must be mapped to an LED index, by adding the following to your <code>&lt;keyboardname&gt;.c</code>:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--sh
const _hoisted_70 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_70);
}
const is31fl3218 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
is31fl3218 as default
};