qmk_firmware/assets/drivers_aw20216s.md.CgKehEzB.js

16 lines
11 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":"AW20216S Driver","description":"","frontmatter":{},"headers":[],"relativePath":"drivers/aw20216s.md","filePath":"drivers/aw20216s.md"}');
const _sfc_main = { name: "drivers/aw20216s.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="aw20216s-driver" tabindex="-1">AW20216S Driver <a class="header-anchor" href="#aw20216s-driver" aria-label="Permalink to &quot;AW20216S Driver {#aw20216s-driver}&quot;"></a></h1><p>SPI 18x12 LED matrix driver by Awinic. Supports a maximum of four drivers, each controlling up to 216 single-color LEDs, or 72 RGB LEDs.</p><p><a href="https://doc.awinic.com/doc/20230609wm/b6a9c70b-e1bd-495b-925f-bcbed3fc2620.pdf" target="_blank" rel="noreferrer">AW20216S 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 AW20216S driver code is automatically included if you are using the <a href="./../features/rgb_matrix">RGB Matrix</a> feature with the <code>aw20216s</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</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SRC += aw20216s.c</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPI_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>AW20216S_CS_PIN_1</code></td><td><em>Not defined</em></td><td>The GPIO pin connected to the first driver&#39;s Chip Select pin</td></tr><tr><td><code>AW20216S_CS_PIN_2</code></td><td><em>Not defined</em></td><td>The GPIO pin connected to the second driver&#39;s Chip Select pin</td></tr><tr><td><code>AW20216S_EN_PIN</code></td><td><em>Not defined</em></td><td>The GPIO pin connected to the drivers&#39; Enable pins</td></tr><tr><td><code>AW20216S_SPI_MODE</code></td><td><code>0</code></td><td>The SPI mode to use</td></tr><tr><td><code>AW20216S_SPI_DIVISOR</code></td><td><code>4</code></td><td>The SPI divisor to use</td></tr><tr><td><code>AW20216S_SCALING_MAX</code></td><td><code>150</code></td><td>The scaling value</td></tr><tr><td><code>AW20216S_GLOBAL_CURRENT_MAX</code></td><td><code>150</code></td><td>The global current control value</td></tr></tbody></table><h3 id="global-current-control" tabindex="-1">Global Current Control <a class="header-anchor" href="#global-current-control" aria-label="Permalink to &quot;Global Current Control {#global-current-control}&quot;"></a></h3><p>This setting controls the current sunk by the <code>CSx</code> pins, from 0 to 255. To adjust it, add the following to your <code>config.h</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;--shiki-dark:#F97583;">#define</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> AW20216S_GLOBAL_CURRENT_MAX</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 150</span></span></code></pre></div><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}&q
const _hoisted_46 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_46);
}
const aw20216s = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
aw20216s as default
};