qmk_firmware/assets/platformdev_rp2040.md.CYKYMDfc.js

16 lines
16 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":"Raspberry Pi RP2040","description":"","frontmatter":{},"headers":[],"relativePath":"platformdev_rp2040.md","filePath":"platformdev_rp2040.md"}');
const _sfc_main = { name: "platformdev_rp2040.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="raspberry-pi-rp2040" tabindex="-1">Raspberry Pi RP2040 <a class="header-anchor" href="#raspberry-pi-rp2040" aria-label="Permalink to &quot;Raspberry Pi RP2040&quot;"></a></h1><p>The following table shows the current driver status for peripherals on RP2040 MCUs:</p><table><thead><tr><th>System</th><th>Support</th></tr></thead><tbody><tr><td><a href="./drivers/adc">ADC driver</a></td><td></td></tr><tr><td><a href="./drivers/audio#pwm-hardware">Audio</a></td><td></td></tr><tr><td><a href="./features/backlight">Backlight</a></td><td></td></tr><tr><td><a href="./drivers/i2c">I2C driver</a></td><td></td></tr><tr><td><a href="./drivers/spi">SPI driver</a></td><td></td></tr><tr><td><a href="./drivers/ws2812">WS2812 driver</a></td><td> using <code>PIO</code> driver</td></tr><tr><td><a href="./drivers/eeprom">External EEPROMs</a></td><td> using <code>I2C</code> or <code>SPI</code> driver</td></tr><tr><td><a href="./drivers/eeprom#wear_leveling-configuration">EEPROM emulation</a></td><td></td></tr><tr><td><a href="./drivers/serial">serial driver</a></td><td> using <code>SIO</code> or <code>PIO</code> driver</td></tr><tr><td><a href="./drivers/uart">UART driver</a></td><td> using <code>SIO</code> driver</td></tr></tbody></table><h2 id="gpio" tabindex="-1">GPIO <a class="header-anchor" href="#gpio" aria-label="Permalink to &quot;GPIO&quot;"></a></h2><img alt="Raspberry Pi Pico pinout" src="https://i.imgur.com/nLaiYDE.jpg" width="48%"><img alt="Sparkfun RP2040 Pro Micro pinout" src="https://i.imgur.com/1TPAhrs.jpg" width="48%"><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>The GPIO pins of the RP2040 are not 5V tolerant!</p></div><h3 id="pin-nomenclature" tabindex="-1">Pin nomenclature <a class="header-anchor" href="#pin-nomenclature" aria-label="Permalink to &quot;Pin nomenclature&quot;"></a></h3><p>To address individual pins on the RP2040, QMK uses the <code>GPx</code> abbreviation -- where the <code>x</code> stands for the GPIO number of the pin. This number can likely be found on the official pinout diagram of your board. Note that these GPIO numbers match the RP2040 MCU datasheet, and don&#39;t necessarily match the number you see printed on the board. For instance the Raspberry Pi Pico uses numbers from 1 to 40 for their pins, but these are not identical to the RP2040&#39;s GPIO numbers. So if you want to use the pin 11 of the Pico for your keyboard, you would refer to it as <code>GP8</code> in the config files.</p><h3 id="alternate-functions" tabindex="-1">Alternate functions <a class="header-anchor" href="#alternate-functions" aria-label="Permalink to &quot;Alternate functions&quot;"></a></h3><p>The RP2040 features flexible GPIO function multiplexing, this means that every pin can be connected to nearly all the internal peripherals like I2C, SPI, UART or PWM. This allows for flexible PCB designs that are much less restricted in the selection of GPIO pins. To find out which pin can use which peripheral refer to the official <a href="https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#page=14" target="_blank" rel="noreferrer">Raspberry PI RP2040 datasheet</a> section 1.4.3 GPIO functions.</p><h2 id="selecting-hardware-peripherals-and-drivers" tabindex="-1">Selecting hardware peripherals and drivers <a class="header-anchor" href="#selecting-hardware-peripherals-and-drivers" aria-label="Permalink to &quot;Selecting hardware peripherals and drivers&quot;"></a></h2><p>QMK RP2040 support builds upon ChibiOS and thus follows their convention for activating drivers and associated hardware peripherals. These tables only give a quick overview which values have to be used, please refer to the ChibiOS specific sections on the driver pages.</p><h3 id="i2c-driver" tabindex="-1">I2C Driver <a class="header-anchor" href="#i2c-driver" aria-label="Permalink to &quot;I2C Driver&quot;"></a></h3><table><thead><tr><th>RP2040 Peripheral</th><th><code>mcuconf.h</code> val
const _hoisted_45 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_45);
}
const platformdev_rp2040 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
platformdev_rp2040 as default
};