summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS11
-rw-r--r--app/boards/arm/dz60rgb/CMakeLists.txt7
-rw-r--r--app/boards/arm/dz60rgb/Kconfig.board6
-rw-r--r--app/boards/arm/dz60rgb/Kconfig.defconfig14
-rw-r--r--app/boards/arm/dz60rgb/board.cmake7
-rw-r--r--app/boards/arm/dz60rgb/dz60rgb_rev1.dts88
-rw-r--r--app/boards/arm/dz60rgb/dz60rgb_rev1.keymap25
-rw-r--r--app/boards/arm/dz60rgb/dz60rgb_rev1.yaml19
-rw-r--r--app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig27
-rw-r--r--app/boards/arm/dz60rgb/pinmux.c69
-rw-r--r--app/boards/arm/nrfmicro/Kconfig.board2
-rw-r--r--app/boards/arm/nrfmicro/Kconfig.defconfig2
-rw-r--r--app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi2
-rw-r--r--app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi2
-rw-r--r--app/boards/arm/nrfmicro/nrfmicro_11.dts2
-rw-r--r--app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts2
-rw-r--r--app/boards/arm/nrfmicro/nrfmicro_13.dts2
-rw-r--r--app/boards/arm/nrfmicro/pinmux.c2
-rw-r--r--app/boards/arm/planck/Kconfig.board2
-rw-r--r--app/boards/arm/planck/Kconfig.defconfig2
-rw-r--r--app/boards/arm/planck/planck_rev6_defconfig3
-rw-r--r--app/drivers/zephyr/ec11.c2
-rw-r--r--app/drivers/zephyr/ec11.h2
-rw-r--r--app/drivers/zephyr/ec11_trigger.c2
-rw-r--r--app/drivers/zephyr/kscan_gpio_direct.c2
-rw-r--r--app/drivers/zephyr/kscan_gpio_matrix.c2
-rw-r--r--app/dts/behaviors/toggle_layer.dtsi6
-rw-r--r--app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml10
-rw-r--r--app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml4
-rw-r--r--app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml2
-rw-r--r--app/include/drivers/behavior.h2
-rw-r--r--app/include/dt-bindings/zmk/reset.h2
-rw-r--r--app/include/linker/zmk-events.ld2
-rw-r--r--app/include/zmk/behavior.h5
-rw-r--r--app/include/zmk/ble.h5
-rw-r--r--app/include/zmk/display.h2
-rw-r--r--app/include/zmk/endpoints.h6
-rw-r--r--app/include/zmk/event-manager.h2
-rw-r--r--app/include/zmk/events/keycode-state-changed.h2
-rw-r--r--app/include/zmk/events/modifiers-state-changed.h2
-rw-r--r--app/include/zmk/events/position-state-changed.h2
-rw-r--r--app/include/zmk/events/sensor-event.h2
-rw-r--r--app/include/zmk/handlers.h6
-rw-r--r--app/include/zmk/hid.h6
-rw-r--r--app/include/zmk/hog.h5
-rw-r--r--app/include/zmk/keymap.h6
-rw-r--r--app/include/zmk/keys.h6
-rw-r--r--app/include/zmk/kscan.h6
-rw-r--r--app/include/zmk/matrix.h6
-rw-r--r--app/include/zmk/matrix_transform.h6
-rw-r--r--app/include/zmk/rgb_underglow.h2
-rw-r--r--app/include/zmk/sensors.h2
-rw-r--r--app/include/zmk/usb_hid.h11
-rwxr-xr-xapp/run-test.sh2
-rw-r--r--app/src/behaviors/behavior_hold_tap.c2
-rw-r--r--app/src/behaviors/behavior_key_press.c2
-rw-r--r--app/src/behaviors/behavior_momentary_layer.c2
-rw-r--r--app/src/behaviors/behavior_none.c2
-rw-r--r--app/src/behaviors/behavior_reset.c2
-rw-r--r--app/src/behaviors/behavior_rgb_underglow.c2
-rw-r--r--app/src/behaviors/behavior_sensor_rotate_key_press.c2
-rw-r--r--app/src/behaviors/behavior_toggle_layer.c2
-rw-r--r--app/src/behaviors/behavior_transparent.c2
-rw-r--r--app/src/ble.c2
-rw-r--r--app/src/ble_unpair_combo.c2
-rw-r--r--app/src/display.c2
-rw-r--r--app/src/endpoints.c5
-rw-r--r--app/src/event_manager.c2
-rw-r--r--app/src/events/keycode_state_changed.c2
-rw-r--r--app/src/events/modifiers_state_changed.c2
-rw-r--r--app/src/events/position_state_changed.c2
-rw-r--r--app/src/events/sensor_event.c2
-rw-r--r--app/src/hid.c6
-rw-r--r--app/src/hid_listener.c2
-rw-r--r--app/src/hog.c6
-rw-r--r--app/src/keymap.c5
-rw-r--r--app/src/kscan.c2
-rw-r--r--app/src/kscan_composite.c2
-rw-r--r--app/src/kscan_mock.c2
-rw-r--r--app/src/main.c2
-rw-r--r--app/src/matrix_transform.c5
-rw-r--r--app/src/rgb_underglow.c2
-rw-r--r--app/src/sensors.c2
-rw-r--r--app/src/split/bluetooth/central.c2
-rw-r--r--app/src/split/bluetooth/service.c5
-rw-r--r--app/src/split_listener.c2
-rw-r--r--app/src/usb_hid.c5
-rw-r--r--app/tests/momentary-layer/early-key-release/pending0
-rw-r--r--app/tests/toggle-layer/early-key-release/pending0
-rw-r--r--docs/docs/dev-guide-new-shield.md89
-rw-r--r--docs/docs/faq.md6
-rw-r--r--docs/docs/feature/encoders.md40
-rw-r--r--docs/docs/intro.md2
-rw-r--r--docs/sidebars.js4
-rw-r--r--docs/static/setup.sh7
95 files changed, 585 insertions, 78 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..8052fd9
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,11 @@
+# The ZMK Project consists of many contributors. This file includes individuals
+# who have contributed significant changes to the project. To be added to here,
+# please submit a PR to the project repo.
+Peter Johanson (@petejohanson)
+Innovaker (@innovaker)
+Nick Winans (@Nicell)
+Okke Formsma (@okke-formsma)
+Cody McGinnis (@BrainWart)
+Kurtis Lew (@kurtis-lew)
+Richard Jones (@bmcgavin)
+Kevin Chen (@chenkevinh) \ No newline at end of file
diff --git a/app/boards/arm/dz60rgb/CMakeLists.txt b/app/boards/arm/dz60rgb/CMakeLists.txt
new file mode 100644
index 0000000..940af1f
--- /dev/null
+++ b/app/boards/arm/dz60rgb/CMakeLists.txt
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: MIT
+
+if(CONFIG_PINMUX)
+zephyr_library()
+zephyr_library_sources(pinmux.c)
+zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
+endif()
diff --git a/app/boards/arm/dz60rgb/Kconfig.board b/app/boards/arm/dz60rgb/Kconfig.board
new file mode 100644
index 0000000..ec8dad6
--- /dev/null
+++ b/app/boards/arm/dz60rgb/Kconfig.board
@@ -0,0 +1,6 @@
+# Copyright (c) 2020 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+config BOARD_DZ60RGB_REV1
+ bool "DZ60RGB Keyboard"
+ depends on SOC_STM32F303XC
diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig
new file mode 100644
index 0000000..779d312
--- /dev/null
+++ b/app/boards/arm/dz60rgb/Kconfig.defconfig
@@ -0,0 +1,14 @@
+# DZ60RGB keyboard configuration
+
+# Copyright (c) 2020 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+if BOARD_DZ60RGB_REV1
+
+config ZMK_KEYBOARD_NAME
+ default "DZ60RGB Rev 1"
+
+config ZMK_USB
+ default y
+
+endif # BOARD_DZ60RGB_REV1
diff --git a/app/boards/arm/dz60rgb/board.cmake b/app/boards/arm/dz60rgb/board.cmake
new file mode 100644
index 0000000..10f6e29
--- /dev/null
+++ b/app/boards/arm/dz60rgb/board.cmake
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: MIT
+
+board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
+board_runner_args(jlink "--device=STM32F303CC" "--speed=4000")
+
+include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
+include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts
new file mode 100644
index 0000000..85c4ca5
--- /dev/null
+++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+/dts-v1/;
+#include <st/f3/stm32f303Xc.dtsi>
+
+#include <dt-bindings/zmk/matrix-transform.h>
+
+/ {
+ model = "DZ60RGB, Rev 1";
+ compatible = "dz60rgb,rev1", "st,stm32f303";
+
+ chosen {
+ zephyr,sram = &sram0;
+ zephyr,flash = &flash0;
+ zmk,kscan = &kscan0;
+ zmk,matrix_transform = &default_transform;
+ };
+
+ default_transform: keymap_transform_0 {
+ compatible = "zmk,matrix-transform";
+ columns = <14>;
+ rows = <5>;
+ 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(0,10) RC(0,11) RC(0,12) RC(0,13)
+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(1,10) RC(1,11) RC(1,12) RC(1,13)
+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(2,10) RC(2,11) RC(2,13)
+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) RC(3,10) RC(3,11) RC(3,13)
+RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,13)
+ >;
+ };
+
+ kscan0: kscan {
+ compatible = "zmk,kscan-gpio-matrix";
+ label = "KSCAN";
+
+ diode-direction = "col2row";
+ row-gpios
+ = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&gpiob 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&gpiob 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&gpiob 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&gpiob 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ ;
+ col-gpios
+ = <&gpioa 6 GPIO_ACTIVE_HIGH>
+ , <&gpioa 7 GPIO_ACTIVE_HIGH>
+ , <&gpiob 0 GPIO_ACTIVE_HIGH>
+ , <&gpiob 13 GPIO_ACTIVE_HIGH>
+ , <&gpiob 15 GPIO_ACTIVE_HIGH>
+ , <&gpioa 8 GPIO_ACTIVE_HIGH>
+ , <&gpioa 15 GPIO_ACTIVE_HIGH>
+ , <&gpiob 3 GPIO_ACTIVE_HIGH>
+ , <&gpiob 4 GPIO_ACTIVE_HIGH>
+ , <&gpiob 5 GPIO_ACTIVE_HIGH>
+ , <&gpiob 8 GPIO_ACTIVE_HIGH>
+ , <&gpiob 9 GPIO_ACTIVE_HIGH>
+ , <&gpioc 13 GPIO_ACTIVE_HIGH>
+ , <&gpioc 14 GPIO_ACTIVE_HIGH>
+ ;
+ };
+
+};
+
+&usb {
+ status = "okay";
+};
+
+&flash0 {
+ /*
+ * For more information, see:
+ * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
+ */
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* Set 6Kb of storage at the end of the 256Kb of flash */
+ storage_partition: partition@3e800 {
+ label = "storage";
+ reg = <0x0003e800 0x00001800>;
+ };
+ };
+};
diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap b/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap
new file mode 100644
index 0000000..8de01c1
--- /dev/null
+++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap
@@ -0,0 +1,25 @@
+#include <behaviors.dtsi>
+#include <dt-bindings/zmk/keys.h>
+
+/ {
+ keymap {
+ compatible = "zmk,keymap";
+
+ default_layer {
+// ------------------------------------------------------------------------------------------
+// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
+// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
+// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
+// | SHIFT | Z | X | C | V | B | N | M | , | . | SHIFT(/) | ^ | DEL |
+// | CTL | WIN | ALT | SPACE | ALT | MO(1) | <- | v | -> |
+// ------------------------------------------------------------------------------------------
+ bindings = <
+ &kp ESC &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 &kp MINUS &kp EQL &kp BKSP
+ &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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT &kp RET
+ &kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &mt MOD_RSFT FSLH &kp UARW &kp DEL
+ &kp LCTL &kp LGUI &kp LALT &kp SPC &kp RALT &mo 1 &kp LARW &kp DARW &kp RARW
+ >;
+ };
+ };
+}; \ No newline at end of file
diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml b/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml
new file mode 100644
index 0000000..d283621
--- /dev/null
+++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml
@@ -0,0 +1,19 @@
+identifier: DZ60RGB_rev1
+name: DZ60RGBREV1
+type: keyboard
+arch: arm
+toolchain:
+ - zephyr
+ - gnuarmemb
+ - xtools
+ram: 40
+supported:
+ - gpio
+ - i2c
+ - counter
+ - spi
+ - usb_device
+ - lsm303dlhc
+ - nvs
+ - can
+ - kscan
diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig
new file mode 100644
index 0000000..33840f9
--- /dev/null
+++ b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: MIT
+
+CONFIG_SOC_SERIES_STM32F3X=y
+CONFIG_SOC_STM32F303XC=y
+# 72MHz system clock
+CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
+
+# enable pinmux
+CONFIG_PINMUX=y
+
+# enable GPIO
+CONFIG_GPIO=y
+
+# clock configuration
+CONFIG_CLOCK_CONTROL=y
+
+# Clock configuration for Cube Clock control driver
+CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
+CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
+# use HSE as PLL input
+CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
+# produce 72MHz clock at PLL output
+CONFIG_CLOCK_STM32_PLL_PREDIV=1
+CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9
+CONFIG_CLOCK_STM32_AHB_PRESCALER=1
+CONFIG_CLOCK_STM32_APB1_PRESCALER=2
+CONFIG_CLOCK_STM32_APB2_PRESCALER=1
diff --git a/app/boards/arm/dz60rgb/pinmux.c b/app/boards/arm/dz60rgb/pinmux.c
new file mode 100644
index 0000000..60e231b
--- /dev/null
+++ b/app/boards/arm/dz60rgb/pinmux.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017 I-SENSE group of ICCS
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <kernel.h>
+#include <device.h>
+#include <init.h>
+#include <drivers/pinmux.h>
+#include <sys/sys_io.h>
+
+#include <pinmux/stm32/pinmux_stm32.h>
+
+/* pin assignments for STM32F3DISCOVERY board */
+static const struct pin_config pinconf[] = {
+#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) && CONFIG_SERIAL
+ {STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX},
+ {STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX},
+#endif
+#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) && CONFIG_SERIAL
+ {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX},
+ {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX},
+#endif
+#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C
+ {STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL},
+ {STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA},
+#endif
+#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C
+ {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL},
+ {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA},
+#endif
+#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) && CONFIG_SPI
+#ifdef CONFIG_SPI_STM32_USE_HW_SS
+ {STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS},
+#endif /* CONFIG_SPI_STM32_USE_HW_SS */
+ {STM32_PIN_PA5, STM32F3_PINMUX_FUNC_PA5_SPI1_SCK},
+ {STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO},
+ {STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI},
+#endif
+#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) && CONFIG_SPI
+#ifdef CONFIG_SPI_STM32_USE_HW_SS
+ {STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS},
+#endif /* CONFIG_SPI_STM32_USE_HW_SS */
+ {STM32_PIN_PB13, STM32F3_PINMUX_FUNC_PB13_SPI2_SCK},
+ {STM32_PIN_PB14, STM32F3_PINMUX_FUNC_PB14_SPI2_MISO},
+ {STM32_PIN_PB15, STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI},
+#endif
+#ifdef CONFIG_USB_DC_STM32
+ {STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM},
+ {STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP},
+#endif /* CONFIG_USB_DC_STM32 */
+#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) && CONFIG_CAN
+ {STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX},
+ {STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX},
+#endif
+};
+
+static int pinmux_stm32_init(struct device *port)
+{
+ ARG_UNUSED(port);
+
+ stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf));
+
+ return 0;
+}
+
+SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
+ CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); \ No newline at end of file
diff --git a/app/boards/arm/nrfmicro/Kconfig.board b/app/boards/arm/nrfmicro/Kconfig.board
index 177373a..36b2d55 100644
--- a/app/boards/arm/nrfmicro/Kconfig.board
+++ b/app/boards/arm/nrfmicro/Kconfig.board
@@ -1,6 +1,6 @@
# nrfmicro board configuration
-# Copyright (c) 2020 Okke Formsma, joric
+# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_NRFMICRO_11
diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig
index 9cce5a9..7957b4a 100644
--- a/app/boards/arm/nrfmicro/Kconfig.defconfig
+++ b/app/boards/arm/nrfmicro/Kconfig.defconfig
@@ -1,6 +1,6 @@
# Electronut Labs Papyr board configuration
-# Copyright (c) 2020 Okke Formsma, joric
+# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi
index 6cde2b4..558391d 100644
--- a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi
+++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Okke Formsma, joric
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi
index 9bad7f4..68ca266 100644
--- a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi
+++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Okke Formsma, joric
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts
index dc07ac8..95bd8ad 100644
--- a/app/boards/arm/nrfmicro/nrfmicro_11.dts
+++ b/app/boards/arm/nrfmicro/nrfmicro_11.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Okke Formsma, joric
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts
index 5bf493f..85693a8 100644
--- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts
+++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Okke Formsma, joric
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts
index dc07ac8..95bd8ad 100644
--- a/app/boards/arm/nrfmicro/nrfmicro_13.dts
+++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Okke Formsma, joric
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c
index 3792b59..0536fe0 100644
--- a/app/boards/arm/nrfmicro/pinmux.c
+++ b/app/boards/arm/nrfmicro/pinmux.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Okke Formsma, joric
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/boards/arm/planck/Kconfig.board b/app/boards/arm/planck/Kconfig.board
index 0952448..fe15e1a 100644
--- a/app/boards/arm/planck/Kconfig.board
+++ b/app/boards/arm/planck/Kconfig.board
@@ -1,6 +1,6 @@
# Planck V6 board configuration
-# Copyright (c) 2020 Peter Johanson
+# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_PLANCK_REV6
diff --git a/app/boards/arm/planck/Kconfig.defconfig b/app/boards/arm/planck/Kconfig.defconfig
index 93118d4..6f5bf52 100644
--- a/app/boards/arm/planck/Kconfig.defconfig
+++ b/app/boards/arm/planck/Kconfig.defconfig
@@ -1,6 +1,6 @@
# Planck keyboard configuration
-# Copyright (c) 2020 Peter Johanson
+# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if BOARD_PLANCK_REV6
diff --git a/app/boards/arm/planck/planck_rev6_defconfig b/app/boards/arm/planck/planck_rev6_defconfig
index a440ff1..e34ce00 100644
--- a/app/boards/arm/planck/planck_rev6_defconfig
+++ b/app/boards/arm/planck/planck_rev6_defconfig
@@ -20,9 +20,6 @@ CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
# use HSE as PLL input
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
-# however, the board does not have an external oscillator, so just use
-# the 8MHz clock signal coming from integrated STLink
-CONFIG_CLOCK_STM32_HSE_BYPASS=y
# produce 72MHz clock at PLL output
CONFIG_CLOCK_STM32_PLL_PREDIV=1
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9
diff --git a/app/drivers/zephyr/ec11.c b/app/drivers/zephyr/ec11.c
index 1bc5d6a..dfa86ef 100644
--- a/app/drivers/zephyr/ec11.c
+++ b/app/drivers/zephyr/ec11.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/drivers/zephyr/ec11.h b/app/drivers/zephyr/ec11.h
index 823d92d..27fed9b 100644
--- a/app/drivers/zephyr/ec11.h
+++ b/app/drivers/zephyr/ec11.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/drivers/zephyr/ec11_trigger.c b/app/drivers/zephyr/ec11_trigger.c
index 709d1fb..a04a561 100644
--- a/app/drivers/zephyr/ec11_trigger.c
+++ b/app/drivers/zephyr/ec11_trigger.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Intel Corporation
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/drivers/zephyr/kscan_gpio_direct.c b/app/drivers/zephyr/kscan_gpio_direct.c
index a3aa8c4..6e6a01f 100644
--- a/app/drivers/zephyr/kscan_gpio_direct.c
+++ b/app/drivers/zephyr/kscan_gpio_direct.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/drivers/zephyr/kscan_gpio_matrix.c b/app/drivers/zephyr/kscan_gpio_matrix.c
index b19c492..079a830 100644
--- a/app/drivers/zephyr/kscan_gpio_matrix.c
+++ b/app/drivers/zephyr/kscan_gpio_matrix.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/dts/behaviors/toggle_layer.dtsi b/app/dts/behaviors/toggle_layer.dtsi
index 86a050d..4045396 100644
--- a/app/dts/behaviors/toggle_layer.dtsi
+++ b/app/dts/behaviors/toggle_layer.dtsi
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2020 Cody McGinnis <brainwart@gmail.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
-
- / {
+
+/ {
behaviors {
tog: behavior_toggle_layer {
compatible = "zmk,behavior-toggle-layer";
diff --git a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml
index a20578f..5f74e9a 100644
--- a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml
+++ b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, Cody McGinnis; Okke Formsma
+# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Hold or Tap behavior
@@ -12,12 +12,12 @@ properties:
type: phandles
required: true
tapping_term_ms:
- type: int
+ type: int
flavor:
type: string
required: false
default: "hold-preferred"
enum:
- - "hold-preferred"
- - "balanced"
- - "tap-preferred" \ No newline at end of file
+ - "hold-preferred"
+ - "balanced"
+ - "tap-preferred"
diff --git a/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml b/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml
index 6b6d5b0..2cb74b9 100644
--- a/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml
+++ b/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml
@@ -1,8 +1,8 @@
-# Copyright (c) 2020, Nick Winans
+# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: RGB Underglow Action
compatible: "zmk,behavior-rgb-underglow"
-include: one_param.yaml \ No newline at end of file
+include: one_param.yaml
diff --git a/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml b/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml
index 065949f..0a9723f 100644
--- a/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml
+++ b/app/dts/bindings/behaviors/zmk,behavior-toggle-layer.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, Cody McGinnis <brainwart@gmail.com>
+# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Toggle Layer
diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h
index c24d11b..617b5ab 100644
--- a/app/include/drivers/behavior.h
+++ b/app/include/drivers/behavior.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/dt-bindings/zmk/reset.h b/app/include/dt-bindings/zmk/reset.h
index b513649..683f965 100644
--- a/app/include/dt-bindings/zmk/reset.h
+++ b/app/include/dt-bindings/zmk/reset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/linker/zmk-events.ld b/app/include/linker/zmk-events.ld
index 44063be..78d00bb 100644
--- a/app/include/linker/zmk-events.ld
+++ b/app/include/linker/zmk-events.ld
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/behavior.h b/app/include/zmk/behavior.h
index 63edcc9..6f5815f 100644
--- a/app/include/zmk/behavior.h
+++ b/app/include/zmk/behavior.h
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#pragma once
diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h
index e760ed7..d0aaa96 100644
--- a/app/include/zmk/ble.h
+++ b/app/include/zmk/ble.h
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#pragma once
diff --git a/app/include/zmk/display.h b/app/include/zmk/display.h
index 93ac3ff..def4392 100644
--- a/app/include/zmk/display.h
+++ b/app/include/zmk/display.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/endpoints.h b/app/include/zmk/endpoints.h
index 4c0f442..aad6265 100644
--- a/app/include/zmk/endpoints.h
+++ b/app/include/zmk/endpoints.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
#include <zmk/keys.h>
diff --git a/app/include/zmk/event-manager.h b/app/include/zmk/event-manager.h
index d9a56a4..9da6602 100644
--- a/app/include/zmk/event-manager.h
+++ b/app/include/zmk/event-manager.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/events/keycode-state-changed.h b/app/include/zmk/events/keycode-state-changed.h
index e12813c..fc37946 100644
--- a/app/include/zmk/events/keycode-state-changed.h
+++ b/app/include/zmk/events/keycode-state-changed.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/events/modifiers-state-changed.h b/app/include/zmk/events/modifiers-state-changed.h
index a17a093..b39e11e 100644
--- a/app/include/zmk/events/modifiers-state-changed.h
+++ b/app/include/zmk/events/modifiers-state-changed.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/events/position-state-changed.h b/app/include/zmk/events/position-state-changed.h
index c91688e..f88080d 100644
--- a/app/include/zmk/events/position-state-changed.h
+++ b/app/include/zmk/events/position-state-changed.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/events/sensor-event.h b/app/include/zmk/events/sensor-event.h
index f881ac5..a9302a5 100644
--- a/app/include/zmk/events/sensor-event.h
+++ b/app/include/zmk/events/sensor-event.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/handlers.h b/app/include/zmk/handlers.h
index a10851f..7ce1d27 100644
--- a/app/include/zmk/handlers.h
+++ b/app/include/zmk/handlers.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
#include <dt-bindings/zmk/keys.h>
diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h
index 138606a..a945e72 100644
--- a/app/include/zmk/hid.h
+++ b/app/include/zmk/hid.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
#include <usb/usb_device.h>
diff --git a/app/include/zmk/hog.h b/app/include/zmk/hog.h
index e2f976a..a7dda51 100644
--- a/app/include/zmk/hog.h
+++ b/app/include/zmk/hog.h
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#pragma once
diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h
index c1f6393..6192587 100644
--- a/app/include/zmk/keymap.h
+++ b/app/include/zmk/keymap.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
bool zmk_keymap_layer_active(u8_t layer);
diff --git a/app/include/zmk/keys.h b/app/include/zmk/keys.h
index 6966bba..ee9c3d9 100644
--- a/app/include/zmk/keys.h
+++ b/app/include/zmk/keys.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
#include <zephyr.h>
diff --git a/app/include/zmk/kscan.h b/app/include/zmk/kscan.h
index ebffccd..3352600 100644
--- a/app/include/zmk/kscan.h
+++ b/app/include/zmk/kscan.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
int zmk_kscan_init(char *name);
diff --git a/app/include/zmk/matrix.h b/app/include/zmk/matrix.h
index 3088263..1614317 100644
--- a/app/include/zmk/matrix.h
+++ b/app/include/zmk/matrix.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
#include <devicetree.h>
diff --git a/app/include/zmk/matrix_transform.h b/app/include/zmk/matrix_transform.h
index e9e969a..29c2afc 100644
--- a/app/include/zmk/matrix_transform.h
+++ b/app/include/zmk/matrix_transform.h
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#pragma once
u32_t zmk_matrix_transform_row_column_to_position(u32_t row, u32_t column); \ No newline at end of file
diff --git a/app/include/zmk/rgb_underglow.h b/app/include/zmk/rgb_underglow.h
index 69e9a9b..94cc32c 100644
--- a/app/include/zmk/rgb_underglow.h
+++ b/app/include/zmk/rgb_underglow.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Nick Winans <nick@winans.codes>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/sensors.h b/app/include/zmk/sensors.h
index c60cd4b..63dcade 100644
--- a/app/include/zmk/sensors.h
+++ b/app/include/zmk/sensors.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/include/zmk/usb_hid.h b/app/include/zmk/usb_hid.h
index 5d7c744..7ee2629 100644
--- a/app/include/zmk/usb_hid.h
+++ b/app/include/zmk/usb_hid.h
@@ -1,5 +1,10 @@
-#ifndef ZMK_USB_HID
-#define ZMK_USB_HID
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#pragma once
#include <usb/usb_device.h>
#include <usb/class/usb_hid.h>
@@ -10,5 +15,3 @@
int zmk_usb_hid_init();
int zmk_usb_hid_send_report(u8_t *report, size_t len);
-
-#endif
diff --git a/app/run-test.sh b/app/run-test.sh
index be335c6..3b7cd58 100755
--- a/app/run-test.sh
+++ b/app/run-test.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2020 Peter Johanson; Cody McGinnis
+# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
#
diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c
index 2c6d996..dce724d 100644
--- a/app/src/behaviors/behavior_hold_tap.c
+++ b/app/src/behaviors/behavior_hold_tap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Cody McGinnis, Okke Formsma
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_key_press.c b/app/src/behaviors/behavior_key_press.c
index 7404c79..42becf5 100644
--- a/app/src/behaviors/behavior_key_press.c
+++ b/app/src/behaviors/behavior_key_press.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_momentary_layer.c b/app/src/behaviors/behavior_momentary_layer.c
index 8a8584a..7d65135 100644
--- a/app/src/behaviors/behavior_momentary_layer.c
+++ b/app/src/behaviors/behavior_momentary_layer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_none.c b/app/src/behaviors/behavior_none.c
index e822d5e..c464988 100644
--- a/app/src/behaviors/behavior_none.c
+++ b/app/src/behaviors/behavior_none.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_reset.c b/app/src/behaviors/behavior_reset.c
index 30a96ea..b5692b5 100644
--- a/app/src/behaviors/behavior_reset.c
+++ b/app/src/behaviors/behavior_reset.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_rgb_underglow.c b/app/src/behaviors/behavior_rgb_underglow.c
index 7a48e07..f0a35ef 100644
--- a/app/src/behaviors/behavior_rgb_underglow.c
+++ b/app/src/behaviors/behavior_rgb_underglow.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Nick Winans <nick@winans.codes>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_sensor_rotate_key_press.c b/app/src/behaviors/behavior_sensor_rotate_key_press.c
index fb0fb85..fa55575 100644
--- a/app/src/behaviors/behavior_sensor_rotate_key_press.c
+++ b/app/src/behaviors/behavior_sensor_rotate_key_press.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_toggle_layer.c b/app/src/behaviors/behavior_toggle_layer.c
index 02a76d2..c6d5225 100644
--- a/app/src/behaviors/behavior_toggle_layer.c
+++ b/app/src/behaviors/behavior_toggle_layer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Cody McGinnis <brainwart@gmail.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/behaviors/behavior_transparent.c b/app/src/behaviors/behavior_transparent.c
index 5109264..51f682b 100644
--- a/app/src/behaviors/behavior_transparent.c
+++ b/app/src/behaviors/behavior_transparent.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/ble.c b/app/src/ble.c
index 0e96d16..c4d3efd 100644
--- a/app/src/ble.c
+++ b/app/src/ble.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/ble_unpair_combo.c b/app/src/ble_unpair_combo.c
index 82fa834..3633a5b 100644
--- a/app/src/ble_unpair_combo.c
+++ b/app/src/ble_unpair_combo.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/display.c b/app/src/display.c
index 9021914..dca462e 100644
--- a/app/src/display.c
+++ b/app/src/display.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/endpoints.c b/app/src/endpoints.c
index c9ba716..61e86ce 100644
--- a/app/src/endpoints.c
+++ b/app/src/endpoints.c
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#include <zmk/endpoints.h>
#include <zmk/hid.h>
diff --git a/app/src/event_manager.c b/app/src/event_manager.c
index 47ad6b7..6d37e4e 100644
--- a/app/src/event_manager.c
+++ b/app/src/event_manager.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/events/keycode_state_changed.c b/app/src/events/keycode_state_changed.c
index 73508e1..9a1984a 100644
--- a/app/src/events/keycode_state_changed.c
+++ b/app/src/events/keycode_state_changed.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/events/modifiers_state_changed.c b/app/src/events/modifiers_state_changed.c
index 71ec015..8becd02 100644
--- a/app/src/events/modifiers_state_changed.c
+++ b/app/src/events/modifiers_state_changed.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/events/position_state_changed.c b/app/src/events/position_state_changed.c
index 69cba03..f8f1a26 100644
--- a/app/src/events/position_state_changed.c
+++ b/app/src/events/position_state_changed.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/events/sensor_event.c b/app/src/events/sensor_event.c
index 1b0302d..c6b80cd 100644
--- a/app/src/events/sensor_event.c
+++ b/app/src/events/sensor_event.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/hid.c b/app/src/hid.c
index ca04056..07fc3a0 100644
--- a/app/src/hid.c
+++ b/app/src/hid.c
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
diff --git a/app/src/hid_listener.c b/app/src/hid_listener.c
index 69aa23e..9f68ca2 100644
--- a/app/src/hid_listener.c
+++ b/app/src/hid_listener.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/hog.c b/app/src/hog.c
index 589c28f..92858d5 100644
--- a/app/src/hog.c
+++ b/app/src/hog.c
@@ -1,3 +1,9 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
#include <settings/settings.h>
#include <bluetooth/bluetooth.h>
diff --git a/app/src/keymap.c b/app/src/keymap.c
index 57cdad6..b1c68f1 100644
--- a/app/src/keymap.c
+++ b/app/src/keymap.c
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#include <sys/util.h>
#include <logging/log.h>
diff --git a/app/src/kscan.c b/app/src/kscan.c
index 63713f1..7a4d3a4 100644
--- a/app/src/kscan.c
+++ b/app/src/kscan.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/kscan_composite.c b/app/src/kscan_composite.c
index d46484b..15527eb 100644
--- a/app/src/kscan_composite.c
+++ b/app/src/kscan_composite.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/kscan_mock.c b/app/src/kscan_mock.c
index d626c71..741f6c1 100644
--- a/app/src/kscan_mock.c
+++ b/app/src/kscan_mock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/main.c b/app/src/main.c
index 5a678ee..5da272e 100644
--- a/app/src/main.c
+++ b/app/src/main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/matrix_transform.c b/app/src/matrix_transform.c
index 7ecf1ae..8a037b3 100644
--- a/app/src/matrix_transform.c
+++ b/app/src/matrix_transform.c
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#include <zephyr.h>
#include <zmk/matrix_transform.h>
diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c
index 95adcec..97c2ac0 100644
--- a/app/src/rgb_underglow.c
+++ b/app/src/rgb_underglow.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Nick Winans <nick@winans.codes>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/sensors.c b/app/src/sensors.c
index 501ce15..7a7c0c5 100644
--- a/app/src/sensors.c
+++ b/app/src/sensors.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c
index 237096f..9e67228 100644
--- a/app/src/split/bluetooth/central.c
+++ b/app/src/split/bluetooth/central.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c
index e1d232a..0a5ddb7 100644
--- a/app/src/split/bluetooth/service.c
+++ b/app/src/split/bluetooth/service.c
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#include <zephyr/types.h>
#include <sys/util.h>
diff --git a/app/src/split_listener.c b/app/src/split_listener.c
index 65f835a..46a95e1 100644
--- a/app/src/split_listener.c
+++ b/app/src/split_listener.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ * Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c
index 784fc25..e2fe0f3 100644
--- a/app/src/usb_hid.c
+++ b/app/src/usb_hid.c
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
#include <device.h>
#include <init.h>
diff --git a/app/tests/momentary-layer/early-key-release/pending b/app/tests/momentary-layer/early-key-release/pending
deleted file mode 100644
index e69de29..0000000
--- a/app/tests/momentary-layer/early-key-release/pending
+++ /dev/null
diff --git a/app/tests/toggle-layer/early-key-release/pending b/app/tests/toggle-layer/early-key-release/pending
deleted file mode 100644
index e69de29..0000000
--- a/app/tests/toggle-layer/early-key-release/pending
+++ /dev/null
diff --git a/docs/docs/dev-guide-new-shield.md b/docs/docs/dev-guide-new-shield.md
index 8556623..bc5175b 100644
--- a/docs/docs/dev-guide-new-shield.md
+++ b/docs/docs/dev-guide-new-shield.md
@@ -3,6 +3,9 @@ id: dev-guide-new-shield
title: New Keyboard Shield
---
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
## Overview
This guide will walk through the steps necessary to add ZMK support for a keyboard the uses a (Pro Micro compatible) addon MCU board to provide the microprocessor.
@@ -13,6 +16,7 @@ The high level steps are:
- Add the shield overlay file to define the [KSCAN driver]() for detecting key press/release.
- (Optional) Add the matrix transform for mapping KSCAN row/column values to sane key positions. This is needed for non-rectangular keyboards, or where the underlying row/column pin arrangement does not map one to one with logical locations on the keyboard.
- Add a default keymap, which users can override in their own configs as needed.
+- Add support for features such as encoders, OLED displays, or RGB underglow.
It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/2.3.0/guides/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing.
@@ -195,6 +199,91 @@ Further documentation on behaviors and bindings is forthcoming, but a summary of
- `trans` is the "transparent" behavior, useful to be place in higher layers above `mo` bindings to be sure the key release is handled by the lower layer. No binding arguments are required.
- `mt` is the "mod-tap" behavior, and takes two binding arguments, the modifier to use if held, and the keycode to send if tapped.
+## Adding Features
+
+### Encoders
+
+EC11 encoder support can be added to your board or shield by adding the appropriate lines to your board/shield's configuration (.conf), device tree (.dtsi), overlay (.overlay), and keymap (.keymap) files.
+
+<Tabs
+defaultValue="conf"
+values={[
+{label: '.conf', value: 'conf'},
+{label: '.dtsi', value: 'dtsi'},
+{label: '.overlay', value: 'overlay'},
+{label: '.keymap', value: 'keymap'},
+]}>
+<TabItem value="conf">
+
+In your configuration file you will need to add the following lines so that the encoders can be enabled/disabled:
+
+```
+# Uncomment to enable encoder
+# CONFIG_EC11=y
+# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
+```
+
+These should be commented by default for encoders that are optional/can be swapped with switches, but can be uncommented if encoders are part of the default design.
+
+:::note
+If building locally for split boards, you may need to add these lines to the specific half's configuration file as well as the combined configuration file.
+:::
+
+</TabItem>
+<TabItem value = "dtsi">
+In your device tree file you will need to add the following lines to define the encoder sensor:
+
+
+```
+left_encoder: encoder_left {
+ compatible = "alps,ec11";
+ label = "LEFT_ENCODER";
+ a-gpios = <PIN_A (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
+ b-gpios = <PIN_B (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
+ resolution = <4>;
+ };
+```
+Here you will have to replace PIN_A and PIN_B with the appropriate pins that your PCB utilizes for the encoder(s). For keyboards that use the Pro Micro or any of the Pro Micro replacements, Sparkfun's [Pro Micro Hookup Guide](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro) has a pinout diagram that can be useful to determine the right pins. Reference either the blue numbers labeled "Arduino" (digital pins) or the green numbers labeled "Analog" (analog pins). For pins that are labeled as both digital and analog, refer to your specific board's .dtsi file to determine how you should refer to that pin.
+
+Add additional encoders as necessary by duplicating the above lines, replacing `left` with whatever you would like to call your encoder, and updating the pins. Note that support for peripheral (right) side sensors over BLE is still in progress.
+
+Once you have defined the encoder sensors, you will have to add them to the list of sensors:
+
+```
+sensors {
+ compatible = "zmk,keymap-sensors";
+ sensors = <&left_encoder &right_encoder>;
+ };
+```
+
+In this example, a left_encoder and right_encoder are both added. Additional encoders can be added with spaces separating each, and the order they are added here determines the order in which you define their behavior in your keymap.
+
+</TabItem>
+<TabItem value = "overlay">
+Add the following lines to your overlay file(s) to enable the encoder:
+
+```
+&left_encoder {
+ status = "okay";
+};
+```
+
+:::note
+For split keyboards, make sure to add left hand encoders to the left .overlay file and right hand encoders to the right .overlay file.
+:::
+
+</TabItem>
+<TabItem value = "keymap">
+Add the following line to your keymap file to add default encoder behavior bindings:
+
+```
+sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
+```
+Add additional bindings as necessary to match the default number of encoders on your board. See the [Encoders](/docs/feature/encoders) and [Keymap](/docs/feature/keymaps) feature documentation for more details.
+
+</TabItem>
+</Tabs>
+
## Testing
Once you've fully created the new keyboard shield definition,
diff --git a/docs/docs/faq.md b/docs/docs/faq.md
index 2ab158d..d8bbd71 100644
--- a/docs/docs/faq.md
+++ b/docs/docs/faq.md
@@ -76,7 +76,7 @@ Please note, many keyboards only have a single PCB which includes the “brainsâ
### What bootloader does ZMK use?
-ZMK isn’t designed for any particular bootloader, and supports flashing different boards with different flash utilities (e.g. OpenOCD, nrfjprog, etc.). So if you have any difficulties, please let us know on [Discord](https://discord.gg/VJnx9kr)!
+ZMK isn’t designed for any particular bootloader, and supports flashing different boards with different flash utilities (e.g. OpenOCD, nrfjprog, etc.). So if you have any difficulties, please let us know on [Discord](https://zmkfirmware.dev/community/discord/invite)!
### Can I contribute?
@@ -84,11 +84,11 @@ Of course! Please use the developer [documentation](/docs) to get started!
### I have an idea! What should I do?
-Please join us on [Discord](https://discord.gg/VJnx9kr) and discuss it with us!
+Please join us on [Discord](https://zmkfirmware.dev/community/discord/invite) and discuss it with us!
### I want to add a new keyboard! What should I do?
-The exact process for the management of all the possible hardware is still being finalized, but any developer looking to contribute new keyboard definitions should chat with us on [Discord](https://discord.gg/VJnx9kr) to get started.
+The exact process for the management of all the possible hardware is still being finalized, but any developer looking to contribute new keyboard definitions should chat with us on [Discord](https://zmkfirmware.dev/community/discord/invite) to get started.
### Does ZMK have a Code of Conduct?
diff --git a/docs/docs/feature/encoders.md b/docs/docs/feature/encoders.md
index 16537ad..38ff9d3 100644
--- a/docs/docs/feature/encoders.md
+++ b/docs/docs/feature/encoders.md
@@ -3,4 +3,42 @@ title: Encoders
sidebar_label: Encoders
---
-TODO: Documentation on encoders.
+Existing support for encoders in ZMK is focused around the five pin EC11 rotary encoder with push button design used in the majority of current keyboard and macropad designs.
+
+## Enabling EC11 Encoders
+
+To enable encoders for boards that have existing encoder support, uncomment the `EC11_CONFIG=y` and `CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y` lines in your board's .conf file in your `zmk-config/config` folder. Save and push your changes, then download and flash the new firmware.
+
+## Customizing EC11 Encoder Behavior
+
+Encoder behavior in ZMK is configured in two different locations as the push button and rotation behaviors are handled in two separate ways.
+
+### Push Button
+
+Keyboards and macropads with encoder support will typically take the two EC11 pins responsible for the push button and include them as part of the matrix for the keys. To configure what is sent by the push button, find the encoder's position in the keyboard matrix and assign it a behavior the same as you would any other key.
+
+### Rotation
+
+Rotation is handled separately as a type of sensor. The behavior for this is set in `sensor-bindings`, which is defined in each keymap layer in the following format:
+
+```
+sensor-bindings = <BINDING CW_KEY CCW_KEY>;
+```
+
+- `BINDING` is one of two rotation bindings that are currently defined, `&inc_dec_cp` for consumer key presses or `&inc_dec_kp` for normal key presses (see [Key Press](/docs/behavior/key-press) for the difference between the two).
+- `CW_KEY` is the keycode activated by a clockwise turn.
+- `CCW_KEY` is the keycode activated by a counter-clockwise turn.
+
+Additional encoders can be configured by adding more `BINDING CW_KEY CCW_KEY` sets immediately after the first.
+
+As an example, a complete `sensor-bindings` for a Kyria with two encoders could look like:
+
+```
+sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>;
+```
+
+Here, the left encoder is configured to control volume up and down while the right encoder sends either Page Up or Page Down.
+
+## Adding Encoder Support
+
+See the [New Keyboard Shield](/docs/dev-guide-new-shield) documentation for how to add or modify additional encoders to your shield.
diff --git a/docs/docs/intro.md b/docs/docs/intro.md
index 29045f7..50a747c 100644
--- a/docs/docs/intro.md
+++ b/docs/docs/intro.md
@@ -5,7 +5,7 @@ sidebar_label: Introduction
---
ZMK Firmware is an open source (MIT) keyboard
-firmware built on the [Zephyr™ Project](https://zephyrproject.com/) Real Time Operating System (RTOS).
+firmware built on the [Zephyr™ Project](https://zephyrproject.org/) Real Time Operating System (RTOS).
The goal is to provider a powerful, featureful keyboard firmware that is free
of licensing issues that prevent upstream BLE support as a first-class
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 7da0f5b..6bd3aa4 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -32,6 +32,8 @@ module.exports = {
"dev-posix-board",
"dev-tests",
],
- "Dev Guides": ["dev-guide-new-shield", "dev-guide-usb-logging"],
+ "Dev Guides": [
+ "dev-guide-new-shield",
+ "dev-guide-usb-logging"],
},
};
diff --git a/docs/static/setup.sh b/docs/static/setup.sh
index 70defdf..5d203a4 100644
--- a/docs/static/setup.sh
+++ b/docs/static/setup.sh
@@ -38,7 +38,7 @@ echo ""
echo "Keyboard Shield Selection:"
prompt="Pick an keyboard:"
-options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris")
+options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "RoMac")
PS3="$prompt "
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
@@ -53,6 +53,7 @@ select opt in "${options[@]}" "Quit"; do
4 ) shield_title="Splitreus62" shield="splitreus62"; split="y"; break;;
5 ) shield_title="Sofle" shield="sofle"; split="y"; break;;
6 ) shield_title="Iris" shield="iris"; split="y"; break;;
+ 7 ) shield_title="RoMac" shield="romac"; split="n"; break;;
# Add link to docs on adding your own custom shield in your ZMK config!
# $(( ${#options[@]}+1 )) ) echo "Other!"; break;;
@@ -62,6 +63,10 @@ select opt in "${options[@]}" "Quit"; do
esac
done
+if [ "$split" == "n" ]; then
+ repo_path="https://github.com/zmkfirmware/zmk-config-template.git"
+fi
+
read -e -p "Copy in the stock keymap for customization? [Yn]: " copy_keymap
if [ -z "$copy_keymap" ] || [ "$copy_keymap" == "Y" ] || [ "$copy_keymap" == "y" ]; then copy_keymap="yes"; fi