~ruther/qmk_firmware

fb6e82154140df1b87f74f80dac911c96163e82e — Danny 3 years ago 3e0a22d
Add Elite-Pi converter (#18236)

Co-authored-by: Joel Challis <git@zvecr.com>
M data/mappings/defaults.json => data/mappings/defaults.json +6 -0
@@ 10,6 10,12 @@
            "bootloader": "atmel-dfu",
            "pin_compatible": "promicro"
        },
        "elite_pi": {
            "processor": "RP2040",
            "bootloader": "rp2040",
            "board": "QMK_PM2040",
            "pin_compatible": "promicro"
        },
        "proton_c": {
            "processor": "STM32F303",
            "bootloader": "stm32-dfu",

M data/schemas/keyboard.jsonschema => data/schemas/keyboard.jsonschema +1 -1
@@ 34,7 34,7 @@
        },
        "development_board": {
            "type": "string",
            "enum": ["promicro", "elite_c", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"]
            "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"]
        },
        "pin_compatible": {
            "type": "string",

M docs/feature_converters.md => docs/feature_converters.md +5 -2
@@ 17,6 17,7 @@ Currently the following converters are available:
| `promicro` | `bit_c_pro`       |
| `promicro` | `stemcell`        |
| `promicro` | `bonsai_c4`       |
| `promicro` | `elite_pi`        |

See below for more in depth information on each converter.



@@ 60,6 61,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
| [Bit-C PRO](https://nullbits.co/bit-c-pro)                                               | `bit_c_pro`       |
| [STeMCell](https://github.com/megamind4089/STeMCell)                                     | `stemcell`        |
| [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4`       |
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040)         | `elite_pi`        |

Converter summary:



@@ 72,6 74,7 @@ Converter summary:
| `bit_c_pro`       | `-e CONVERT_TO=bit_c_pro`       | `CONVERT_TO=bit_c_pro`       | `#ifdef CONVERT_TO_BIT_C_PRO`       |
| `stemcell`        | `-e CONVERT_TO=stemcell`        | `CONVERT_TO=stemcell`        | `#ifdef CONVERT_TO_STEMCELL`        |
| `bonsai_c4`       | `-e CONVERT_TO=bonsai_c4`       | `CONVERT_TO=bonsai_c4`       | `#ifdef CONVERT_TO_BONSAI_C4`       |
| `elite_pi`        | `-e CONVERT_TO=elite_pi`        | `CONVERT_TO=elite_pi`        | `#ifdef CONVERT_TO_ELITE_PI`        |

### Proton C :id=proton_c



@@ 102,7 105,7 @@ The following defaults are based on what has been implemented for [RP2040](platf
| USB Host (e.g. USB-USB converter)            | Not supported (USB host code is AVR specific and is not currently supported on ARM)                              |
| [Split keyboards](feature_split_keyboard.md) | Partial via `PIO` vendor driver - heavily dependent on enabled features                                          |

### SparkFun Pro Micro - RP2040, Blok, and Bit-C PRO :id=promicro_rp2040 
### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO, and Elite-Pi :id=promicro_rp2040 

Currently identical to  [Adafruit KB2040](#kb2040).



@@ 135,4 138,4 @@ The Bonsai C4 only has one on-board LED (B2), and by default, both the Pro Micro
#define B0 PAL_LINE(GPIOA, 9)
```

No peripherals are enabled by default at this time, but example code to enable SPI, I2C, PWM, and Serial communications can be found [here](/keyboards/custommk/bonsai_c4_template) 
\ No newline at end of file
No peripherals are enabled by default at this time, but example code to enable SPI, I2C, PWM, and Serial communications can be found [here](/keyboards/custommk/bonsai_c4_template)

M docs/squeezing_avr.md => docs/squeezing_avr.md +1 -0
@@ 192,6 192,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers:
* [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040)
* [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288)
* [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622)
* [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040)

There are other, non-Pro Micro compatible boards out there. The most popular being:
* [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD)

A platforms/chibios/converters/promicro_to_elite_pi/_pin_defs.h => platforms/chibios/converters/promicro_to_elite_pi/_pin_defs.h +36 -0
@@ 0,0 1,36 @@
// Copyright 2022 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 27U
#define F7 26U
#define B1 22U
#define B3 20U
#define B2 23U
#define B6 21U

// LEDs
#define D5 12U
#define B0 13U

A platforms/chibios/converters/promicro_to_elite_pi/converter.mk => platforms/chibios/converters/promicro_to_elite_pi/converter.mk +9 -0
@@ 0,0 1,9 @@
# Elite-Pi 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