mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-27 01:56:43 +00:00
16 lines
36 KiB
JavaScript
16 lines
36 KiB
JavaScript
|
import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
|
|||
|
const __pageData = JSON.parse(`{"title":"'serial' Driver","description":"","frontmatter":{},"headers":[],"relativePath":"drivers/serial.md","filePath":"drivers/serial.md"}`);
|
|||
|
const _sfc_main = { name: "drivers/serial.md" };
|
|||
|
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="serial-driver" tabindex="-1">'serial' Driver <a class="header-anchor" href="#serial-driver" aria-label="Permalink to "'serial' Driver""></a></h1><p>The Serial driver powers the <a href="./../features/split_keyboard">Split Keyboard</a> feature. Several implementations are available that cater to the platform and capabilities of MCU in use. Note that none of the drivers support split keyboards with more than two halves.</p><table><thead><tr><th>Driver</th><th>AVR</th><th>ARM</th><th>Connection between halves</th></tr></thead><tbody><tr><td><a href="#bitbang">Bitbang</a></td><td>✔️</td><td>✔️</td><td>Single wire communication. One wire is used for reception and transmission.</td></tr><tr><td><a href="#usart-half-duplex">USART Half-duplex</a></td><td></td><td>✔️</td><td>Efficient single wire communication. One wire is used for reception and transmission.</td></tr><tr><td><a href="#usart-full-duplex">USART Full-duplex</a></td><td></td><td>✔️</td><td>Efficient two wire communication. Two distinct wires are used for reception and transmission.</td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Serial in this context should be read as <strong>sending information one bit at a time</strong>, rather than implementing UART/USART/RS485/RS232 standards.</p></div><hr><h2 id="bitbang" tabindex="-1">Bitbang <a class="header-anchor" href="#bitbang" aria-label="Permalink to "Bitbang""></a></h2><p>This is the Default driver, absence of configuration assumes this driver. It works by <a href="https://en.wikipedia.org/wiki/Bit_banging" target="_blank" rel="noreferrer">bit banging</a> a GPIO pin using the CPU. It is therefore not as efficient as a dedicated hardware peripheral, which the Half-duplex and Full-duplex drivers use.</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>On ARM platforms the bitbang driver causes connection issues when using it together with the bitbang WS2812 driver. Choosing alternate drivers for both serial and WS2812 (instead of bitbang) is strongly recommended.</p></div><h3 id="pin-configuration" tabindex="-1">Pin configuration <a class="header-anchor" href="#pin-configuration" aria-label="Permalink to "Pin configuration""></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span> LEFT RIGHT</span></span>\n<span class="line"><span>+-------+ SERIAL +-------+</span></span>\n<span class="line"><span>| SSP |-----------------| SSP |</span></span>\n<span class="line"><span>| | VDD | |</span></span>\n<span class="line"><span>| |-----------------| |</span></span>\n<span class="line"><span>| | GND | |</span></span>\n<span class="line"><span>| |-----------------| |</span></span>\n<span class="line"><span>+-------+ +-------+</span></span></code></pre></div><p>One GPIO pin is needed for the bitbang driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the <code>SOFT_SERIAL_PIN</code> (SSP) in the configuration. A TRS or USB cable provides enough conductors for this driver to function.</p><h3 id="setup" tabindex="-1">Setup <a class="header-anchor" href="#setup" aria-label="Permalink to "Setup""></a></h3><p>To use the bitbang driver follow these steps to activate it.</p><ol><li>Change the <code>SERIAL_DRIVER</code> to <code>bitbang</code> in your keyboards <code>rules.mk</code> file:</li></ol><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;">SERIAL_DRIVER = bitbang</span></s
|
|||
|
const _hoisted_116 = [
|
|||
|
_hoisted_1
|
|||
|
];
|
|||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
|
return openBlock(), createElementBlock("div", null, _hoisted_116);
|
|||
|
}
|
|||
|
const serial = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|||
|
export {
|
|||
|
__pageData,
|
|||
|
serial as default
|
|||
|
};
|