From 2450fe28ee00a816be02fc770cceae8deb2b2f1d Mon Sep 17 00:00:00 2001 From: leah-splitkb <103112489+leah-splitkb@users.noreply.github.com> Date: Tue, 28 Nov 2023 07:53:47 +0100 Subject: [PATCH] Add Imera converter (#22419) --- data/mappings/defaults.hjson | 5 +++ data/schemas/keyboard.jsonschema | 2 +- docs/feature_converters.md | 3 ++ docs/squeezing_avr.md | 1 + .../converters/promicro_to_imera/_pin_defs.h | 36 +++++++++++++++++++ .../converters/promicro_to_imera/converter.mk | 10 ++++++ 6 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 platforms/chibios/converters/promicro_to_imera/_pin_defs.h create mode 100644 platforms/chibios/converters/promicro_to_imera/converter.mk diff --git a/data/mappings/defaults.hjson b/data/mappings/defaults.hjson index 2bb00da223..8bf5b8ebcb 100644 --- a/data/mappings/defaults.hjson +++ b/data/mappings/defaults.hjson @@ -79,6 +79,11 @@ "processor": "RP2040", "bootloader": "rp2040", "board": "QMK_PM2040" + }, + "imera": { + "processor": "RP2040", + "bootloader": "rp2040", + "board": "QMK_PM2040" } } } diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 2996958084..32d737a1d8 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -43,7 +43,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"] + "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"] }, "pin_compatible": { "type": "string", diff --git a/docs/feature_converters.md b/docs/feature_converters.md index 11bdbed576..62c214e246 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -19,6 +19,7 @@ The following converters are available at this time: | `promicro` | `elite_pi` | | `promicro` | `helios` | | `promicro` | `liatris` | +| `promicro` | `imera` | | `promicro` | `michi` | | `elite_c` | `stemcell` | | `elite_c` | `rp2040_ce` | @@ -82,6 +83,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co | [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | | [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | | [Liatris](https://splitkb.com/products/liatris) | `liatris` | +| [Imera](https://splitkb.com/products/imera) | `imera` | | [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` | Converter summary: @@ -99,6 +101,7 @@ Converter summary: | `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` | | `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` | | `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` | ### Proton C :id=proton_c diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md index af015b4b18..c3b9e5595e 100644 --- a/docs/squeezing_avr.md +++ b/docs/squeezing_avr.md @@ -210,6 +210,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers: * [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) * [0xCB Helios](https://keeb.supply/products/0xcb-helios) ([Open Source](https://github.com/0xCB-dev/0xCB-Helios), DIY/PCBA/Shop) * [Liatris](https://splitkb.com/products/liatris) +* [Imera](https://splitkb.com/products/imera) * [Michi](https://github.com/ci-bus/michi-promicro-rp2040) There are other, non-Pro Micro compatible boards out there. The most popular being: diff --git a/platforms/chibios/converters/promicro_to_imera/_pin_defs.h b/platforms/chibios/converters/promicro_to_imera/_pin_defs.h new file mode 100644 index 0000000000..475a84d697 --- /dev/null +++ b/platforms/chibios/converters/promicro_to_imera/_pin_defs.h @@ -0,0 +1,36 @@ +// Copyright 2023 splitkb.com +// 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 17U +#define F7 16U +#define B1 22U +#define B3 20U +#define B2 23U +#define B6 21U + +// LEDs +#define D5 24U // Power LED, default-on +#define B0 18U // Unconnected diff --git a/platforms/chibios/converters/promicro_to_imera/converter.mk b/platforms/chibios/converters/promicro_to_imera/converter.mk new file mode 100644 index 0000000000..bfca20cd99 --- /dev/null +++ b/platforms/chibios/converters/promicro_to_imera/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