const_hoisted_1=/* @__PURE__ */createStaticVNode('<h1 id="flash-driver-configuration" tabindex="-1">FLASH Driver Configuration <a class="header-anchor" href="#flash-driver-configuration" aria-label="Permalink to "FLASH Driver Configuration {#flash-driver-configuration}""></a></h1><p>The FLASH driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.</p><table><thead><tr><th>Driver</th><th>Description</th></tr></thead><tbody><tr><td><code>FLASH_DRIVER = spi</code></td><td>Supports writing to almost all NOR Flash chips. See the driver section below.</td></tr></tbody></table><h2 id="spi-flash-driver-configuration" tabindex="-1">SPI FLASH Driver Configuration <a class="header-anchor" href="#spi-flash-driver-configuration" aria-label="Permalink to "SPI FLASH Driver Configuration {#spi-flash-driver-configuration}""></a></h2><p>Currently QMK supports almost all NOR Flash chips over SPI. As such, requires a working spi_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_FLASH_SPI_SLAVE_SELECT_PIN</code></td><td>SPI Slave select pin in order to inform that the FLASH is currently being addressed</td><td><em>none</em></td></tr><tr><td><code>#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR</code></td><td>Clock divisor used to divide the peripheral clock to derive the SPI frequency</td><td><code>8</code></td></tr><tr><td><code>#define EXTERNAL_FLASH_PAGE_SIZE</code></td><td>The Page size of the FLASH in bytes, as specified in the datasheet</td><td><code>256</code></td></tr><tr><td><code>#define EXTERNAL_FLASH_SECTOR_SIZE</code></td><td>The sector size of the FLASH in bytes, as specified in the datasheet</td><td><code>(4 * 1024)</code></td></tr><tr><td><code>#define EXTERNAL_FLASH_BLOCK_SIZE</code></td><td>The block size of the FLASH in bytes, as specified in the datasheet</td><td><code>(64 * 1024)</code></td></tr><tr><td><code>#define EXTERNAL_FLASH_SIZE</code></td><td>The total size of the FLASH in bytes, as specified in the datasheet</td><td><code>(512 * 1024)</code></td></tr><tr><td><code>#define EXTERNAL_FLASH_ADDRESS_SIZE</code></td><td>The Flash address size in bytes, as specified in datasheet</td><td><code>3</code></td></tr></tbody></table><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>All the above default configurations are based on MX25L4006E NOR Flash.</p></div>',7);