Compare commits
5 Commits
36ee1f4e0a
...
6b20e8f1e9
Author | SHA1 | Date |
---|---|---|
|
6b20e8f1e9 | |
|
f03e29ca13 | |
|
617136b45e | |
|
01500b085e | |
|
70aa4fa824 |
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: blackpill_f401ce
|
||||
name: BlackPill F401CE
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
||||
exposes: [blackpill]
|
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: blackpill_f411ce
|
||||
name: BlackPill F411CE
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
||||
exposes: [blackpill]
|
|
@ -0,0 +1,10 @@
|
|||
file_format: "1"
|
||||
id: nrf5340dk_nrf5340_cpuapp
|
||||
name: Nordic nRF3840 DK
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
url: https://www.nordicsemi.com/Products/Development-hardware/nrf5340-dk
|
||||
exposes: [arduino_uno]
|
|
@ -0,0 +1,7 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ENABLE_DCDC
|
||||
bool "Enable DCDC mode"
|
||||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
depends on (BOARD_PILLBUG)
|
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_PILLBUG
|
||||
bool "PillBug"
|
||||
depends on SOC_NRF52840_QIAA
|
|
@ -0,0 +1,25 @@
|
|||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if BOARD_PILLBUG
|
||||
|
||||
config BOARD
|
||||
default "PillBug"
|
||||
|
||||
if USB_DEVICE_STACK
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
endif # USB_DEVICE_STACK
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_PILLBUG
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Kyle McCreery
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/ {
|
||||
blackpill: connector {
|
||||
compatible = "blackpill";
|
||||
#gpio-cells = <2>;
|
||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||
gpio-map-pass-thru = <0 0x3f>;
|
||||
gpio-map
|
||||
= <2 0 &gpio0 9 0> /* PC13 */
|
||||
, <3 0 &gpio0 10 0> /* PC14 */
|
||||
, <4 0 &gpio1 6 0> /* PC15 */
|
||||
, <10 0 &gpio0 25 0> /* PA0 */
|
||||
, <11 0 &gpio0 5 0> /* PA1 */
|
||||
, <12 0 &gpio1 15 0> /* PA2 */
|
||||
, <13 0 &gpio0 2 0> /* PA3 */
|
||||
, <14 0 &gpio1 11 0> /* PA4 */
|
||||
, <15 0 &gpio1 8 0> /* PA5 */
|
||||
, <16 0 &gpio0 26 0> /* PA6 */
|
||||
, <17 0 &gpio0 11 0> /* PA7 */
|
||||
, <18 0 &gpio1 9 0> /* PB0 */
|
||||
, <19 0 &gpio1 14 0> /* PB1 */
|
||||
, <20 0 &gpio0 3 0> /* PB2 */
|
||||
, <21 0 &gpio0 31 0> /* PB10 */
|
||||
, <25 0 &gpio0 12 0> /* PB12 */
|
||||
, <26 0 &gpio0 19 0> /* PB13 */
|
||||
, <27 0 &gpio1 1 0> /* PB14 */
|
||||
, <28 0 &gpio0 29 0> /* PB15 */
|
||||
, <29 0 &gpio1 13 0> /* PA8 */
|
||||
, <30 0 &gpio0 6 0> /* PA9 */
|
||||
, <31 0 &gpio0 8 0> /* PA10 */
|
||||
, <38 0 &gpio1 0 0> /* PA15 */
|
||||
, <39 0 &gpio1 10 0> /* PB3 */
|
||||
, <40 0 &gpio1 2 0> /* PB4 */
|
||||
, <41 0 &gpio1 4 0> /* PB5 */
|
||||
, <42 0 &gpio0 13 0> /* PB6 */
|
||||
, <43 0 &gpio0 15 0> /* PB7 */
|
||||
, <45 0 &gpio0 17 0> /* PB8 */
|
||||
, <46 0 &gpio0 24 0> /* PB9 */
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
blackpill_i2c: &i2c0 {};
|
||||
blackpill_spi: &spi1 {};
|
||||
blackpill_serial: &uart0 {};
|
|
@ -0,0 +1,6 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(OPENOCD_NRF5_SUBFAMILY nrf52)
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "blackpill_pins.dtsi"
|
||||
|
||||
/ {
|
||||
model = "PillBug";
|
||||
compatible = "pillbug";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
ext-power {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
label = "EXT_POWER";
|
||||
control-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
|
||||
init-delay-ms = <50>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 820000)>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twi";
|
||||
sda-pin = <15>;
|
||||
scl-pin = <13>;
|
||||
};
|
||||
|
||||
&spi1{
|
||||
status = "disabled";
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <40>;
|
||||
mosi-pin = <11>;
|
||||
miso-pin = <26>;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uarte";
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
};
|
||||
|
||||
&usbd {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&flash0 {
|
||||
/*
|
||||
* For more information, see:
|
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "mbr";
|
||||
reg = <0x00000000 0x00001000>;
|
||||
};
|
||||
|
||||
code_partition: partition@1000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00001000 0x000d3000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The flash starting at 0x000d4000 and ending at
|
||||
* 0x000f3fff is reserved for use by the application.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Storage partition will be used by FCB/LittleFS/NVS
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@d4000 {
|
||||
label = "storage";
|
||||
reg = <0x000d4000 0x00020000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,15 @@
|
|||
identifier: pillbug
|
||||
name: PillBug
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- adc
|
||||
- usb_device
|
||||
- ble
|
||||
- ieee802154
|
||||
- pwm
|
||||
- watchdog
|
|
@ -0,0 +1,10 @@
|
|||
file_format: "1"
|
||||
id: pillbug
|
||||
name: PillBug
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
url: https://mechwild.com/product/pillbug
|
||||
exposes: [blackpill]
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_PILLBUG=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
|
@ -0,0 +1,7 @@
|
|||
CONFIG_CONSOLE=n
|
||||
CONFIG_SERIAL=n
|
||||
CONFIG_UART_CONSOLE=n
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=n
|
||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
|
||||
/ {
|
||||
blackpill: connector {
|
||||
compatible = "blackpill";
|
||||
#gpio-cells = <2>;
|
||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||
gpio-map-pass-thru = <0 0x3f>;
|
||||
gpio-map
|
||||
= <2 0 &gpioc 13 0> /* PC13 */
|
||||
, <3 0 &gpioc 14 0> /* PC14 */
|
||||
, <4 0 &gpioc 15 0> /* PC15 */
|
||||
, <10 0 &gpioa 0 0> /* PA0 */
|
||||
, <11 0 &gpioa 1 0> /* PA1 */
|
||||
, <12 0 &gpioa 2 0> /* PA2 */
|
||||
, <13 0 &gpioa 3 0> /* PA3 */
|
||||
, <14 0 &gpioa 4 0> /* PA4 */
|
||||
, <15 0 &gpioa 5 0> /* PA5 */
|
||||
, <16 0 &gpioa 6 0> /* PA6 */
|
||||
, <17 0 &gpioa 7 0> /* PA7 */
|
||||
, <18 0 &gpiob 0 0> /* PB0 */
|
||||
, <19 0 &gpiob 1 0> /* PB1 */
|
||||
, <20 0 &gpiob 2 0> /* PB2 */
|
||||
, <21 0 &gpiob 10 0> /* PB10 */
|
||||
, <25 0 &gpiob 12 0> /* PB12 */
|
||||
, <26 0 &gpiob 13 0> /* PB13 */
|
||||
, <27 0 &gpiob 14 0> /* PB14 */
|
||||
, <28 0 &gpiob 15 0> /* PB15 */
|
||||
, <29 0 &gpioa 8 0> /* PA8 */
|
||||
, <30 0 &gpioa 9 0> /* PA9 */
|
||||
, <31 0 &gpioa 10 0> /* PA10 */
|
||||
, <38 0 &gpioa 15 0> /* PA15 */
|
||||
, <39 0 &gpiob 3 0> /* PB3 */
|
||||
, <40 0 &gpiob 4 0> /* PB4 */
|
||||
, <41 0 &gpiob 5 0> /* PB5 */
|
||||
, <42 0 &gpiob 6 0> /* PB6 */
|
||||
, <43 0 &gpiob 7 0> /* PB7 */
|
||||
, <45 0 &gpiob 8 0> /* PB8 */
|
||||
, <46 0 &gpiob 9 0> /* PB9 */
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
blackpill_i2c: &i2c1 {};
|
||||
blackpill_spi: &spi1 {};
|
||||
blackpill_serial: &usart1 {};
|
|
@ -0,0 +1,7 @@
|
|||
CONFIG_CONSOLE=n
|
||||
CONFIG_SERIAL=n
|
||||
CONFIG_UART_CONSOLE=n
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=n
|
||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
|
||||
/ {
|
||||
blackpill: connector {
|
||||
compatible = "blackpill";
|
||||
#gpio-cells = <2>;
|
||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||
gpio-map-pass-thru = <0 0x3f>;
|
||||
gpio-map
|
||||
= <2 0 &gpioc 13 0> /* PC13 */
|
||||
, <3 0 &gpioc 14 0> /* PC14 */
|
||||
, <4 0 &gpioc 15 0> /* PC15 */
|
||||
, <10 0 &gpioa 0 0> /* PA0 */
|
||||
, <11 0 &gpioa 1 0> /* PA1 */
|
||||
, <12 0 &gpioa 2 0> /* PA2 */
|
||||
, <13 0 &gpioa 3 0> /* PA3 */
|
||||
, <14 0 &gpioa 4 0> /* PA4 */
|
||||
, <15 0 &gpioa 5 0> /* PA5 */
|
||||
, <16 0 &gpioa 6 0> /* PA6 */
|
||||
, <17 0 &gpioa 7 0> /* PA7 */
|
||||
, <18 0 &gpiob 0 0> /* PB0 */
|
||||
, <19 0 &gpiob 1 0> /* PB1 */
|
||||
, <20 0 &gpiob 2 0> /* PB2 */
|
||||
, <21 0 &gpiob 10 0> /* PB10 */
|
||||
, <25 0 &gpiob 12 0> /* PB12 */
|
||||
, <26 0 &gpiob 13 0> /* PB13 */
|
||||
, <27 0 &gpiob 14 0> /* PB14 */
|
||||
, <28 0 &gpiob 15 0> /* PB15 */
|
||||
, <29 0 &gpioa 8 0> /* PA8 */
|
||||
, <30 0 &gpioa 9 0> /* PA9 */
|
||||
, <31 0 &gpioa 10 0> /* PA10 */
|
||||
, <38 0 &gpioa 15 0> /* PA15 */
|
||||
, <39 0 &gpiob 3 0> /* PB3 */
|
||||
, <40 0 &gpiob 4 0> /* PB4 */
|
||||
, <41 0 &gpiob 5 0> /* PB5 */
|
||||
, <42 0 &gpiob 6 0> /* PB6 */
|
||||
, <43 0 &gpiob 7 0> /* PB7 */
|
||||
, <45 0 &gpiob 8 0> /* PB8 */
|
||||
, <46 0 &gpiob 9 0> /* PB9 */
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
blackpill_i2c: &i2c1 {};
|
||||
blackpill_spi: &spi1 {};
|
||||
blackpill_serial: &usart1 {};
|
|
@ -0,0 +1,8 @@
|
|||
file_format: "1"
|
||||
id: blackpill
|
||||
name: BlackPill
|
||||
type: interconnect
|
||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
||||
manufacturer: WeAct Studio
|
||||
description: |
|
||||
The WeAct Studio BlackPill has grown in popularity due to its low price, availability, and utilization of the powerful STM32F4x1CEU6 microcontroller. The BlackPill features more GPIO than most other boards, but also has a comparatively larger footprint as a result. Many clones and variations of the original BlackPill are available on the market as an affordable and more powerful alternative to many popular boards. The official WeAct variations of the WeAct Studio BlackPill are powered by the STM32F411CEU6 and STM32F401CEU6 microcontrollers.
|
|
@ -0,0 +1,8 @@
|
|||
if SHIELD_MF68
|
||||
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "MF68"
|
||||
|
||||
endif
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
config SHIELD_MF68
|
||||
def_bool $(shields_list_contains,mf68)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&kp ESC &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp MINUS &kp EQUAL &kp BSPC &kp INS &kp PGUP
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp DEL &kp PGDN
|
||||
&kp GRAVE &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
||||
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSFT &kp UP
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &mo 1 &mo 2 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
};
|
||||
|
||||
lower {
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &kp C_VOL_UP &kp HOME
|
||||
&trans &kp HOME &kp UP &kp END &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_VOL_DN &kp END
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_MUTE
|
||||
&trans &trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_PP &kp C_NEXT
|
||||
>;
|
||||
};
|
||||
|
||||
raise{
|
||||
bindings = <
|
||||
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR &reset &bootloader
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &kp &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// QMK bits
|
||||
// #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
|
||||
// #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4 }
|
||||
// #define DIODE_DIRECTION COL2ROW
|
||||
// #define BACKLIGHT_PIN B5
|
||||
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
= <&pro_micro 10 GPIO_ACTIVE_HIGH>,
|
||||
<&pro_micro 16 GPIO_ACTIVE_HIGH>,
|
||||
<&pro_micro 14 GPIO_ACTIVE_HIGH>,
|
||||
<&pro_micro 15 GPIO_ACTIVE_HIGH>,
|
||||
<&pro_micro 18 GPIO_ACTIVE_HIGH>,
|
||||
<&pro_micro 19 GPIO_ACTIVE_HIGH>,
|
||||
<&pro_micro 20 GPIO_ACTIVE_HIGH>,
|
||||
<&pro_micro 21 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
row-gpios
|
||||
= <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
|
||||
<&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,8 @@
|
|||
file_format: "1"
|
||||
id: mf68
|
||||
name: MF68
|
||||
type: shield
|
||||
url: https://68keys.io/
|
||||
requires: [pro_micro]
|
||||
features:
|
||||
- keys
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
if SHIELD_WATERFOWL_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Waterfowl"
|
||||
|
||||
config ZMK_SPLIT_ROLE_CENTRAL
|
||||
default y
|
||||
|
||||
endif
|
||||
|
||||
if SHIELD_WATERFOWL_LEFT || SHIELD_WATERFOWL_RIGHT
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
if ZMK_DISPLAY
|
||||
|
||||
config I2C
|
||||
default y
|
||||
|
||||
config SSD1306
|
||||
default y
|
||||
|
||||
config SSD1306_REVERSE_MODE
|
||||
default y
|
||||
|
||||
endif # ZMK_DISPLAY
|
||||
|
||||
if LVGL
|
||||
|
||||
config LVGL_VDB_SIZE
|
||||
default 64
|
||||
|
||||
config LVGL_DPI
|
||||
default 148
|
||||
|
||||
config LVGL_BITS_PER_PIXEL
|
||||
default 1
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_1
|
||||
endchoice
|
||||
|
||||
endif # LVGL
|
||||
|
||||
endif
|
|
@ -0,0 +1,9 @@
|
|||
#Copyright (c) 2022 The ZMK Contributors
|
||||
#SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
config SHIELD_WATERFOWL_LEFT
|
||||
def_bool $(shields_list_contains,waterfowl_left)
|
||||
|
||||
config SHIELD_WATERFOWL_RIGHT
|
||||
def_bool $(shields_list_contains,waterfowl_right)
|
|
@ -0,0 +1,6 @@
|
|||
# Uncomment these two line to add support for encoders to your firmware
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
# Uncomment the following line to enable the Waterfowl OLED Display
|
||||
# CONFIG_ZMK_DISPLAY=y
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <4>;
|
||||
// | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 |
|
||||
// | MX10 | MX9 | MX8 | MX7 | MX6 | | MX6 | MX7 | MX8 | MX9 | MX10 |
|
||||
// | MX15 | MX14 | MX13 | MX12 | MX11 | | MX11 | MX12 | MX13 | MX14 | MX15 |
|
||||
// | MX20 | MX19 | MX18 | MX17 | MX16 | | MX16 | MX17 | MX18 | MX19 | MX20 |
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
};
|
||||
|
||||
left_encoder: encoder_left { //roller
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
};
|
||||
|
||||
right_encoder: encoder_right { //Standard encoder on left half
|
||||
compatible = "alps,ec11";
|
||||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <2>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
};
|
||||
|
||||
// TODO: RGB node(s)
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "okay";
|
||||
|
||||
oled: ssd1306@3c {
|
||||
compatible = "solomon,ssd1306fb";
|
||||
reg = <0x3c>;
|
||||
label = "DISPLAY";
|
||||
width = <128>;
|
||||
height = <64>;
|
||||
segment-offset = <0>;
|
||||
page-offset = <0>;
|
||||
display-offset = <0>;
|
||||
multiplex-ratio = <63>;
|
||||
prechargep = <0x22>;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
/* QWERTY
|
||||
*
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | Q | W | E | R | T | | Y | U | I | O | P |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | A | S | D | F | G | | H | J | K | L | ; |
|
||||
* |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------|
|
||||
* | Z | X | C | V | B | | 2 | | 3 | | N | M | , | . | / |
|
||||
* `----------------------------------' `-----' `-----' `----------------------------------'
|
||||
* ,-----. ,--------------------. ,--------------------. ,-----.
|
||||
* | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 |
|
||||
* `-----' `--------------------' `--------------------' `-----'
|
||||
*/
|
||||
bindings = <
|
||||
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
||||
&mt LGUI A &mt LALT S &mt LCTRL D &mt LSHFT F &kp G &kp H &mt LSHFT J &mt LCTRL K &mt LALT L &mt LGUI SEMI
|
||||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
|
||||
&kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4
|
||||
>;
|
||||
|
||||
sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>;
|
||||
};
|
||||
|
||||
navnum_layer {
|
||||
/* NAVNUM
|
||||
*
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | | PgUp | UP | PgDn | | | / | 7 | 8 | 9 | - |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | Home | Left | Down | Right| End | | = | 4 | 5 | 6 | + |
|
||||
* |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------|
|
||||
* | | | INS | | | | 2 | | 3 | | 0 | 1 | 2 | 3 | * |
|
||||
* `----------------------------------' `-----' `-----' `----------------------------------'
|
||||
* ,-----. ,--------------------. ,--------------------. ,-----.
|
||||
* | 1 | | DEL | SPACE | MO(3)| | ESC | BS | ENTER | | 4 |
|
||||
* `-----' `--------------------' `--------------------' `-----'
|
||||
*/
|
||||
bindings = <
|
||||
&trans &kp PG_UP &kp UP &kp PG_DN &trans &kp FSLH &kp N7 &kp N8 &kp N9 &kp MINUS
|
||||
&kp HOME &kp LEFT &kp DOWN &kp RIGHT &kp END &kp EQUAL &kp N4 &kp N5 &kp N6 &kp PLUS
|
||||
&trans &trans &kp INS &trans &trans &kp N0 &kp N1 &kp N2 &kp N3 &kp ASTERISK
|
||||
&kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4
|
||||
>;
|
||||
|
||||
sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>;
|
||||
};
|
||||
|
||||
symbol_layer {
|
||||
/* SYM
|
||||
*
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | % | @ | [ | ] | \ | | | | ^ | | |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | # | ! | ( | ) | | | | _ | ' | " | ~ | ` |
|
||||
* |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------|
|
||||
* | $ | | { | } | & | | 2 | | 3 | | | | | | |
|
||||
* `----------------------------------' `-----' `-----' `----------------------------------'
|
||||
* ,-----. ,--------------------. ,--------------------. ,-----.
|
||||
* | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 |
|
||||
* `-----' `--------------------' `--------------------' `-----'
|
||||
*/
|
||||
bindings = <
|
||||
&kp PRCNT &kp AT &kp LBKT &kp RBKT &kp NON_US_BSLH &trans &trans &kp CARET &trans &trans
|
||||
&kp HASH &kp EXCL &kp LPAR &kp RPAR &kp PIPE &kp UNDER &kp APOS &kp DOUBLE_QUOTES &kp TILDE &kp GRAVE
|
||||
&kp DLLR &trans &kp LBRC &kp RBRC &kp AMPS &trans &trans &trans &trans &trans
|
||||
&kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4
|
||||
>;
|
||||
|
||||
sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>;
|
||||
};
|
||||
|
||||
function_layer {
|
||||
/* FUNC
|
||||
*
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | | | BTCLR| | Reset| | Reset| F7 | F8 | F9 | F11 |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | BT0 | BT1 | BT2 | BT3 | BT4 | | | F4 | F5 | F6 | F12 |
|
||||
* |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------|
|
||||
* | | | | | | | 2 | | 3 | | F10 | F1 | F2 | F3 | F13 |
|
||||
* `----------------------------------' `-----' `-----' `----------------------------------'
|
||||
* ,-----. ,--------------------. ,--------------------. ,-----.
|
||||
* | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 |
|
||||
* `-----' `--------------------' `--------------------' `-----'
|
||||
*/
|
||||
bindings = <
|
||||
&trans &trans &bt BT_CLR &trans &reset &reset &kp F7 &kp F8 &kp F9 &kp F11
|
||||
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &kp F4 &kp F5 &kp F6 &kp F12
|
||||
&trans &trans &trans &trans &trans &kp F10 &kp F1 &kp F2 &kp F3 &kp F13
|
||||
&kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4
|
||||
>;
|
||||
|
||||
sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
file_format: "1"
|
||||
id: waterfowl
|
||||
name: Waterfowl
|
||||
type: shield
|
||||
url: https://waterfowl.bio.link/
|
||||
requires: [pro_micro]
|
||||
exposes: [i2c_oled]
|
||||
features:
|
||||
- keys
|
||||
- display
|
||||
- encoder
|
||||
siblings:
|
||||
- waterfowl_left
|
||||
- waterfowl_right
|
|
@ -0,0 +1,2 @@
|
|||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "waterfowl.dtsi"
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
|
||||
&left_encoder {
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,2 @@
|
|||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "waterfowl.dtsi"
|
||||
|
||||
&default_transform {
|
||||
col-offset = <5>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 21 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
&right_encoder {
|
||||
status = "okay";
|
||||
};
|
Binary file not shown.
After Width: | Height: | Size: 902 KiB |
|
@ -115,10 +115,34 @@ endif
|
|||
|
||||
## Shield Overlays
|
||||
|
||||
<Tabs
|
||||
defaultValue="pro_micro"
|
||||
values={[
|
||||
{label: 'Pro Micro Shields', value: 'pro_micro'},
|
||||
{label: 'BlackPill Shields', value: 'blackpill'},
|
||||
]}>
|
||||
|
||||
<TabItem value="pro_micro">
|
||||
|
||||
### Pro Micro Shields
|
||||
|
||||

|
||||
|
||||
ZMK uses the blue color coded pin names to generate devicetree node references. For example, to refer to the node `0` in the devicetree files, use `&pro_micro 0`.
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="blackpill">
|
||||
|
||||
### BlackPill Shields
|
||||
|
||||

|
||||
|
||||
ZMK uses the blue color coded pin names to generate devicetree node references. For example, to refer to the node `17` in the devicetree files, use `&blackpill 17`.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<Tabs
|
||||
defaultValue="unibody"
|
||||
values={[
|
||||
|
|
|
@ -136,12 +136,13 @@ if [ "$keyboard_shield" == "y" ]; then
|
|||
continue
|
||||
fi
|
||||
|
||||
board_index=$(( $REPLY-1 ))
|
||||
|
||||
if [ -n "${!keyboard_sibling_first}" ] && [ "${boards_usb_only[$board_index]}" = "y" ] ; then
|
||||
echo "Wired split is not yet supported by ZMK."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
board_index=$(( $REPLY-1 ))
|
||||
board=${board_ids[$board_index]}
|
||||
board_title=${options[$board_index]}
|
||||
boards=( "${board}" )
|
||||
|
|
Loading…
Reference in New Issue