summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Greco <jayv.greco@gmail.com>2022-08-13 06:48:30 -0700
committerGitHub <noreply@github.com>2022-08-13 14:48:30 +0100
commit4eeafbebabfac04eada98f75dedbecdbbd16298c (patch)
tree39823c40ce29685d070c214f0d17b0531331d5a4
parentfc7e9efd215fee7ec8acd3e2740a6ab9d4633818 (diff)
downloadqmk_firmware-4eeafbebabfac04eada98f75dedbecdbbd16298c.tar.gz
qmk_firmware-4eeafbebabfac04eada98f75dedbecdbbd16298c.zip
Add Bit-C PRO converter (#17827)
-rw-r--r--data/mappings/defaults.json6
-rw-r--r--data/schemas/keyboard.jsonschema2
-rw-r--r--docs/feature_converters.md5
-rw-r--r--platforms/chibios/converters/promicro_to_bit_c_pro/_pin_defs.h39
-rw-r--r--platforms/chibios/converters/promicro_to_bit_c_pro/converter.mk12
5 files changed, 62 insertions, 2 deletions
diff --git a/data/mappings/defaults.json b/data/mappings/defaults.json
index b62e5450b3..5e25405c37 100644
--- a/data/mappings/defaults.json
+++ b/data/mappings/defaults.json
@@ -34,6 +34,12 @@
"board": "QMK_PM2040",
"pin_compatible": "promicro"
},
+ "bit_c_pro": {
+ "processor": "RP2040",
+ "bootloader": "rp2040",
+ "board": "QMK_PM2040",
+ "pin_compatible": "promicro"
+ },
"bluepill": {
"processor": "STM32F103",
"bootloader": "stm32duino",
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 14f84c5595..c55d66e6bb 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -34,7 +34,7 @@
},
"development_board": {
"type": "string",
- "enum": ["promicro", "elite_c", "proton_c", "kb2040", "promicro_rp2040", "blok", "bluepill", "blackpill_f401", "blackpill_f411"]
+ "enum": ["promicro", "elite_c", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "bluepill", "blackpill_f401", "blackpill_f411"]
},
"pin_compatible": {
"type": "string",
diff --git a/docs/feature_converters.md b/docs/feature_converters.md
index 11dcc62b2a..569cf0f17d 100644
--- a/docs/feature_converters.md
+++ b/docs/feature_converters.md
@@ -14,6 +14,7 @@ Currently the following converters are available:
| `promicro` | `kb2040` |
| `promicro` | `promicro_rp2040` |
| `promicro` | `blok` |
+| `promicro` | `bit_c_pro` |
See below for more in depth information on each converter.
@@ -54,6 +55,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
| [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` |
| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `promicro_rp2040` |
| [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` |
+| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` |
Converter summary:
@@ -63,6 +65,7 @@ Converter summary:
| `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` |
| `promicro_rp2040` | `-e CONVERT_TO=promicro_rp2040` | `CONVERT_TO=promicro_rp2040` | `#ifdef CONVERT_TO_PROMICRO_RP2040` |
| `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` |
+| `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` |
### Proton C :id=proton_c
@@ -93,6 +96,6 @@ 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 and Blok :id=promicro_rp2040
+### SparkFun Pro Micro - RP2040, Blok, and Bit-C PRO :id=promicro_rp2040
Currently identical to [Adafruit KB2040](#kb2040).
diff --git a/platforms/chibios/converters/promicro_to_bit_c_pro/_pin_defs.h b/platforms/chibios/converters/promicro_to_bit_c_pro/_pin_defs.h
new file mode 100644
index 0000000000..92e8fbfa1a
--- /dev/null
+++ b/platforms/chibios/converters/promicro_to_bit_c_pro/_pin_defs.h
@@ -0,0 +1,39 @@
+// 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 (Mapped to R and G channel of the Bit-C PRO's RGB led)
+#define D5 16U
+#define B0 17U
+
+// Bit-C LED (mapped to B channel of the Bit-C PRO's RGB led)
+#define F0 18U
diff --git a/platforms/chibios/converters/promicro_to_bit_c_pro/converter.mk b/platforms/chibios/converters/promicro_to_bit_c_pro/converter.mk
new file mode 100644
index 0000000000..c0eaee8593
--- /dev/null
+++ b/platforms/chibios/converters/promicro_to_bit_c_pro/converter.mk
@@ -0,0 +1,12 @@
+# nullbits Bit-C PRO 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
+
+# Tell QMK to use the correct 2nd stage bootloader
+OPT_DEFS += -DRP2040_FLASH_W25X10CL