qmk_firmware/assets/features_rgb_matrix.md.BE6vKO90.js

16 lines
118 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
const __pageData = JSON.parse('{"title":"RGB Matrix Lighting","description":"","frontmatter":{},"headers":[],"relativePath":"features/rgb_matrix.md","filePath":"features/rgb_matrix.md"}');
const _sfc_main = { name: "features/rgb_matrix.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="rgb-matrix-lighting" tabindex="-1">RGB Matrix Lighting <a class="header-anchor" href="#rgb-matrix-lighting" aria-label="Permalink to &quot;RGB Matrix Lighting {#rgb-matrix-lighting}&quot;"></a></h1><p>This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it.</p><p>If you want to use single color LED&#39;s you should use the <a href="./led_matrix">LED Matrix Subsystem</a> instead.</p><h2 id="driver-configuration" tabindex="-1">Driver Configuration <a class="header-anchor" href="#driver-configuration" aria-label="Permalink to &quot;Driver Configuration {#driver-configuration}&quot;"></a></h2><p>RGB Matrix is an abstraction layer on top of an underlying LED driver API. The list of supported LED drivers is below; see the respective documentation for information on how to configure the driver.</p><table><thead><tr><th>Driver</th><th>Max LEDs</th></tr></thead><tbody><tr><td><a href="./../drivers/apa102">APA102</a></td><td>?</td></tr><tr><td><a href="./../drivers/aw20216s">AW20216S</a></td><td>72</td></tr><tr><td><a href="./../drivers/is31fl3218">IS31FL3218</a></td><td>6</td></tr><tr><td><a href="./../drivers/is31fl3236">IS31FL3236</a></td><td>12</td></tr><tr><td><a href="./../drivers/is31fl3729">IS31FL3729</a></td><td>45</td></tr><tr><td><a href="./../drivers/is31fl3731">IS31FL3731</a></td><td>48</td></tr><tr><td><a href="./../drivers/is31fl3733">IS31FL3733</a></td><td>64</td></tr><tr><td><a href="./../drivers/is31fl3736">IS31FL3736</a></td><td>32</td></tr><tr><td><a href="./../drivers/is31fl3737">IS31FL3737</a></td><td>48</td></tr><tr><td><a href="./../drivers/is31fl3741">IS31FL3741</a></td><td>117</td></tr><tr><td><a href="./../drivers/is31fl3742a">IS31FL3742A</a></td><td>60</td></tr><tr><td><a href="./../drivers/is31fl3743a">IS31FL3743A</a></td><td>66</td></tr><tr><td><a href="./../drivers/is31fl3745">IS31FL3745</a></td><td>48</td></tr><tr><td><a href="./../drivers/is31fl3746a">IS31FL3746A</a></td><td>24</td></tr><tr><td><a href="./../drivers/snled27351">SNLED27351</a></td><td>64</td></tr><tr><td><a href="./../drivers/ws2812">WS2812</a></td><td>?</td></tr></tbody></table><p>To assign the RGB Matrix driver, add the following to your <code>rules.mk</code>, for example:</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;">RGB_MATRIX_DRIVER = is31fl3218</span></span></code></pre></div><h2 id="common-configuration" tabindex="-1">Common Configuration <a class="header-anchor" href="#common-configuration" aria-label="Permalink to &quot;Common Configuration {#common-configuration}&quot;"></a></h2><p>From this point forward the configuration is the same for all the drivers. The <code>led_config_t</code> struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:</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:#005CC5;--shiki-dark:#79B8FF;">led_config_t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> g_led_config </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { {</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Key Matrix to LED Index</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">5</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"
const _hoisted_277 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_277);
}
const rgb_matrix = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
rgb_matrix as default
};