qmk_firmware/assets/drivers_eeprom.md.DMr_G_5d.js

16 lines
21 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":"EEPROM Driver Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"drivers/eeprom.md","filePath":"drivers/eeprom.md"}');
const _sfc_main = { name: "drivers/eeprom.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="eeprom-driver-configuration" tabindex="-1">EEPROM Driver Configuration <a class="header-anchor" href="#eeprom-driver-configuration" aria-label="Permalink to &quot;EEPROM Driver Configuration {#eeprom-driver-configuration}&quot;"></a></h1><p>The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.</p><p>Selecting the EEPROM driver is done in your keyboard&#39;s <code>rules.mk</code>:</p><table><thead><tr><th>Driver</th><th>Description</th></tr></thead><tbody><tr><td><code>EEPROM_DRIVER = vendor</code> (default)</td><td>Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as &quot;transient&quot; below.</td></tr><tr><td><code>EEPROM_DRIVER = i2c</code></td><td>Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.</td></tr><tr><td><code>EEPROM_DRIVER = spi</code></td><td>Supports writing to SPI-based 25xx EEPROM chips. See the driver section below.</td></tr><tr><td><code>EEPROM_DRIVER = transient</code></td><td>Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.</td></tr><tr><td><code>EEPROM_DRIVER = wear_leveling</code></td><td>Frontend driver for the wear_leveling system, allowing for EEPROM emulation on top of flash -- both in-MCU and external SPI NOR flash.</td></tr></tbody></table><h2 id="vendor-eeprom-driver-configuration" tabindex="-1">Vendor Driver Configuration <a class="header-anchor" href="#vendor-eeprom-driver-configuration" aria-label="Permalink to &quot;Vendor Driver Configuration {#vendor-eeprom-driver-configuration}&quot;"></a></h2><h4 id="stm32l0l1-eeprom-driver-configuration" tabindex="-1">STM32 L0/L1 Configuration <a class="header-anchor" href="#stm32l0l1-eeprom-driver-configuration" aria-label="Permalink to &quot;STM32 L0/L1 Configuration {#stm32l0l1-eeprom-driver-configuration}&quot;"></a></h4><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.</p></div><table><thead><tr><th><code>config.h</code> override</th><th>Description</th><th>Default Value</th></tr></thead><tbody><tr><td><code>#define STM32_ONBOARD_EEPROM_SIZE</code></td><td>The size of the EEPROM to use, in bytes. Erase times can be high, so it&#39;s configurable here, if not using the default value.</td><td>Minimum required to cover base <em>eeconfig</em> data, or <code>1024</code> if VIA is enabled.</td></tr></tbody></table><h2 id="i2c-eeprom-driver-configuration" tabindex="-1">I2C Driver Configuration <a class="header-anchor" href="#i2c-eeprom-driver-configuration" aria-label="Permalink to &quot;I2C Driver Configuration {#i2c-eeprom-driver-configuration}&quot;"></a></h2><p>Currently QMK supports 24xx-series chips over I2C. As such, requires a working i2c_master driver configuration. You can override the driver configuration via your config.h:</p><table><thead><tr><th><code>config.h</code> override</th><th>Description</th><th>Default Value</th></tr></thead><tbody><tr><td><code>#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS</code></td><td>Base I2C address for the EEPROM -- shifted left by 1 as per i2c_master requirements</td><td>0b10100000</td></tr><tr><td><code>#define EXTERNAL_EEPROM_I2C_ADDRESS(addr)</code></td><td>Calculated I2C address for the EEPROM</td><td><code>(EXTERNAL_EEPROM_I2C_BASE_ADDRESS)</code></td></tr><tr><td><code>#define EXTERNAL_EEPROM_BYTE_COUNT</code></td><td>Total size of the EEPROM in bytes</td><td>8192</td></tr><tr><td><code>#define EXTERNAL_EEPROM_PAGE_SIZE</code></td><td>Page size of the EEPROM in bytes, as specified in the datasheet</td><td>32</td></tr><tr><td><code>#define EXTERNAL_EEPROM_ADDRESS_SIZE</code></td><td>The number of
const _hoisted_54 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_54);
}
const eeprom = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
eeprom as default
};