From 9d17779832563dba59ad26c58b6aeabd1d4488d9 Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Fri, 11 Oct 2024 16:16:25 -0700 Subject: [PATCH] Add svlinky converter (#24449) --- data/mappings/defaults.hjson | 5 +++ data/schemas/keyboard.jsonschema | 2 +- docs/feature_converters.md | 6 ++++ .../promicro_to_svlinky/_pin_defs.h | 36 +++++++++++++++++++ .../promicro_to_svlinky/converter.mk | 10 ++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 platforms/chibios/converters/promicro_to_svlinky/_pin_defs.h create mode 100644 platforms/chibios/converters/promicro_to_svlinky/converter.mk diff --git a/data/mappings/defaults.hjson b/data/mappings/defaults.hjson index 71902c92d68..32322a03095 100644 --- a/data/mappings/defaults.hjson +++ b/data/mappings/defaults.hjson @@ -84,6 +84,11 @@ "board": "STEMCELL", "bootloader": "tinyuf2", "processor": "STM32F411" + }, + "svlinky": { + "board": "QMK_PM2040", + "bootloader": "rp2040", + "processor": "RP2040" } } } diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 7649a8e31b2..72a33f55ad1 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -45,7 +45,7 @@ }, "development_board": { "type": "string", - "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris", "imera"] + "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris", "imera", "svlinky"] }, "pin_compatible": { "type": "string", diff --git a/docs/feature_converters.md b/docs/feature_converters.md index 0021c34e519..06cc7b3a11f 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -21,6 +21,7 @@ The following converters are available at this time: | `promicro` | `liatris` | | `promicro` | `imera` | | `promicro` | `michi` | +| `promicro` | `svlinky` | | `elite_c` | `stemcell` | | `elite_c` | `rp2040_ce` | | `elite_c` | `elite_pi` | @@ -87,6 +88,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co | [Liatris](https://splitkb.com/products/liatris) | `liatris` | | [Imera](https://splitkb.com/products/imera) | `imera` | | [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` | +| [Svlinky](https://github.com/sadekbaroudi/svlinky) | `svlinky` | Converter summary: @@ -105,6 +107,7 @@ Converter summary: | `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` | | `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` | | `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` | +| `svlinky` | `-e CONVERT_TO=svlinky` | `CONVERT_TO=svlinky` | `#ifdef CONVERT_TO_SVLINKY` | ### Proton C {#proton_c} @@ -170,6 +173,9 @@ The Bonsai C4 only has one on-board LED (B2), and by default, both the Pro Micro Feature set is identical to [Adafruit KB2040](#kb2040). VBUS detection is enabled by default for superior split keyboard support. For more information, refer to the [Community Edition pinout](platformdev_rp2040#rp2040_ce) docs. +### Svlinky {#svlinky} + +Feature set is a pro micro equivalent of the [RP2040 Community Edition](#rp2040_ce), except that two of the analog GPIO have been replaced with digital only GPIO. These two were moved to the FPC connector to support the [VIK specification](https://github.com/sadekbaroudi/vik). This means that if you are expecting analog support on all 4 pins as provided on a RP2040 Community Edition pinout, you will not have that. Please see the [Svlinky github page](https://github.com/sadekbaroudi/svlinky) for more details. ## Elite-C diff --git a/platforms/chibios/converters/promicro_to_svlinky/_pin_defs.h b/platforms/chibios/converters/promicro_to_svlinky/_pin_defs.h new file mode 100644 index 00000000000..b90e5f40203 --- /dev/null +++ b/platforms/chibios/converters/promicro_to_svlinky/_pin_defs.h @@ -0,0 +1,36 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Left side (front) +#define D3 0U +#define D2 1U +// GND +// GND +#define D1 2U +#define D0 3U +#define D4 4U +#define C6 5U +#define D7 6U +#define E6 7U +#define B4 8U +#define B5 9U + +// Right side (front) +// RAW +// GND +// RESET +// VCC +#define F4 29U +#define F5 28U +#define F6 18U +#define F7 24U +#define B1 22U +#define B3 20U +#define B2 23U +#define B6 21U + +// LEDs +#define D5 17U +#define B0 25U diff --git a/platforms/chibios/converters/promicro_to_svlinky/converter.mk b/platforms/chibios/converters/promicro_to_svlinky/converter.mk new file mode 100644 index 00000000000..bfca20cd993 --- /dev/null +++ b/platforms/chibios/converters/promicro_to_svlinky/converter.mk @@ -0,0 +1,10 @@ +# rp2040_ce MCU settings for converting AVR projects +MCU := RP2040 +BOARD := QMK_PM2040 +BOOTLOADER := rp2040 + +# These are defaults based on what has been implemented for RP2040 boards +SERIAL_DRIVER ?= vendor +WS2812_DRIVER ?= vendor +BACKLIGHT_DRIVER ?= software +OPT_DEFS += -DUSB_VBUS_PIN=19U