From bc282a0a4f1af4f6f78a0dd63e5b022eb76a603c Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 2 Aug 2020 10:29:07 -0500 Subject: WIP DZ60RGB board definition --- app/boards/arm/dz60rgb/CMakeLists.txt | 9 +++ app/boards/arm/dz60rgb/Kconfig.board | 6 ++ app/boards/arm/dz60rgb/Kconfig.defconfig | 14 +++++ app/boards/arm/dz60rgb/board.cmake | 6 ++ app/boards/arm/dz60rgb/dz60rgb_rev1.dts | 87 +++++++++++++++++++++++++++ app/boards/arm/dz60rgb/dz60rgb_rev1.yaml | 19 ++++++ app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig | 30 +++++++++ app/boards/arm/dz60rgb/keymap/keymap.overlay | 37 ++++++++++++ app/boards/arm/dz60rgb/pinmux.c | 69 +++++++++++++++++++++ 9 files changed, 277 insertions(+) create mode 100644 app/boards/arm/dz60rgb/CMakeLists.txt create mode 100644 app/boards/arm/dz60rgb/Kconfig.board create mode 100644 app/boards/arm/dz60rgb/Kconfig.defconfig create mode 100644 app/boards/arm/dz60rgb/board.cmake create mode 100644 app/boards/arm/dz60rgb/dz60rgb_rev1.dts create mode 100644 app/boards/arm/dz60rgb/dz60rgb_rev1.yaml create mode 100644 app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig create mode 100644 app/boards/arm/dz60rgb/keymap/keymap.overlay create mode 100644 app/boards/arm/dz60rgb/pinmux.c (limited to 'app/boards') diff --git a/app/boards/arm/dz60rgb/CMakeLists.txt b/app/boards/arm/dz60rgb/CMakeLists.txt new file mode 100644 index 0000000..6a0ec73 --- /dev/null +++ b/app/boards/arm/dz60rgb/CMakeLists.txt @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: MIT + +list(APPEND EXTRA_DTC_FLAGS "-qq") + +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..a96271f --- /dev/null +++ b/app/boards/arm/dz60rgb/Kconfig.board @@ -0,0 +1,6 @@ +# Copyright (c) 2020 Nick Winans +# 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..cfa71d3 --- /dev/null +++ b/app/boards/arm/dz60rgb/Kconfig.defconfig @@ -0,0 +1,14 @@ +# Planck keyboard configuration + +# Copyright (c) 2020 Nick Winans +# 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..4843c41 --- /dev/null +++ b/app/boards/arm/dz60rgb/board.cmake @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(jlink "--device=STM32F303VC" "--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..8066b5a --- /dev/null +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2020 Nick Winans + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include + +#include + +/ { + model = "DZ60RGB, Rev 1"; + compatible = "dz60rgb,rev1", "st,stm32f303"; + + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zmk,kscan = &kscan0; + }; + + 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,9) RC(4,10) RC(4,11) RC(4,12) 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 6 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.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..5a4c099 --- /dev/null +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig @@ -0,0 +1,30 @@ +# 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 +# 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 +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/keymap/keymap.overlay b/app/boards/arm/dz60rgb/keymap/keymap.overlay new file mode 100644 index 0000000..9d83adc --- /dev/null +++ b/app/boards/arm/dz60rgb/keymap/keymap.overlay @@ -0,0 +1,37 @@ +#include +#include +#include + +/ { + chosen { + zmk,keymap = &keymap0; + }; + + keymap0: keymap { + compatible = "zmk,keymap"; + label ="Default DZ60RGB Keymap"; + layers = <&default>; + }; + + layers { + compatible = "zmk,layers"; + + default: layer_0 { + label = "DEFAULT"; +// ------------------------------------------------------------------------------------------ +// | 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 + >; + }; + }; +}; diff --git a/app/boards/arm/dz60rgb/pinmux.c b/app/boards/arm/dz60rgb/pinmux.c new file mode 100644 index 0000000..5df5c90 --- /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 +#include +#include +#include +#include + +#include + +/* pin assignments for STM32F3DISCOVERY board */ +static const struct pin_config pinconf[] = { +#ifdef CONFIG_UART_1 + {STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX}, + {STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX}, +#endif /* CONFIG_UART_1 */ +#ifdef CONFIG_UART_2 + {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, + {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, +#endif /* CONFIG_UART_2 */ +#ifdef CONFIG_I2C_1 + {STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL}, + {STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA}, +#endif /* CONFIG_I2C_1 */ +#ifdef CONFIG_I2C_2 + {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL}, + {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA}, +#endif /* CONFIG_I2C_2 */ +#ifdef CONFIG_SPI_1 +#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 /* CONFIG_SPI_1 */ +#ifdef CONFIG_SPI_2 +#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 /* CONFIG_SPI_2 */ +#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 */ +#ifdef CONFIG_CAN_1 + {STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX}, + {STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX}, +#endif /* CONFIG_CAN_1 */ +}; + +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); -- cgit v1.2.3 From 45ddd4c2ae6aadfad990a688d1d7e82406f075d8 Mon Sep 17 00:00:00 2001 From: CrossR Date: Tue, 11 Aug 2020 18:07:08 +0100 Subject: Add very basic, untested, Sofle configuration. --- app/boards/shields/sofle/Kconfig.defconfig | 54 ++++++++++++++++++++++ app/boards/shields/sofle/Kconfig.shield | 8 ++++ app/boards/shields/sofle/sofle.conf | 2 + app/boards/shields/sofle/sofle.dtsi | 67 ++++++++++++++++++++++++++++ app/boards/shields/sofle/sofle.keymap | 64 ++++++++++++++++++++++++++ app/boards/shields/sofle/sofle_left.conf | 2 + app/boards/shields/sofle/sofle_left.overlay | 23 ++++++++++ app/boards/shields/sofle/sofle_right.conf | 2 + app/boards/shields/sofle/sofle_right.overlay | 26 +++++++++++ 9 files changed, 248 insertions(+) create mode 100644 app/boards/shields/sofle/Kconfig.defconfig create mode 100644 app/boards/shields/sofle/Kconfig.shield create mode 100644 app/boards/shields/sofle/sofle.conf create mode 100644 app/boards/shields/sofle/sofle.dtsi create mode 100644 app/boards/shields/sofle/sofle.keymap create mode 100644 app/boards/shields/sofle/sofle_left.conf create mode 100644 app/boards/shields/sofle/sofle_left.overlay create mode 100644 app/boards/shields/sofle/sofle_right.conf create mode 100644 app/boards/shields/sofle/sofle_right.overlay (limited to 'app/boards') diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig new file mode 100644 index 0000000..4437868 --- /dev/null +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -0,0 +1,54 @@ + +if SHIELD_SOFLE_LEFT + +config ZMK_KEYBOARD_NAME + default "Sofle Left" + +endif + +if SHIELD_SOFLE_RIGHT + +config ZMK_KEYBOARD_NAME + default "Sofle Right" + +endif + +if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LVGL_HOR_RES + default 128 + +config LVGL_VER_RES + default 32 + +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 diff --git a/app/boards/shields/sofle/Kconfig.shield b/app/boards/shields/sofle/Kconfig.shield new file mode 100644 index 0000000..d8d5d75 --- /dev/null +++ b/app/boards/shields/sofle/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: MIT + +config SHIELD_SOFLE_LEFT + def_bool $(shields_list_contains,sofle_left) + +config SHIELD_SOFLE_RIGHT + def_bool $(shields_list_contains,sofle_right) diff --git a/app/boards/shields/sofle/sofle.conf b/app/boards/shields/sofle/sofle.conf new file mode 100644 index 0000000..60c20dc --- /dev/null +++ b/app/boards/shields/sofle/sofle.conf @@ -0,0 +1,2 @@ +# Uncomment the following line to enable the Sofle OLED Display +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi new file mode 100644 index 0000000..dfa001c --- /dev/null +++ b/app/boards/shields/sofle/sofle.dtsi @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; +// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | +// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | +// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW29 | SW28 | SW27 | SW26 | SW25 | | SW25 | SW26 | SW27 | SW28 | SW29 | + 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(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(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(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(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; +}; + +&pro_micro_i2c { + status = "okay"; + + ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap new file mode 100644 index 0000000..45c20cb --- /dev/null +++ b/app/boards/shields/sofle/sofle.keymap @@ -0,0 +1,64 @@ +#include +#include + +//TODO: Is the encoder stuff needed on every single layer? + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------------------------ +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | +// | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bkspc | +// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | | N | M | , | . | / | SHIFT | +// | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | + bindings = < +&kp GRAV &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 GRAV +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BKSP +&kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT +&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT + &kp LGUI &kp LALT &kp LCTL &mo 1 &kp RET &kp SPC &mo 2 &kp RCTL &kp RALT &kp RGUI + >; + + sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; + }; + + lower_layer { +// ------------------------------------------------------------------------------------------------------------ +// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +// | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | +// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | +// | | = | - | + | { | } | | [ | ] | ; | : | \ | | +// | | | | | | | | | | | | + bindings = < +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&trans &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp F12 +&kp TAB &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp PIPE +&trans &kp EQL &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp LBKT &kp RKBT &kp SCLN &kp COLN &kp BSLH &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; + }; + + raise_layer { +// ------------------------------------------------------------------------------------------------------------ +// | | | | | | | | | | | | | | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | +// | F7 | F8 | F9 | F10 | F11 | F12 | | + | - | = | [ | ] | \ | +// | | | | | | | | | | | | + bindings = < +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&kp GRAV &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 &trans +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LARW &kp UARW &kp DARW & RARW &trans +&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp KPLS &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp BSLH + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + + sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; + }; +}; diff --git a/app/boards/shields/sofle/sofle_left.conf b/app/boards/shields/sofle/sofle_left.conf new file mode 100644 index 0000000..e51dee4 --- /dev/null +++ b/app/boards/shields/sofle/sofle_left.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file diff --git a/app/boards/shields/sofle/sofle_left.overlay b/app/boards/shields/sofle/sofle_left.overlay new file mode 100644 index 0000000..bcfb558 --- /dev/null +++ b/app/boards/shields/sofle/sofle_left.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "sofle.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + ; +}; + +&left_encoder { + status = "okay"; +}; + diff --git a/app/boards/shields/sofle/sofle_right.conf b/app/boards/shields/sofle/sofle_right.conf new file mode 100644 index 0000000..990cf7c --- /dev/null +++ b/app/boards/shields/sofle/sofle_right.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y diff --git a/app/boards/shields/sofle/sofle_right.overlay b/app/boards/shields/sofle/sofle_right.overlay new file mode 100644 index 0000000..133f926 --- /dev/null +++ b/app/boards/shields/sofle/sofle_right.overlay @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "sofle.dtsi" + +&default_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios + = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + ; +}; + +&right_encoder { + status = "okay"; +}; -- cgit v1.2.3 From 3e264e46d4c53ed7198731fcdfefc74396b48f1a Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 15 Aug 2020 16:01:35 -0400 Subject: Add splitreus62 shield --- app/boards/shields/splitreus62/Kconfig.defconfig | 54 ++++++++++++++++++++++ app/boards/shields/splitreus62/Kconfig.shield | 8 ++++ app/boards/shields/splitreus62/splitreus62.conf | 2 + app/boards/shields/splitreus62/splitreus62.dtsi | 50 ++++++++++++++++++++ app/boards/shields/splitreus62/splitreus62.keymap | 25 ++++++++++ .../shields/splitreus62/splitreus62_left.conf | 2 + .../shields/splitreus62/splitreus62_left.overlay | 19 ++++++++ .../shields/splitreus62/splitreus62_right.conf | 3 ++ .../shields/splitreus62/splitreus62_right.overlay | 22 +++++++++ 9 files changed, 185 insertions(+) create mode 100644 app/boards/shields/splitreus62/Kconfig.defconfig create mode 100644 app/boards/shields/splitreus62/Kconfig.shield create mode 100644 app/boards/shields/splitreus62/splitreus62.conf create mode 100644 app/boards/shields/splitreus62/splitreus62.dtsi create mode 100644 app/boards/shields/splitreus62/splitreus62.keymap create mode 100644 app/boards/shields/splitreus62/splitreus62_left.conf create mode 100644 app/boards/shields/splitreus62/splitreus62_left.overlay create mode 100644 app/boards/shields/splitreus62/splitreus62_right.conf create mode 100644 app/boards/shields/splitreus62/splitreus62_right.overlay (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig new file mode 100644 index 0000000..c52752a --- /dev/null +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -0,0 +1,54 @@ + +if SHIELD_SPLITREUS62_LEFT + +config ZMK_KEYBOARD_NAME + default "Splitreus62 Left" + +endif + +if SHIELD_SPLITREUS62_RIGHT + +config ZMK_KEYBOARD_NAME + default "Splitreus62 Right" + +endif + +if SHIELD_SPLITREUS62_LEFT || SHIELD_SPLITREUS62_RIGHT + +if ZMK_DISPLAY + +config I2C + default n + +config SSD1306 + default n + +config SSD1306_REVERSE_MODE + default n + +endif # ZMK_DISPLAY + +if LVGL + +config LVGL_HOR_RES + default 128 + +config LVGL_VER_RES + default 32 + +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 diff --git a/app/boards/shields/splitreus62/Kconfig.shield b/app/boards/shields/splitreus62/Kconfig.shield new file mode 100644 index 0000000..f20f236 --- /dev/null +++ b/app/boards/shields/splitreus62/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: MIT + +config SHIELD_SPLITREUS62_LEFT + def_bool $(shields_list_contains,splitreus62_left) + +config SHIELD_SPLITREUS62_RIGHT + def_bool $(shields_list_contains,splitreus62_right) diff --git a/app/boards/shields/splitreus62/splitreus62.conf b/app/boards/shields/splitreus62/splitreus62.conf new file mode 100644 index 0000000..73f0d9d --- /dev/null +++ b/app/boards/shields/splitreus62/splitreus62.conf @@ -0,0 +1,2 @@ +# Uncomment the following line to enable the Lily58 OLED Display +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/splitreus62/splitreus62.dtsi b/app/boards/shields/splitreus62/splitreus62.dtsi new file mode 100644 index 0000000..e1fb40b --- /dev/null +++ b/app/boards/shields/splitreus62/splitreus62.dtsi @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020 Pete Johanson, Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <6>; +// | SW0 | SW5 | SW10 | SW15 | SW20 | SW25 | SW25 | SW20 | SW15 | SW10 | SW5 | SW1 | +// | SW1 | SW6 | SW11 | SW16 | SW21 | SW26 | SW26 | SW21 | SW16 | SW11 | SW6 | SW2 | +// | SW2 | SW7 | SW12 | SW17 | SW22 | SW27 | SW27 | SW22 | SW17 | SW12 | SW7 | SW3 | +// | SW3 | SW8 | SW13 | SW18 | SW23 | SW28 | SW28 | SW23 | SW18 | SW13 | SW8 | SW4 | +// | SW4 | SW9 | SW14 | SW19 | SW24 | SW29 | SW29 | SW24 | SW19 | SW14 | SW9 | SW5 | +// SW30 | SW30 + 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(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(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(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(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) + RC(5,5) RC(5,6) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "row2col"; + row-gpios + = <&pro_micro_d 1 GPIO_ACTIVE_HIGH > + , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 2 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 4 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 6 GPIO_ACTIVE_HIGH> + ; + + }; +}; diff --git a/app/boards/shields/splitreus62/splitreus62.keymap b/app/boards/shields/splitreus62/splitreus62.keymap new file mode 100644 index 0000000..cd683a2 --- /dev/null +++ b/app/boards/shields/splitreus62/splitreus62.keymap @@ -0,0 +1,25 @@ +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------------------------ +// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +// | TAB | Q | W | E | R | T | | Y | U | I | O | P | \ | +// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | | N | M | , | . | / | SHIFT | +// | LCTL | LGUI | LALT | GRAV | | EQL | DEL | BKSP| | RET | SPC | LBKT | RBKT | LBKT | HOME | END | + 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 TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH +&kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT +&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT +&kp LCTL &kp LGUI &kp LALT &kp GRAV &kp EQL &kp DEL &kp SPC &kp LBKT &kp RBKT &kp MINUS &kp HOME &kp END + &kp BKSP &kp RET + >; + }; + }; +}; diff --git a/app/boards/shields/splitreus62/splitreus62_left.conf b/app/boards/shields/splitreus62/splitreus62_left.conf new file mode 100644 index 0000000..a835adc --- /dev/null +++ b/app/boards/shields/splitreus62/splitreus62_left.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y \ No newline at end of file diff --git a/app/boards/shields/splitreus62/splitreus62_left.overlay b/app/boards/shields/splitreus62/splitreus62_left.overlay new file mode 100644 index 0000000..aea374a --- /dev/null +++ b/app/boards/shields/splitreus62/splitreus62_left.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "splitreus62.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; + diff --git a/app/boards/shields/splitreus62/splitreus62_right.conf b/app/boards/shields/splitreus62/splitreus62_right.conf new file mode 100644 index 0000000..ab43d04 --- /dev/null +++ b/app/boards/shields/splitreus62/splitreus62_right.conf @@ -0,0 +1,3 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y +#CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y diff --git a/app/boards/shields/splitreus62/splitreus62_right.overlay b/app/boards/shields/splitreus62/splitreus62_right.overlay new file mode 100644 index 0000000..3c0f989 --- /dev/null +++ b/app/boards/shields/splitreus62/splitreus62_right.overlay @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "splitreus62.dtsi" + +&default_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios + = <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; \ No newline at end of file -- cgit v1.2.3 From bb5eb51df743bd1c56c814c62f10d022c388df67 Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 15 Aug 2020 16:11:18 -0400 Subject: Updated comment and removed display flag --- app/boards/shields/splitreus62/splitreus62.conf | 2 -- app/boards/shields/splitreus62/splitreus62_right.conf | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/splitreus62.conf b/app/boards/shields/splitreus62/splitreus62.conf index 73f0d9d..e69de29 100644 --- a/app/boards/shields/splitreus62/splitreus62.conf +++ b/app/boards/shields/splitreus62/splitreus62.conf @@ -1,2 +0,0 @@ -# Uncomment the following line to enable the Lily58 OLED Display -# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/splitreus62/splitreus62_right.conf b/app/boards/shields/splitreus62/splitreus62_right.conf index ab43d04..e51dee4 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.conf +++ b/app/boards/shields/splitreus62/splitreus62_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -#CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file -- cgit v1.2.3 From 1fa993fca22860d4706364e72116ffd154d01bac Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 15 Aug 2020 16:21:54 -0400 Subject: Update app/boards/shields/splitreus62/splitreus62_right.overlay Co-authored-by: Nick Winans --- app/boards/shields/splitreus62/splitreus62_right.overlay | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/splitreus62_right.overlay b/app/boards/shields/splitreus62/splitreus62_right.overlay index 3c0f989..35375cc 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.overlay +++ b/app/boards/shields/splitreus62/splitreus62_right.overlay @@ -15,8 +15,8 @@ = <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; -}; \ No newline at end of file +}; -- cgit v1.2.3 From ba136eb9eed862aefe2cacd83f24194c62a00459 Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 15 Aug 2020 16:22:00 -0400 Subject: Update app/boards/shields/splitreus62/splitreus62_left.overlay Co-authored-by: Nick Winans --- app/boards/shields/splitreus62/splitreus62_left.overlay | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/splitreus62_left.overlay b/app/boards/shields/splitreus62/splitreus62_left.overlay index aea374a..7210ca4 100644 --- a/app/boards/shields/splitreus62/splitreus62_left.overlay +++ b/app/boards/shields/splitreus62/splitreus62_left.overlay @@ -10,10 +10,9 @@ col-gpios = <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; - -- cgit v1.2.3 From caecce62b7805e7fa3db814f2eb1616ba3661262 Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 15 Aug 2020 16:32:14 -0400 Subject: Drop OLED support. --- app/boards/shields/splitreus62/Kconfig.defconfig | 36 ------------------------ 1 file changed, 36 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index c52752a..1f5b324 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -15,40 +15,4 @@ endif if SHIELD_SPLITREUS62_LEFT || SHIELD_SPLITREUS62_RIGHT -if ZMK_DISPLAY - -config I2C - default n - -config SSD1306 - default n - -config SSD1306_REVERSE_MODE - default n - -endif # ZMK_DISPLAY - -if LVGL - -config LVGL_HOR_RES - default 128 - -config LVGL_VER_RES - default 32 - -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 -- cgit v1.2.3 From 892394d9e6b795f3f7c60e5e4d433760b5fc64ed Mon Sep 17 00:00:00 2001 From: CrossR Date: Sun, 16 Aug 2020 12:44:18 +0100 Subject: Update to include missing encoder config. --- app/boards/shields/sofle/Kconfig.defconfig | 2 -- app/boards/shields/sofle/sofle.conf | 4 ++++ app/boards/shields/sofle/sofle.dtsi | 25 ++++++++++++++++++++++++- 3 files changed, 28 insertions(+), 3 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 4437868..2ccf147 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -3,14 +3,12 @@ if SHIELD_SOFLE_LEFT config ZMK_KEYBOARD_NAME default "Sofle Left" - endif if SHIELD_SOFLE_RIGHT config ZMK_KEYBOARD_NAME default "Sofle Right" - endif if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT diff --git a/app/boards/shields/sofle/sofle.conf b/app/boards/shields/sofle/sofle.conf index 60c20dc..2194add 100644 --- a/app/boards/shields/sofle/sofle.conf +++ b/app/boards/shields/sofle/sofle.conf @@ -1,2 +1,6 @@ # Uncomment the following line to enable the Sofle OLED Display # CONFIG_ZMK_DISPLAY=y + +# Uncomment these two lines to add support for encoders +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index dfa001c..cfd7a95 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -42,7 +42,30 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; + + // TODO: Check these pins! + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + + right_encoder: encoder_right { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + a-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; }; }; -- cgit v1.2.3 From eff6934066e0d898c6dcf3e450d6381073d2bdef Mon Sep 17 00:00:00 2001 From: CrossR Date: Sun, 16 Aug 2020 19:15:47 +0100 Subject: Update pins. --- app/boards/shields/sofle/sofle.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index cfd7a95..4c220a2 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -44,22 +44,23 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) ; }; - // TODO: Check these pins! + // TODO: Check these pins and resolution! + left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + a-gpios = <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <2>; status = "disabled"; }; right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <2>; status = "disabled"; }; -- cgit v1.2.3 From aa187a54d475b6ac6fe8c78f9365332465ed3029 Mon Sep 17 00:00:00 2001 From: CrossR Date: Wed, 19 Aug 2020 20:18:27 +0100 Subject: Fix keymap. --- app/boards/shields/sofle/sofle.dtsi | 18 +++++------ app/boards/shields/sofle/sofle.keymap | 56 +++++++++++++++++------------------ 2 files changed, 36 insertions(+), 38 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 4c220a2..d6f29d3 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -19,14 +19,14 @@ // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | -// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | -// | SW29 | SW28 | SW27 | SW26 | SW25 | | SW25 | SW26 | SW27 | SW28 | SW29 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW30 | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | SW30 | 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(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(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(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(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) +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(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(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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) >; }; @@ -49,7 +49,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <2>; status = "disabled"; @@ -59,7 +59,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) compatible = "alps,ec11"; label = "RIGHT_ENCODER"; a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <2>; status = "disabled"; }; diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index 45c20cb..02f4560 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -1,25 +1,23 @@ #include #include -//TODO: Is the encoder stuff needed on every single layer? - / { keymap { compatible = "zmk,keymap"; default_layer { // ------------------------------------------------------------------------------------------------------------ -// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | -// | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bkspc | -// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | | N | M | , | . | / | SHIFT | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC | +// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT | // | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | bindings = < -&kp GRAV &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 GRAV -&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BKSP -&kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT -&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT - &kp LGUI &kp LALT &kp LCTL &mo 1 &kp RET &kp SPC &mo 2 &kp RCTL &kp RALT &kp RGUI +&kp GRAV &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 &none +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BKSP +&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT +&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp M_MUTE &none &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT + &kp LGUI &kp LALT &kp LCTL &mo 1 &kp RET &kp SPC &mo 2 &kp RCTL &kp RALT &kp RGUI >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; @@ -28,16 +26,16 @@ lower_layer { // ------------------------------------------------------------------------------------------------------------ // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -// | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | -// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | -// | | = | - | + | { | } | | [ | ] | ; | : | \ | | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | +// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | +// | | = | - | + | { | } | | | | [ | ] | ; | : | \ | | // | | | | | | | | | | | | bindings = < -&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&trans &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp F12 -&kp TAB &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp PIPE -&trans &kp EQL &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp LBKT &kp RKBT &kp SCLN &kp COLN &kp BSLH &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&kp GRAV &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp F12 +&trans &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp PIPE +&trans &kp EQL &kp MINUS &kp KPLS &kp LCUR &kp RCUR &trans &trans &kp LBKT &kp RKBT &kp SCLN &kp COLN &kp BSLH &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; @@ -45,17 +43,17 @@ raise_layer { // ------------------------------------------------------------------------------------------------------------ -// | | | | | | | | | | | | | | -// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | -// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | -// | F7 | F8 | F9 | F10 | F11 | F12 | | + | - | = | [ | ] | \ | -// | | | | | | | | | | | | +// | | | | | | | | | | | | | | +// | | INS | PSCR | GUI | | | | PGUP | | ^ | | | | +// | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC | +// | | UNDO | CUT | COPY | PASTE | | | | | | | | | | | +// | | | | | | | | | | | | bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&kp GRAV &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 &trans -&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LARW &kp UARW &kp DARW & RARW &trans -&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp KPLS &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp BSLH - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &kp INS &kp PRSC &kp GUI &trans &trans &kp PGUP &trans &kp UARW &trans &kp NUM_0 &trans +&trans &kp LALT &kp LCTL &kp LSFT &trans &kp CLCK &kp PGDN &kp LARW &kp DARW &kp RARW &kp DEL &kp BKSP +&trans &kp 0x7A &kp 0x7B &kp 0x7C &kp 0x7D &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; }; -- cgit v1.2.3 From dcd36f12e049ee2c423204ebaaa3c16062d9fd5e Mon Sep 17 00:00:00 2001 From: CrossR Date: Wed, 19 Aug 2020 20:53:22 +0100 Subject: Add BT clear bind. Should check the positions are correct. --- app/boards/shields/sofle/sofle.dtsi | 122 ++++++++++++++------------- app/boards/shields/sofle/sofle_left.conf | 3 +- app/boards/shields/sofle/sofle_left.overlay | 3 + app/boards/shields/sofle/sofle_right.conf | 1 + app/boards/shields/sofle/sofle_right.overlay | 4 + 5 files changed, 72 insertions(+), 61 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index d6f29d3..1a5ea84 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -7,85 +7,87 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | // | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | // | SW30 | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | SW30 | - map = < + 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(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(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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; - // TODO: Check these pins and resolution! + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <2>; + status = "disabled"; + }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; - status = "disabled"; - }; + right_encoder: encoder_right { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <2>; + status = "disabled"; + }; - right_encoder: encoder_right { - compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; - status = "disabled"; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; + bt_unpair_combo: bt_unpair_combo { + compatible = "zmk,bt-unpair-combo"; + }; }; &pro_micro_i2c { - status = "okay"; + status = "okay"; - ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - label = "DISPLAY"; - width = <128>; - height = <32>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <31>; - segment-remap; - com-invdir; - com-sequential; - prechargep = <0x22>; - }; + ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; }; diff --git a/app/boards/shields/sofle/sofle_left.conf b/app/boards/shields/sofle/sofle_left.conf index e51dee4..d2d1e3c 100644 --- a/app/boards/shields/sofle/sofle_left.conf +++ b/app/boards/shields/sofle/sofle_left.conf @@ -1,2 +1,3 @@ CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y +CONFIG_ZMK_BLE_UNPAIR_COMBO=y diff --git a/app/boards/shields/sofle/sofle_left.overlay b/app/boards/shields/sofle/sofle_left.overlay index bcfb558..f6719dd 100644 --- a/app/boards/shields/sofle/sofle_left.overlay +++ b/app/boards/shields/sofle/sofle_left.overlay @@ -21,3 +21,6 @@ status = "okay"; }; +&bt_unpair_combo { + key-positions = <0 52>; +}; diff --git a/app/boards/shields/sofle/sofle_right.conf b/app/boards/shields/sofle/sofle_right.conf index 990cf7c..cf16779 100644 --- a/app/boards/shields/sofle/sofle_right.conf +++ b/app/boards/shields/sofle/sofle_right.conf @@ -1,2 +1,3 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y +CONFIG_ZMK_BLE_UNPAIR_COMBO=y diff --git a/app/boards/shields/sofle/sofle_right.overlay b/app/boards/shields/sofle/sofle_right.overlay index 133f926..ee1a606 100644 --- a/app/boards/shields/sofle/sofle_right.overlay +++ b/app/boards/shields/sofle/sofle_right.overlay @@ -24,3 +24,7 @@ &right_encoder { status = "okay"; }; + +&bt_unpair_combo { + key-positions = <11 55>; +}; -- cgit v1.2.3 From 0d7bf03158b6c49c6db65732dd086820bc4fc64b Mon Sep 17 00:00:00 2001 From: CrossR Date: Wed, 19 Aug 2020 21:52:31 +0100 Subject: Fix BT unpair combo. --- app/boards/shields/sofle/sofle_left.overlay | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle_left.overlay b/app/boards/shields/sofle/sofle_left.overlay index f6719dd..9dfe52d 100644 --- a/app/boards/shields/sofle/sofle_left.overlay +++ b/app/boards/shields/sofle/sofle_left.overlay @@ -22,5 +22,5 @@ }; &bt_unpair_combo { - key-positions = <0 52>; + key-positions = <0 54>; }; -- cgit v1.2.3 From a65b746a863bbd8e07cf404b4249526f75b069a3 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 19 Aug 2020 23:34:34 -0400 Subject: fix(bluetooth): Add unpair combo if DT node exists --- app/boards/shields/corne/corne_left.conf | 1 - app/boards/shields/corne/corne_right.conf | 1 - app/boards/shields/kyria/kyria_left.conf | 3 +-- app/boards/shields/kyria/kyria_right.conf | 1 - app/boards/shields/lily58/lily58_left.conf | 1 - app/boards/shields/lily58/lily58_right.conf | 1 - 6 files changed, 1 insertion(+), 7 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/corne/corne_left.conf b/app/boards/shields/corne/corne_left.conf index 338fa59..1e028a7 100644 --- a/app/boards/shields/corne/corne_left.conf +++ b/app/boards/shields/corne/corne_left.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/corne/corne_right.conf b/app/boards/shields/corne/corne_right.conf index be344c4..990cf7c 100644 --- a/app/boards/shields/corne/corne_right.conf +++ b/app/boards/shields/corne/corne_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/kyria/kyria_left.conf b/app/boards/shields/kyria/kyria_left.conf index 338fa59..e51dee4 100644 --- a/app/boards/shields/kyria/kyria_left.conf +++ b/app/boards/shields/kyria/kyria_left.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file diff --git a/app/boards/shields/kyria/kyria_right.conf b/app/boards/shields/kyria/kyria_right.conf index be344c4..990cf7c 100644 --- a/app/boards/shields/kyria/kyria_right.conf +++ b/app/boards/shields/kyria/kyria_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/lily58/lily58_left.conf b/app/boards/shields/lily58/lily58_left.conf index 338fa59..1e028a7 100644 --- a/app/boards/shields/lily58/lily58_left.conf +++ b/app/boards/shields/lily58/lily58_left.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/lily58/lily58_right.conf b/app/boards/shields/lily58/lily58_right.conf index cf16779..990cf7c 100644 --- a/app/boards/shields/lily58/lily58_right.conf +++ b/app/boards/shields/lily58/lily58_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y -- cgit v1.2.3 From 4efce4223ae38306a254b11db628d782f1d7f382 Mon Sep 17 00:00:00 2001 From: Mega Mind <68985133+megamind4089@users.noreply.github.com> Date: Thu, 20 Aug 2020 18:59:41 +0800 Subject: Use correct macro for board --- app/boards/arm/nrfmicro/pinmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c index 803d20d..c02ca92 100644 --- a/app/boards/arm/nrfmicro/pinmux.c +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -17,7 +17,7 @@ static int pinmux_nrfmicro_init(struct device *port) struct device *p1 = device_get_binding("GPIO_1"); -#if defined(BOARD_NRFMICRO_13) +#if CONFIG_BOARD_NRFMICRO_13 struct device *p0 = device_get_binding("GPIO_0"); // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) gpio_pin_configure(p1, 9, GPIO_OUTPUT); @@ -34,4 +34,4 @@ static int pinmux_nrfmicro_init(struct device *port) return 0; } -SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); \ No newline at end of file +SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); -- cgit v1.2.3 From 7aea57328c1f48e95de2013843e8947c1eb0e752 Mon Sep 17 00:00:00 2001 From: Mega Mind <68985133+megamind4089@users.noreply.github.com> Date: Fri, 21 Aug 2020 03:12:06 +0800 Subject: Add KConfig for board battery charger --- app/boards/arm/nrfmicro/Kconfig | 5 +++++ app/boards/arm/nrfmicro/Kconfig.defconfig | 9 ++++++++- app/boards/arm/nrfmicro/pinmux.c | 6 +++++- 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/arm/nrfmicro/Kconfig b/app/boards/arm/nrfmicro/Kconfig index 17a3347..80039e9 100644 --- a/app/boards/arm/nrfmicro/Kconfig +++ b/app/boards/arm/nrfmicro/Kconfig @@ -3,3 +3,8 @@ config BOARD_ENABLE_DCDC select SOC_DCDC_NRF52X default y depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13) + +config BOARD_ENABLE_CHARGER + bool "Enable battery charger" + default y + depends on (BOARD_NRFMICRO_13) diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig index 2212277..69b59ee 100644 --- a/app/boards/arm/nrfmicro/Kconfig.defconfig +++ b/app/boards/arm/nrfmicro/Kconfig.defconfig @@ -29,5 +29,12 @@ config ZMK_USB config PINMUX default y - + +if BOARD_NRFMICRO_13 + +config BOARD_ENABLE_CHARGER + default y + +endif # BOARD_NRFMICRO_13 + endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c index c02ca92..be1a4de 100644 --- a/app/boards/arm/nrfmicro/pinmux.c +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -23,9 +23,13 @@ static int pinmux_nrfmicro_init(struct device *port) gpio_pin_configure(p1, 9, GPIO_OUTPUT); gpio_pin_set(p1, 9, 0); - // enable charger (nRFMicro 1.3 only) +#if CONFIG_BOARD_ENABLE_CHARGER gpio_pin_configure(p0, 5, GPIO_OUTPUT); gpio_pin_set(p0, 5, 0); +#else + gpio_pin_configure(p0, 5, GPIO_INPUT); +#endif + #else // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) gpio_pin_configure(p1, 9, GPIO_OUTPUT); -- cgit v1.2.3 From 94c7d27f04263b42669ae6d1777765ba811ed6bf Mon Sep 17 00:00:00 2001 From: Derek Date: Thu, 20 Aug 2020 15:13:51 -0400 Subject: Updated files as per request Updated --- app/boards/shields/splitreus62/Kconfig.defconfig | 7 ++++++- app/boards/shields/splitreus62/Kconfig.shield | 2 +- app/boards/shields/splitreus62/splitreus62.dtsi | 2 +- app/boards/shields/splitreus62/splitreus62.keymap | 6 ++++++ app/boards/shields/splitreus62/splitreus62_left.overlay | 2 +- app/boards/shields/splitreus62/splitreus62_right.overlay | 4 ++-- 6 files changed, 17 insertions(+), 6 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 1f5b324..6e35b06 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -1,4 +1,9 @@ - +/* + * Copyright (c) 2020 Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + if SHIELD_SPLITREUS62_LEFT config ZMK_KEYBOARD_NAME diff --git a/app/boards/shields/splitreus62/Kconfig.shield b/app/boards/shields/splitreus62/Kconfig.shield index f20f236..762d991 100644 --- a/app/boards/shields/splitreus62/Kconfig.shield +++ b/app/boards/shields/splitreus62/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Pete Johanson +# Copyright (c) 2020 Derek Schmell # SPDX-License-Identifier: MIT config SHIELD_SPLITREUS62_LEFT diff --git a/app/boards/shields/splitreus62/splitreus62.dtsi b/app/boards/shields/splitreus62/splitreus62.dtsi index e1fb40b..c2bfbc4 100644 --- a/app/boards/shields/splitreus62/splitreus62.dtsi +++ b/app/boards/shields/splitreus62/splitreus62.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johanson, Derek Schmell + * Copyright (c) 2020 Derek Schmell * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/splitreus62/splitreus62.keymap b/app/boards/shields/splitreus62/splitreus62.keymap index cd683a2..920e61a 100644 --- a/app/boards/shields/splitreus62/splitreus62.keymap +++ b/app/boards/shields/splitreus62/splitreus62.keymap @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2020 Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + #include #include diff --git a/app/boards/shields/splitreus62/splitreus62_left.overlay b/app/boards/shields/splitreus62/splitreus62_left.overlay index 7210ca4..b156d60 100644 --- a/app/boards/shields/splitreus62/splitreus62_left.overlay +++ b/app/boards/shields/splitreus62/splitreus62_left.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2020 Derek Schmell * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/splitreus62/splitreus62_right.overlay b/app/boards/shields/splitreus62/splitreus62_right.overlay index 35375cc..5db87cc 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.overlay +++ b/app/boards/shields/splitreus62/splitreus62_right.overlay @@ -1,9 +1,9 @@ /* - * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2020 Derek Schmell * * SPDX-License-Identifier: MIT */ - + #include "splitreus62.dtsi" &default_transform { -- cgit v1.2.3 From 3b71c4311bae62c2e14b028324f831837742d1f5 Mon Sep 17 00:00:00 2001 From: Derek Date: Thu, 20 Aug 2020 17:27:41 -0400 Subject: Update Kconfig.defconfig --- app/boards/shields/splitreus62/Kconfig.defconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 6e35b06..a2464a7 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -1,8 +1,7 @@ -/* - * Copyright (c) 2020 Derek Schmell - * - * SPDX-License-Identifier: MIT - */ + +#Copyright (c) 2020 Derek Schmell +#SPDX-License-Identifier: MIT + if SHIELD_SPLITREUS62_LEFT -- cgit v1.2.3 From d4e8312db6766b8fb4c8b76e14a4be9225d918a7 Mon Sep 17 00:00:00 2001 From: CrossR Date: Fri, 21 Aug 2020 17:08:43 +0100 Subject: Mute is a consumer keypress. --- app/boards/shields/sofle/sofle.keymap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index 02f4560..1d7dab0 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -16,7 +16,7 @@ &kp GRAV &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 &none &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BKSP &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT -&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp M_MUTE &none &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT +&kp LSFT &kp Z &kp X &kp C &kp V &kp B &cp M_MUTE &none &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT &kp LGUI &kp LALT &kp LCTL &mo 1 &kp RET &kp SPC &mo 2 &kp RCTL &kp RALT &kp RGUI >; -- cgit v1.2.3 From 5c29259fedc4a0265064afc0bc141e6bf33425f2 Mon Sep 17 00:00:00 2001 From: CrossR Date: Fri, 21 Aug 2020 17:10:29 +0100 Subject: Remove unpair combo config option. --- app/boards/shields/sofle/sofle_left.conf | 1 - app/boards/shields/sofle/sofle_right.conf | 1 - 2 files changed, 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle_left.conf b/app/boards/shields/sofle/sofle_left.conf index d2d1e3c..1e028a7 100644 --- a/app/boards/shields/sofle/sofle_left.conf +++ b/app/boards/shields/sofle/sofle_left.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y diff --git a/app/boards/shields/sofle/sofle_right.conf b/app/boards/shields/sofle/sofle_right.conf index cf16779..990cf7c 100644 --- a/app/boards/shields/sofle/sofle_right.conf +++ b/app/boards/shields/sofle/sofle_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y -- cgit v1.2.3 From d848034c81ff3dea95a6ca98c0b05c76971647eb Mon Sep 17 00:00:00 2001 From: CrossR Date: Fri, 21 Aug 2020 22:15:27 +0100 Subject: Add keycodes properly. --- app/boards/shields/sofle/sofle.keymap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index 1d7dab0..f3b276b 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -52,7 +52,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp INS &kp PRSC &kp GUI &trans &trans &kp PGUP &trans &kp UARW &trans &kp NUM_0 &trans &trans &kp LALT &kp LCTL &kp LSFT &trans &kp CLCK &kp PGDN &kp LARW &kp DARW &kp RARW &kp DEL &kp BKSP -&trans &kp 0x7A &kp 0x7B &kp 0x7C &kp 0x7D &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &kp UNDO &kp CUT &kp COPY &kp PSTE &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; }; -- cgit v1.2.3 From 39fd98236763bd325059ec0d775bad08babcd332 Mon Sep 17 00:00:00 2001 From: Derek Date: Fri, 21 Aug 2020 17:29:18 -0400 Subject: Swap central back to left hand --- app/boards/shields/splitreus62/splitreus62_left.conf | 2 +- app/boards/shields/splitreus62/splitreus62_right.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/splitreus62/splitreus62_left.conf b/app/boards/shields/splitreus62/splitreus62_left.conf index a835adc..e51dee4 100644 --- a/app/boards/shields/splitreus62/splitreus62_left.conf +++ b/app/boards/shields/splitreus62/splitreus62_left.conf @@ -1,2 +1,2 @@ CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y \ No newline at end of file +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file diff --git a/app/boards/shields/splitreus62/splitreus62_right.conf b/app/boards/shields/splitreus62/splitreus62_right.conf index e51dee4..a835adc 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.conf +++ b/app/boards/shields/splitreus62/splitreus62_right.conf @@ -1,2 +1,2 @@ CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file +CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y \ No newline at end of file -- cgit v1.2.3 From 796b2dddd98cceae8b6243e61b7c1869929ede8a Mon Sep 17 00:00:00 2001 From: CrossR Date: Fri, 21 Aug 2020 22:41:57 +0100 Subject: Remove erroneous key. --- app/boards/shields/sofle/sofle.keymap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index f3b276b..b3bf74e 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -35,7 +35,7 @@ &kp GRAV &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp F12 &trans &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp PIPE &trans &kp EQL &kp MINUS &kp KPLS &kp LCUR &kp RCUR &trans &trans &kp LBKT &kp RKBT &kp SCLN &kp COLN &kp BSLH &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; @@ -55,8 +55,8 @@ &trans &kp UNDO &kp CUT &kp COPY &kp PSTE &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - }; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; + }; }; }; -- cgit v1.2.3 From c84516bfcfa7e578bd7d30ab6426550b6834ab2d Mon Sep 17 00:00:00 2001 From: CrossR Date: Sat, 22 Aug 2020 09:51:01 +0100 Subject: Fix PR issues. --- app/boards/shields/sofle/Kconfig.shield | 2 +- app/boards/shields/sofle/sofle.dtsi | 2 +- app/boards/shields/sofle/sofle.keymap | 11 ++++++----- app/boards/shields/sofle/sofle_left.overlay | 2 +- app/boards/shields/sofle/sofle_right.overlay | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/Kconfig.shield b/app/boards/shields/sofle/Kconfig.shield index d8d5d75..e23a97a 100644 --- a/app/boards/shields/sofle/Kconfig.shield +++ b/app/boards/shields/sofle/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Pete Johanson +# Copyright (c) 2020 Ryan Cross # SPDX-License-Identifier: MIT config SHIELD_SOFLE_LEFT diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 1a5ea84..9b3d3c0 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2020 Pete Johanson, Ryan Cross * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index b3bf74e..aadffa1 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -24,6 +24,7 @@ }; lower_layer { +// TODO: Some binds are waiting for shifted keycode support. // ------------------------------------------------------------------------------------------------------------ // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | @@ -31,11 +32,11 @@ // | | = | - | + | { | } | | | | [ | ] | ; | : | \ | | // | | | | | | | | | | | | bindings = < -&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&kp GRAV &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp F12 -&trans &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp PIPE -&trans &kp EQL &kp MINUS &kp KPLS &kp LCUR &kp RCUR &trans &trans &kp LBKT &kp RKBT &kp SCLN &kp COLN &kp BSLH &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&kp GRAV &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 F12 +&trans &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp PIPE +&trans &kp EQL &kp MINUS &kp KPLS &kp LCUR &kp RCUR &trans &trans &kp LBKT &kp RBKT &kp SCLN &kp COLN &kp BSLH &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; diff --git a/app/boards/shields/sofle/sofle_left.overlay b/app/boards/shields/sofle/sofle_left.overlay index 9dfe52d..0dfb753 100644 --- a/app/boards/shields/sofle/sofle_left.overlay +++ b/app/boards/shields/sofle/sofle_left.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2020 Ryan Cross * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle/sofle_right.overlay b/app/boards/shields/sofle/sofle_right.overlay index ee1a606..8eaf076 100644 --- a/app/boards/shields/sofle/sofle_right.overlay +++ b/app/boards/shields/sofle/sofle_right.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2020 Ryan Cross * * SPDX-License-Identifier: MIT */ -- cgit v1.2.3 From a0a4b8a2f5abf9e393c1d35e794b2c2e8c0e7abc Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sat, 22 Aug 2020 21:47:29 +0100 Subject: Romac (#1) * New shield: romac 2.1 --- app/boards/shields/romac/Kconfig.defconfig | 8 ++++ app/boards/shields/romac/Kconfig.shield | 5 +++ app/boards/shields/romac/boards/nice_nano.overlay | 10 +++++ app/boards/shields/romac/romac.conf | 2 + app/boards/shields/romac/romac.dtsi | 50 +++++++++++++++++++++++ app/boards/shields/romac/romac.keymap | 40 ++++++++++++++++++ app/boards/shields/romac/romac.overlay | 19 +++++++++ 7 files changed, 134 insertions(+) create mode 100644 app/boards/shields/romac/Kconfig.defconfig create mode 100644 app/boards/shields/romac/Kconfig.shield create mode 100644 app/boards/shields/romac/boards/nice_nano.overlay create mode 100644 app/boards/shields/romac/romac.conf create mode 100644 app/boards/shields/romac/romac.dtsi create mode 100644 app/boards/shields/romac/romac.keymap create mode 100644 app/boards/shields/romac/romac.overlay (limited to 'app/boards') diff --git a/app/boards/shields/romac/Kconfig.defconfig b/app/boards/shields/romac/Kconfig.defconfig new file mode 100644 index 0000000..da50e5c --- /dev/null +++ b/app/boards/shields/romac/Kconfig.defconfig @@ -0,0 +1,8 @@ + +if SHIELD_ROMAC + +config ZMK_KEYBOARD_NAME + default "romac" + +endif + diff --git a/app/boards/shields/romac/Kconfig.shield b/app/boards/shields/romac/Kconfig.shield new file mode 100644 index 0000000..a081728 --- /dev/null +++ b/app/boards/shields/romac/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2020 Pete Johansen, Richard Jones +# SPDX-License-Identifier: MIT + +config SHIELD_ROMAC + def_bool $(shields_list_contains,romac) diff --git a/app/boards/shields/romac/boards/nice_nano.overlay b/app/boards/shields/romac/boards/nice_nano.overlay new file mode 100644 index 0000000..1f246d3 --- /dev/null +++ b/app/boards/shields/romac/boards/nice_nano.overlay @@ -0,0 +1,10 @@ +&spi1 { + compatible = "nordic,nrf-spi"; + /* Cannot be used together with i2c0. */ + status = "okay"; + sck-pin = <5>; + mosi-pin = <6>; + miso-pin = <7>; + +}; + diff --git a/app/boards/shields/romac/romac.conf b/app/boards/shields/romac/romac.conf new file mode 100644 index 0000000..5b40fdf --- /dev/null +++ b/app/boards/shields/romac/romac.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_RGB_UNDERGLOW=n +CONFIG_WS2812_STRIP=n diff --git a/app/boards/shields/romac/romac.dtsi b/app/boards/shields/romac/romac.dtsi new file mode 100644 index 0000000..db9685f --- /dev/null +++ b/app/boards/shields/romac/romac.dtsi @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020 Pete Johansen, Richard Jones + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <3>; + rows = <4>; +// | SW1 | SW2 | SW3 | +// | SW4 | SW5 | SW6 | +// | SW7 | SW8 | SW9 | +// | SW10 | SW11 | SW12 | + map = < +RC(0,0) RC(0,1) RC(0,2) +RC(1,0) RC(1,1) RC(1,2) +RC(2,0) RC(2,1) RC(2,2) +RC(3,0) RC(3,1) RC(3,2) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; + + bt_unpair_combo: bt_unpair_combo { + compatible = "zmk,bt-unpair-combo"; + }; + +}; + diff --git a/app/boards/shields/romac/romac.keymap b/app/boards/shields/romac/romac.keymap new file mode 100644 index 0000000..101bfaa --- /dev/null +++ b/app/boards/shields/romac/romac.keymap @@ -0,0 +1,40 @@ +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------- +// | 7 | 8 | 9 | +// | 4 | 5 | 6 | +// | 1 | 2 | 3 | +// | MO(1) | 0 | . | +// ---------------------- + bindings = < + &kp NUM_7 &kp NUM_8 &kp NUM_9 + &kp NUM_4 &kp NUM_5 &kp NUM_6 + &kp NUM_1 &kp NUM_2 &kp NUM_3 + &mo 1 &kp NUM_0 &kp DOT + >; + }; + + nav_layer { +// ----------------------- +// | _ | HOME | PGUP | +// | _ | END | PGDN | +// | _ | _ | _ | +// | _ | _ | RET | +// ----------------------- + bindings = < + &trans &kp HOME &kp PGUP + &trans &kp END &kp PGDN + &trans &trans &trans + &trans &trans &kp RET + >; + }; + }; +}; + + diff --git a/app/boards/shields/romac/romac.overlay b/app/boards/shields/romac/romac.overlay new file mode 100644 index 0000000..f16c900 --- /dev/null +++ b/app/boards/shields/romac/romac.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2020 Pete Johansen, Richard Jones + * + * SPDX-License-Identifier: MIT + */ + +#include "romac.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + ; +}; + +&bt_unpair_combo { + key-positions = <0 11>; +}; -- cgit v1.2.3 From bc023baa7d0a319c5468f0ce4839d1722f17b905 Mon Sep 17 00:00:00 2001 From: Mega Mind <68985133+megamind4089@users.noreply.github.com> Date: Sun, 23 Aug 2020 12:59:39 +0800 Subject: Incorporate comments - Change config name to nrfmicro specific --- app/boards/arm/nrfmicro/Kconfig | 2 +- app/boards/arm/nrfmicro/Kconfig.defconfig | 2 +- app/boards/arm/nrfmicro/pinmux.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/boards') diff --git a/app/boards/arm/nrfmicro/Kconfig b/app/boards/arm/nrfmicro/Kconfig index 80039e9..3501972 100644 --- a/app/boards/arm/nrfmicro/Kconfig +++ b/app/boards/arm/nrfmicro/Kconfig @@ -4,7 +4,7 @@ config BOARD_ENABLE_DCDC default y depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13) -config BOARD_ENABLE_CHARGER +config BOARD_NRFMICRO_CHARGER bool "Enable battery charger" default y depends on (BOARD_NRFMICRO_13) diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig index 69b59ee..9cce5a9 100644 --- a/app/boards/arm/nrfmicro/Kconfig.defconfig +++ b/app/boards/arm/nrfmicro/Kconfig.defconfig @@ -32,7 +32,7 @@ config PINMUX if BOARD_NRFMICRO_13 -config BOARD_ENABLE_CHARGER +config BOARD_NRFMICRO_CHARGER default y endif # BOARD_NRFMICRO_13 diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c index be1a4de..3792b59 100644 --- a/app/boards/arm/nrfmicro/pinmux.c +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -23,7 +23,7 @@ static int pinmux_nrfmicro_init(struct device *port) gpio_pin_configure(p1, 9, GPIO_OUTPUT); gpio_pin_set(p1, 9, 0); -#if CONFIG_BOARD_ENABLE_CHARGER +#if CONFIG_BOARD_NRFMICRO_CHARGER gpio_pin_configure(p0, 5, GPIO_OUTPUT); gpio_pin_set(p0, 5, 0); #else -- cgit v1.2.3 From 7abcae6949834a4dd9d4fdb41ebc68acb36d3db7 Mon Sep 17 00:00:00 2001 From: CrossR Date: Sun, 23 Aug 2020 18:48:28 +0100 Subject: Update License info. --- app/boards/shields/sofle/Kconfig.defconfig | 2 ++ app/boards/shields/sofle/sofle.conf | 3 +++ app/boards/shields/sofle/sofle_left.conf | 3 +++ app/boards/shields/sofle/sofle_right.conf | 3 +++ 4 files changed, 11 insertions(+) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 2ccf147..58d8217 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT if SHIELD_SOFLE_LEFT diff --git a/app/boards/shields/sofle/sofle.conf b/app/boards/shields/sofle/sofle.conf index 2194add..fe3f0f4 100644 --- a/app/boards/shields/sofle/sofle.conf +++ b/app/boards/shields/sofle/sofle.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT + # Uncomment the following line to enable the Sofle OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/sofle/sofle_left.conf b/app/boards/shields/sofle/sofle_left.conf index 1e028a7..bbac735 100644 --- a/app/boards/shields/sofle/sofle_left.conf +++ b/app/boards/shields/sofle/sofle_left.conf @@ -1,2 +1,5 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT + CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y diff --git a/app/boards/shields/sofle/sofle_right.conf b/app/boards/shields/sofle/sofle_right.conf index 990cf7c..ca5de38 100644 --- a/app/boards/shields/sofle/sofle_right.conf +++ b/app/boards/shields/sofle/sofle_right.conf @@ -1,2 +1,5 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT + CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -- cgit v1.2.3 From 221535fdc1c921c132d8a8539c62eb18e9c5f681 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 23 Aug 2020 19:28:03 +0100 Subject: refactor to remove SPI; no need for shared DTSI --- app/boards/shields/romac/boards/nice_nano.overlay | 10 ---- app/boards/shields/romac/romac.conf | 2 - app/boards/shields/romac/romac.dtsi | 50 ------------------- app/boards/shields/romac/romac.overlay | 60 ++++++++++++++++++----- 4 files changed, 49 insertions(+), 73 deletions(-) delete mode 100644 app/boards/shields/romac/boards/nice_nano.overlay delete mode 100644 app/boards/shields/romac/romac.dtsi (limited to 'app/boards') diff --git a/app/boards/shields/romac/boards/nice_nano.overlay b/app/boards/shields/romac/boards/nice_nano.overlay deleted file mode 100644 index 1f246d3..0000000 --- a/app/boards/shields/romac/boards/nice_nano.overlay +++ /dev/null @@ -1,10 +0,0 @@ -&spi1 { - compatible = "nordic,nrf-spi"; - /* Cannot be used together with i2c0. */ - status = "okay"; - sck-pin = <5>; - mosi-pin = <6>; - miso-pin = <7>; - -}; - diff --git a/app/boards/shields/romac/romac.conf b/app/boards/shields/romac/romac.conf index 5b40fdf..e69de29 100644 --- a/app/boards/shields/romac/romac.conf +++ b/app/boards/shields/romac/romac.conf @@ -1,2 +0,0 @@ -CONFIG_ZMK_RGB_UNDERGLOW=n -CONFIG_WS2812_STRIP=n diff --git a/app/boards/shields/romac/romac.dtsi b/app/boards/shields/romac/romac.dtsi deleted file mode 100644 index db9685f..0000000 --- a/app/boards/shields/romac/romac.dtsi +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johansen, Richard Jones - * - * SPDX-License-Identifier: MIT - */ - -#include - -/ { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <3>; - rows = <4>; -// | SW1 | SW2 | SW3 | -// | SW4 | SW5 | SW6 | -// | SW7 | SW8 | SW9 | -// | SW10 | SW11 | SW12 | - map = < -RC(0,0) RC(0,1) RC(0,2) -RC(1,0) RC(1,1) RC(1,2) -RC(2,0) RC(2,1) RC(2,2) -RC(3,0) RC(3,1) RC(3,2) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - - diode-direction = "col2row"; - row-gpios - = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - - }; - - bt_unpair_combo: bt_unpair_combo { - compatible = "zmk,bt-unpair-combo"; - }; - -}; - diff --git a/app/boards/shields/romac/romac.overlay b/app/boards/shields/romac/romac.overlay index f16c900..7449703 100644 --- a/app/boards/shields/romac/romac.overlay +++ b/app/boards/shields/romac/romac.overlay @@ -4,16 +4,54 @@ * SPDX-License-Identifier: MIT */ -#include "romac.dtsi" - -&kscan0 { - col-gpios - = <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - ; -}; +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <3>; + rows = <4>; +// | SW1 | SW2 | SW3 | +// | SW4 | SW5 | SW6 | +// | SW7 | SW8 | SW9 | +// | SW10 | SW11 | SW12 | + map = < +RC(0,0) RC(0,1) RC(0,2) +RC(1,0) RC(1,1) RC(1,2) +RC(2,0) RC(2,1) RC(2,2) +RC(3,0) RC(3,1) RC(3,2) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + col-gpios + = <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + ; + + }; + + bt_unpair_combo: bt_unpair_combo { + compatible = "zmk,bt-unpair-combo"; + key-positions = <0 11>; + }; -&bt_unpair_combo { - key-positions = <0 11>; }; + -- cgit v1.2.3 From 9b5af05f164582f22f3b4021c48660153f510ef2 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 23 Aug 2020 19:59:41 +0100 Subject: Make the shield name on-brand --- app/boards/shields/romac/Kconfig.defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/romac/Kconfig.defconfig b/app/boards/shields/romac/Kconfig.defconfig index da50e5c..b6490ac 100644 --- a/app/boards/shields/romac/Kconfig.defconfig +++ b/app/boards/shields/romac/Kconfig.defconfig @@ -2,7 +2,7 @@ if SHIELD_ROMAC config ZMK_KEYBOARD_NAME - default "romac" + default "RoMac" endif -- cgit v1.2.3 From 3ce94593652b89a6f5a59fce9fba284b022cc946 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 23 Aug 2020 20:02:28 +0100 Subject: Add license / copyright --- app/boards/shields/romac/Kconfig.defconfig | 5 +++++ app/boards/shields/romac/romac.keymap | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'app/boards') diff --git a/app/boards/shields/romac/Kconfig.defconfig b/app/boards/shields/romac/Kconfig.defconfig index b6490ac..0ef6f6b 100644 --- a/app/boards/shields/romac/Kconfig.defconfig +++ b/app/boards/shields/romac/Kconfig.defconfig @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2020 Pete Johansen, Richard Jones + * + * SPDX-License-Identifier: MIT + */ if SHIELD_ROMAC diff --git a/app/boards/shields/romac/romac.keymap b/app/boards/shields/romac/romac.keymap index 101bfaa..5557383 100644 --- a/app/boards/shields/romac/romac.keymap +++ b/app/boards/shields/romac/romac.keymap @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2020 Pete Johansen, Richard Jones + * + * SPDX-License-Identifier: MIT + */ + #include #include -- cgit v1.2.3 From cafd5c1fe2fade4646bc901d2aa6a185ca842f4d Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 23 Aug 2020 20:05:56 +0100 Subject: Oops comment format --- app/boards/shields/romac/Kconfig.defconfig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/romac/Kconfig.defconfig b/app/boards/shields/romac/Kconfig.defconfig index 0ef6f6b..50e4fdc 100644 --- a/app/boards/shields/romac/Kconfig.defconfig +++ b/app/boards/shields/romac/Kconfig.defconfig @@ -1,8 +1,6 @@ -/* - * Copyright (c) 2020 Pete Johansen, Richard Jones - * - * SPDX-License-Identifier: MIT - */ +# Copyright (c) 2020 Pete Johansen, Richard Jones +# +# SPDX-License-Identifier: MIT if SHIELD_ROMAC -- cgit v1.2.3 From 3affd45f0d4c85e417a9da27737cef4350c43a84 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 23 Aug 2020 20:08:00 +0100 Subject: Formatting --- app/boards/shields/romac/Kconfig.defconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/romac/Kconfig.defconfig b/app/boards/shields/romac/Kconfig.defconfig index 50e4fdc..22be9fe 100644 --- a/app/boards/shields/romac/Kconfig.defconfig +++ b/app/boards/shields/romac/Kconfig.defconfig @@ -1,5 +1,4 @@ # Copyright (c) 2020 Pete Johansen, Richard Jones -# # SPDX-License-Identifier: MIT if SHIELD_ROMAC -- cgit v1.2.3 From 6ac1a324e0bf91a405333e4bf89b4b35a50afc49 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 26 Aug 2020 21:25:26 +0100 Subject: Typo --- app/boards/shields/romac/Kconfig.defconfig | 2 +- app/boards/shields/romac/Kconfig.shield | 2 +- app/boards/shields/romac/romac.keymap | 2 +- app/boards/shields/romac/romac.overlay | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/romac/Kconfig.defconfig b/app/boards/shields/romac/Kconfig.defconfig index 22be9fe..5352797 100644 --- a/app/boards/shields/romac/Kconfig.defconfig +++ b/app/boards/shields/romac/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Pete Johansen, Richard Jones +# Copyright (c) 2020 Pete Johanson, Richard Jones # SPDX-License-Identifier: MIT if SHIELD_ROMAC diff --git a/app/boards/shields/romac/Kconfig.shield b/app/boards/shields/romac/Kconfig.shield index a081728..59669d3 100644 --- a/app/boards/shields/romac/Kconfig.shield +++ b/app/boards/shields/romac/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Pete Johansen, Richard Jones +# Copyright (c) 2020 Pete Johanson, Richard Jones # SPDX-License-Identifier: MIT config SHIELD_ROMAC diff --git a/app/boards/shields/romac/romac.keymap b/app/boards/shields/romac/romac.keymap index 5557383..f94a829 100644 --- a/app/boards/shields/romac/romac.keymap +++ b/app/boards/shields/romac/romac.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johansen, Richard Jones + * Copyright (c) 2020 Pete Johanson, Richard Jones * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/romac/romac.overlay b/app/boards/shields/romac/romac.overlay index 7449703..cae0568 100644 --- a/app/boards/shields/romac/romac.overlay +++ b/app/boards/shields/romac/romac.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Pete Johansen, Richard Jones + * Copyright (c) 2020 Pete Johanson, Richard Jones * * SPDX-License-Identifier: MIT */ -- cgit v1.2.3 From b8fbc3784d0e3dcb3bfba39c0936b2a110894ef8 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 26 Aug 2020 21:25:46 +0100 Subject: Not needed --- app/boards/shields/romac/romac.overlay | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/romac/romac.overlay b/app/boards/shields/romac/romac.overlay index cae0568..67d5868 100644 --- a/app/boards/shields/romac/romac.overlay +++ b/app/boards/shields/romac/romac.overlay @@ -9,23 +9,6 @@ / { chosen { zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <3>; - rows = <4>; -// | SW1 | SW2 | SW3 | -// | SW4 | SW5 | SW6 | -// | SW7 | SW8 | SW9 | -// | SW10 | SW11 | SW12 | - map = < -RC(0,0) RC(0,1) RC(0,2) -RC(1,0) RC(1,1) RC(1,2) -RC(2,0) RC(2,1) RC(2,2) -RC(3,0) RC(3,1) RC(3,2) - >; }; kscan0: kscan { -- cgit v1.2.3 From 79f0ecf8b5a79f280c5f25209701218caa8e8b2a Mon Sep 17 00:00:00 2001 From: jrhe <4038905+jrhe@users.noreply.github.com> Date: Fri, 28 Aug 2020 01:02:50 +0100 Subject: Correct number of rows in Lily58 shield --- app/boards/shields/lily58/lily58.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index 24f6805..23f5644 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -15,7 +15,7 @@ default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <16>; - rows = <4>; + rows = <5>; // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | -- cgit v1.2.3 From ac3e4af1ce7fb40495c50eb2184b43ecbe1f11a9 Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Thu, 27 Aug 2020 19:09:40 -0500 Subject: Add QAZ shield --- app/boards/shields/qaz/Kconfig.defconfig | 6 ++ app/boards/shields/qaz/Kconfig.shield | 2 + app/boards/shields/qaz/boards/nice_nano.overlay | 22 ++++++++ app/boards/shields/qaz/qaz.conf | 26 +++++++++ app/boards/shields/qaz/qaz.keymap | 75 +++++++++++++++++++++++++ app/boards/shields/qaz/qaz.overlay | 48 ++++++++++++++++ 6 files changed, 179 insertions(+) create mode 100644 app/boards/shields/qaz/Kconfig.defconfig create mode 100644 app/boards/shields/qaz/Kconfig.shield create mode 100644 app/boards/shields/qaz/boards/nice_nano.overlay create mode 100644 app/boards/shields/qaz/qaz.conf create mode 100644 app/boards/shields/qaz/qaz.keymap create mode 100644 app/boards/shields/qaz/qaz.overlay (limited to 'app/boards') diff --git a/app/boards/shields/qaz/Kconfig.defconfig b/app/boards/shields/qaz/Kconfig.defconfig new file mode 100644 index 0000000..18cceaa --- /dev/null +++ b/app/boards/shields/qaz/Kconfig.defconfig @@ -0,0 +1,6 @@ +if SHIELD_QAZ + +config ZMK_KEYBOARD_NAME + default "QAZ" + +endif \ No newline at end of file diff --git a/app/boards/shields/qaz/Kconfig.shield b/app/boards/shields/qaz/Kconfig.shield new file mode 100644 index 0000000..1e1112a --- /dev/null +++ b/app/boards/shields/qaz/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_MY_BOARD + def_bool $(shields_list_contains,qaz) diff --git a/app/boards/shields/qaz/boards/nice_nano.overlay b/app/boards/shields/qaz/boards/nice_nano.overlay new file mode 100644 index 0000000..2927d0d --- /dev/null +++ b/app/boards/shields/qaz/boards/nice_nano.overlay @@ -0,0 +1,22 @@ +&spi1 { + compatible = "nordic,nrf-spi"; + status = "okay"; + mosi-pin = <47>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <5>; + miso-pin = <7>; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <21>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/qaz/qaz.conf b/app/boards/shields/qaz/qaz.conf new file mode 100644 index 0000000..7d6da43 --- /dev/null +++ b/app/boards/shields/qaz/qaz.conf @@ -0,0 +1,26 @@ +CONFIG_ZMK_RGB_UNDERGLOW=n +# Use the STRIP config specific to the LEDs you're using +CONFIG_WS2812_STRIP=n +# Turn on logging, and set ZMK logging to debug output +CONFIG_LOG=y +CONFIG_ZMK_LOG_LEVEL_DBG=y + +# Turn on USB CDC ACM device +CONFIG_USB=y +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_CDC_ACM=y +CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024 +CONFIG_USB_CDC_ACM_DEVICE_NAME="CDC_ACM" +CONFIG_USB_CDC_ACM_DEVICE_COUNT=1 + +# Enable serial console +CONFIG_SERIAL=y +CONFIG_CONSOLE=y +CONFIG_UART_INTERRUPT_DRIVEN=y +CONFIG_UART_LINE_CTRL=y + +# Enable USB UART, and set the console device +CONFIG_UART_CONSOLE=y +CONFIG_USB_UART_CONSOLE=y +CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0" +CONFIG_USB_UART_DTR_WAIT=n \ No newline at end of file diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap new file mode 100644 index 0000000..fa4ede1 --- /dev/null +++ b/app/boards/shields/qaz/qaz.keymap @@ -0,0 +1,75 @@ +#include +#include +#include + +#define DEFAULT 0 +#define NUM_SYM 1 +#define NAV 2 + +/ { + behaviors { + rst: behavior_tap_hold1 { + compatible = "zmk,behavior-tap-hold"; + label = "Bootloader Tap - Reset Hold"; + #binding-cells = <0>; + hold_ms = <200>; + bindings = <&bootloader>, <&reset>, <&kp BKSP>; + }; + + num_spc: behavior_tap_hold2 { + compatible = "zmk,behavior-tap-hold"; + label = "Space Tap - Num/Sym Hold"; + #binding-cells = <0>; + hold_ms = <300>; + bindings = <&kp SPC>, <&mo NUM_SYM>; + }; + + ent_nav: behavior_tap_hold{ + compatible = "zmk,behavior-tap-hold"; + label = "Return Tap - Nav Hold"; + #binding-cells = <0>; + hold_ms = <100>; + bindings = <&kp RET>, <&mo NAV>; + }; + + com_col: behavior_tap_hold10 { + compatible = "zmk,behavior-tap-hold"; + label = ", tap, hold"; + #binding-cells = <0>; + hold_ms = <200>; + bindings = <&kp CMMA>, <&kp SCLN>, <&kp BKSP>; + }; + }; + }; + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp QUOT + &kp A &kp R &kp S &kp T &kp D &kp H &kp N &kp E &kp I &kp O + &kp Z &kp X &kp C &kp V &kp B &kp K &kp M &com_col &kp DOT + &kp LSFT &kp LGUI &kp TAB &ent_nav &num_spc &kp LCTL &kp LALT &kp FSLH + >; + }; + num_sym { + bindings = < + &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 + &trans &trans &trans &trans &trans &trans &trans &trans &kp EQL &kp MINUS + &kp DEL &none &none &none &none &none &none &none &kp DOT + &rst &none &none &trans &trans &kp RET &trans &kp FSLH + >; + }; + + nav { + bindings = < + &none &none &none &none &none &none &none &kp UARW &none &kp BKSP + &trans &trans &trans &trans &none &none &kp LARW &kp DARW &kp RARW &none + &none &none &none &none &none &none &none &none &none + &rgb_ug RGB_TOG &rgb_ug RGB_EFF &none &trans &trans &kp RET &trans &kp FSLH + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/qaz/qaz.overlay b/app/boards/shields/qaz/qaz.overlay new file mode 100644 index 0000000..3dae7dd --- /dev/null +++ b/app/boards/shields/qaz/qaz.overlay @@ -0,0 +1,48 @@ +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + zmk,underglow = &led_strip; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <7>; + rows = <6>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(4,3) RC(5,3) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(4,4) + >; + }; + + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + col-gpios + = <&pro_micro_d 8 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 9 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 6 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + +}; \ No newline at end of file -- cgit v1.2.3 From cf003262e63a29dd6384645a8c96951a963f30d3 Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Thu, 27 Aug 2020 22:23:27 -0500 Subject: Remove RGB, Remove debug, Add Copyright and Licenses --- app/boards/shields/qaz/Kconfig.defconfig | 3 ++ app/boards/shields/qaz/Kconfig.shield | 5 ++- app/boards/shields/qaz/boards/nice_nano.overlay | 22 ----------- app/boards/shields/qaz/qaz.conf | 26 ------------- app/boards/shields/qaz/qaz.keymap | 49 +++---------------------- app/boards/shields/qaz/qaz.overlay | 7 +++- 6 files changed, 19 insertions(+), 93 deletions(-) delete mode 100644 app/boards/shields/qaz/boards/nice_nano.overlay delete mode 100644 app/boards/shields/qaz/qaz.conf (limited to 'app/boards') diff --git a/app/boards/shields/qaz/Kconfig.defconfig b/app/boards/shields/qaz/Kconfig.defconfig index 18cceaa..f82f458 100644 --- a/app/boards/shields/qaz/Kconfig.defconfig +++ b/app/boards/shields/qaz/Kconfig.defconfig @@ -1,3 +1,6 @@ + # Copyright (c) 2020 TJ Campie + # SPDX-License-Identifier: MIT + if SHIELD_QAZ config ZMK_KEYBOARD_NAME diff --git a/app/boards/shields/qaz/Kconfig.shield b/app/boards/shields/qaz/Kconfig.shield index 1e1112a..9da6077 100644 --- a/app/boards/shields/qaz/Kconfig.shield +++ b/app/boards/shields/qaz/Kconfig.shield @@ -1,2 +1,5 @@ -config SHIELD_MY_BOARD +# Copyright (c) 2020 TJ Campie +# SPDX-License-Identifier: MIT + + config SHIELD_MY_BOARD def_bool $(shields_list_contains,qaz) diff --git a/app/boards/shields/qaz/boards/nice_nano.overlay b/app/boards/shields/qaz/boards/nice_nano.overlay deleted file mode 100644 index 2927d0d..0000000 --- a/app/boards/shields/qaz/boards/nice_nano.overlay +++ /dev/null @@ -1,22 +0,0 @@ -&spi1 { - compatible = "nordic,nrf-spi"; - status = "okay"; - mosi-pin = <47>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <21>; /* number of LEDs */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - }; -}; \ No newline at end of file diff --git a/app/boards/shields/qaz/qaz.conf b/app/boards/shields/qaz/qaz.conf deleted file mode 100644 index 7d6da43..0000000 --- a/app/boards/shields/qaz/qaz.conf +++ /dev/null @@ -1,26 +0,0 @@ -CONFIG_ZMK_RGB_UNDERGLOW=n -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=n -# Turn on logging, and set ZMK logging to debug output -CONFIG_LOG=y -CONFIG_ZMK_LOG_LEVEL_DBG=y - -# Turn on USB CDC ACM device -CONFIG_USB=y -CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_CDC_ACM=y -CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024 -CONFIG_USB_CDC_ACM_DEVICE_NAME="CDC_ACM" -CONFIG_USB_CDC_ACM_DEVICE_COUNT=1 - -# Enable serial console -CONFIG_SERIAL=y -CONFIG_CONSOLE=y -CONFIG_UART_INTERRUPT_DRIVEN=y -CONFIG_UART_LINE_CTRL=y - -# Enable USB UART, and set the console device -CONFIG_UART_CONSOLE=y -CONFIG_USB_UART_CONSOLE=y -CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0" -CONFIG_USB_UART_DTR_WAIT=n \ No newline at end of file diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index fa4ede1..cebcd4b 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -1,46 +1,9 @@ #include #include -#include #define DEFAULT 0 #define NUM_SYM 1 #define NAV 2 - -/ { - behaviors { - rst: behavior_tap_hold1 { - compatible = "zmk,behavior-tap-hold"; - label = "Bootloader Tap - Reset Hold"; - #binding-cells = <0>; - hold_ms = <200>; - bindings = <&bootloader>, <&reset>, <&kp BKSP>; - }; - - num_spc: behavior_tap_hold2 { - compatible = "zmk,behavior-tap-hold"; - label = "Space Tap - Num/Sym Hold"; - #binding-cells = <0>; - hold_ms = <300>; - bindings = <&kp SPC>, <&mo NUM_SYM>; - }; - - ent_nav: behavior_tap_hold{ - compatible = "zmk,behavior-tap-hold"; - label = "Return Tap - Nav Hold"; - #binding-cells = <0>; - hold_ms = <100>; - bindings = <&kp RET>, <&mo NAV>; - }; - - com_col: behavior_tap_hold10 { - compatible = "zmk,behavior-tap-hold"; - label = ", tap, hold"; - #binding-cells = <0>; - hold_ms = <200>; - bindings = <&kp CMMA>, <&kp SCLN>, <&kp BKSP>; - }; - }; - }; / { keymap { @@ -48,10 +11,10 @@ default_layer { bindings = < - &kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp QUOT - &kp A &kp R &kp S &kp T &kp D &kp H &kp N &kp E &kp I &kp O - &kp Z &kp X &kp C &kp V &kp B &kp K &kp M &com_col &kp DOT - &kp LSFT &kp LGUI &kp TAB &ent_nav &num_spc &kp LCTL &kp LALT &kp FSLH + &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P + &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp RET + &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT + &kp LSFT &kp LGUI &kp LALT &mo NAV &kp SPC &mo NUM_SYM &kp QUOT &kp FSLH >; }; num_sym { @@ -59,7 +22,7 @@ &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 &trans &trans &trans &trans &trans &trans &trans &trans &kp EQL &kp MINUS &kp DEL &none &none &none &none &none &none &none &kp DOT - &rst &none &none &trans &trans &kp RET &trans &kp FSLH + &bootloader &reset &none &trans &trans &kp RET &trans &kp FSLH >; }; @@ -68,7 +31,7 @@ &none &none &none &none &none &none &none &kp UARW &none &kp BKSP &trans &trans &trans &trans &none &none &kp LARW &kp DARW &kp RARW &none &none &none &none &none &none &none &none &none &none - &rgb_ug RGB_TOG &rgb_ug RGB_EFF &none &trans &trans &kp RET &trans &kp FSLH + &none &none &none &none &none &trans &trans &kp RET &trans &kp FSLH >; }; }; diff --git a/app/boards/shields/qaz/qaz.overlay b/app/boards/shields/qaz/qaz.overlay index 3dae7dd..472005b 100644 --- a/app/boards/shields/qaz/qaz.overlay +++ b/app/boards/shields/qaz/qaz.overlay @@ -1,10 +1,15 @@ +/* + * Copyright (c) 2020 TJ Campie + * + * SPDX-License-Identifier: MIT + */ + #include / { chosen { zmk,kscan = &kscan0; zmk,matrix_transform = &default_transform; - zmk,underglow = &led_strip; }; default_transform: keymap_transform_0 { -- cgit v1.2.3 From f02fa01e9a9af1a1637a387f3e8044a791b47ced Mon Sep 17 00:00:00 2001 From: Cody McGinnis Date: Fri, 28 Aug 2020 16:21:31 -0400 Subject: fix(test): change the layout --- app/boards/native_posix.conf | 3 +- app/boards/native_posix.overlay | 73 ++++------------------------------------- 2 files changed, 7 insertions(+), 69 deletions(-) (limited to 'app/boards') diff --git a/app/boards/native_posix.conf b/app/boards/native_posix.conf index 5bfb366..357b1b8 100644 --- a/app/boards/native_posix.conf +++ b/app/boards/native_posix.conf @@ -1,9 +1,8 @@ CONFIG_KSCAN=n CONFIG_ZMK_KSCAN_MOCK_DRIVER=y -CONFIG_ZMK_KSCAN_COMPOSITE_DRIVER=y CONFIG_ZMK_KSCAN_GPIO_DRIVER=n CONFIG_GPIO=n CONFIG_ZMK_BLE=n CONFIG_LOG=y -CONFIG_KSCAN_LOG_LEVEL_DBG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_ZMK_LOG_LEVEL_DBG=y diff --git a/app/boards/native_posix.overlay b/app/boards/native_posix.overlay index e9c4c95..bbb23b6 100644 --- a/app/boards/native_posix.overlay +++ b/app/boards/native_posix.overlay @@ -1,79 +1,18 @@ -#include #include -#include +#include +#include / { chosen { - zmk,kscan = &kscan0; - zmk,keymap = &keymap0; - }; - - kscan0: kscan_0 { - compatible = "zmk,kscan-composite"; - label = "KSCAN_COMP"; - rows = <2>; - columns = <4>; - - left: left { - kscan = <&left_hand>; - }; - - right: right { - kscan = <&right_hand>; - column-offset = <2>; - }; + zmk,kscan = &kscan; }; - left_hand: kscan_1 { + kscan: kscan { compatible = "zmk,kscan-mock"; - label = "KSCAN_LEFT"; + label = "KSCAN_MOCK"; rows = <2>; columns = <2>; - events = ; - // events = ; - }; - - right_hand: kscan_2 { - compatible = "zmk,kscan-mock"; - label = "KSCAN_RIGHT"; - - rows = <2>; - columns = <2>; - events = ; - }; - - keymap0: keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; - layers = <&default &lower &raise>; - }; - - layers { - compatible = "zmk,layers"; - - default: layer_0 { - label = "DEFAULT"; - - bindings = < - &kp B &mo 1 &kp C &kp E - &kp D &kp G &kp F &kp Q>; - }; - - lower: layer_1 { - label = "LOWER"; - - bindings = < - &cp M_NEXT &trans &kp O &kp Q - &kp L &kp J &kp P &kp K>; - }; - - raise: layer_2 { - label = "RAISE"; - - bindings = < - &kp W &kp U &kp I &kp N - &kp X &kp M &kp C &kp B>; - }; + exit-after; }; }; -- cgit v1.2.3 From 887ba47cbe173ff65204b6f454e4070768994abf Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Fri, 28 Aug 2020 16:38:40 -0500 Subject: Add copyright header --- app/boards/shields/qaz/qaz.keymap | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/boards') diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index cebcd4b..ffa2f6c 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2020 TJ Campie + * + * SPDX-License-Identifier: MIT + */ + #include #include -- cgit v1.2.3 From 6475009da9baad358302fbff3db7d88d63f9ce50 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 28 Aug 2020 20:36:28 -0700 Subject: Added encoder and changed BT unpair keys in overlays --- app/boards/shields/lily58/lily58_left.overlay | 6 +++++- app/boards/shields/lily58/lily58_right.overlay | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58_left.overlay b/app/boards/shields/lily58/lily58_left.overlay index c6f630f..1752b6e 100644 --- a/app/boards/shields/lily58/lily58_left.overlay +++ b/app/boards/shields/lily58/lily58_left.overlay @@ -17,6 +17,10 @@ ; }; +&left_encoder { + status = "okay"; +}; + &bt_unpair_combo { - key-positions = <0 42>; + key-positions = <0 53>; }; diff --git a/app/boards/shields/lily58/lily58_right.overlay b/app/boards/shields/lily58/lily58_right.overlay index 84f0b06..6c8e493 100644 --- a/app/boards/shields/lily58/lily58_right.overlay +++ b/app/boards/shields/lily58/lily58_right.overlay @@ -22,5 +22,5 @@ }; &bt_unpair_combo { - key-positions = <11 43>; + key-positions = <11 54>; }; -- cgit v1.2.3 From e616fc2c8124a98e2abe2279d952783ea98b5cd5 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 28 Aug 2020 20:36:43 -0700 Subject: Added left encoder support --- app/boards/shields/lily58/lily58.conf | 4 ++++ app/boards/shields/lily58/lily58.dtsi | 14 +++++++++++ app/boards/shields/lily58/lily58.keymap | 42 +++++++++++++++++++-------------- 3 files changed, 42 insertions(+), 18 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58.conf b/app/boards/shields/lily58/lily58.conf index 73f0d9d..14c1841 100644 --- a/app/boards/shields/lily58/lily58.conf +++ b/app/boards/shields/lily58/lily58.conf @@ -1,2 +1,6 @@ +# Enable encoder +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + # Uncomment the following line to enable the Lily58 OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index 23f5644..aea36c8 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -45,6 +45,20 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + }; + bt_unpair_combo: bt_unpair_combo { compatible = "zmk,bt-unpair-combo"; }; diff --git a/app/boards/shields/lily58/lily58.keymap b/app/boards/shields/lily58/lily58.keymap index 71bf4ad..590d7b6 100644 --- a/app/boards/shields/lily58/lily58.keymap +++ b/app/boards/shields/lily58/lily58.keymap @@ -16,41 +16,47 @@ &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 GRAV &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS &kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT -&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT - &kp LALT &kp LGUI &mo 1 &kp SPC &kp RET &mo 2 &kp BKSP &kp RGUI +&kp LSFT &kp Z &kp X &kp C &kp V &kp B &cp M_PLAY &kp DEL &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT + &kp LGUI &kp LALT &kp BKSP &mo 1 &mo 2 &kp SPC &kp RET &kp RGUI >; + + sensor-bindings = <&inc_dec_cp LBKT RBKT>; }; lower_layer { // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | -// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | -// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | -// | | | | | | | | | | | _ | + | { | } | "|" | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | +// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | // | | | | | | | | | | bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&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 GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD -&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE - &trans &trans &trans &trans &trans &trans &trans &trans +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&trans &kp LCUR &kp AMPS &kp KMLT &kp LPRN &kp RCUR &trans &trans &trans &trans &trans &kp F12 +&trans &kp COLN &kp CURU &kp PRCT &kp CRRT &kp KPLS &kp CLCK &kp LARW &kp DARW &kp UARW &kp RARW &trans +&trans &kp GRAV &kp BANG &kp ATSN &kp HASH &kp PIPE &trans &trans &kp INS &kp HOME &kp PGDN &kp PGUP &kp END &trans + &kp LPRN &kp RPRN &trans &trans &trans &trans &trans &trans >; + + sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>; }; raise_layer { // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | -// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | -// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | -// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | +// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | +// | | | | | | | | | | | _ | + | { | } | "|" | // | | | | | | | | | | bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&kp GRAV &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 &trans -&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LARW &kp DARW &kp UARW &kp RARW &trans -&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KPLS &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp BSLH - &trans &trans &trans &trans &trans &trans &trans &trans +&trans &tog 2 &kp KPLS &kp KDIV &kp KMLT &kp KMIN &trans &trans &trans &trans &trans &trans +&trans &kp LBKT &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp RBKT &trans &trans &trans &trans &trans &trans +&trans &kp SCLN &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp EQL &trans &cp M_PREV &cp M_VOLD &cp M_VOLU &cp M_NEXT &trans +&trans &kp TILD &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp BSLH &trans &trans &cp M_STOP &cp M_PLAY &cp M_MUTE &trans &trans &trans + &kp NUM_0 &kp DOT &kp RET &trans &trans &trans &trans &trans >; + + sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>; }; }; }; -- cgit v1.2.3 From 8b38193ec206505e6e493a7d7bb88010b57af7b3 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 28 Aug 2020 23:33:29 -0700 Subject: Removed status line --- app/boards/shields/lily58/lily58.dtsi | 1 - 1 file changed, 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index aea36c8..556909f 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -51,7 +51,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; - status = "disabled"; }; sensors { -- cgit v1.2.3 From 72232b4ec7ead37bf765acd16e1ea4490651260a Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 29 Aug 2020 11:36:48 -0700 Subject: Fixed encoder config and added build_right script --- app/boards/shields/lily58/lily58.keymap | 2 +- app/boards/shields/lily58/lily58_left.conf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58.keymap b/app/boards/shields/lily58/lily58.keymap index 590d7b6..b8d4a21 100644 --- a/app/boards/shields/lily58/lily58.keymap +++ b/app/boards/shields/lily58/lily58.keymap @@ -20,7 +20,7 @@ &kp LGUI &kp LALT &kp BKSP &mo 1 &mo 2 &kp SPC &kp RET &kp RGUI >; - sensor-bindings = <&inc_dec_cp LBKT RBKT>; + sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>; }; lower_layer { diff --git a/app/boards/shields/lily58/lily58_left.conf b/app/boards/shields/lily58/lily58_left.conf index 1e028a7..2bd5872 100644 --- a/app/boards/shields/lily58/lily58_left.conf +++ b/app/boards/shields/lily58/lily58_left.conf @@ -1,2 +1,6 @@ +# Enable encoder +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -- cgit v1.2.3 From 8b6e912d36b1e9d1a0efb09cd429714572a23e27 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 29 Aug 2020 11:48:33 -0700 Subject: Reverted back to default keymap --- app/boards/shields/lily58/lily58.keymap | 36 +++++++++++++++--------------- app/boards/shields/lily58/lily58_left.conf | 8 +++---- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58.keymap b/app/boards/shields/lily58/lily58.keymap index b8d4a21..afd2694 100644 --- a/app/boards/shields/lily58/lily58.keymap +++ b/app/boards/shields/lily58/lily58.keymap @@ -16,8 +16,8 @@ &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 GRAV &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS &kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT -&kp LSFT &kp Z &kp X &kp C &kp V &kp B &cp M_PLAY &kp DEL &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT - &kp LGUI &kp LALT &kp BKSP &mo 1 &mo 2 &kp SPC &kp RET &kp RGUI +&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT + &kp LALT &kp LGUI &mo 1 &kp SPC &kp RET &mo 2 &kp BKSP &kp RGUI >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>; @@ -26,16 +26,16 @@ lower_layer { // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | -// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | -// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | -// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | +// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | +// | | | | | | | | | | | _ | + | { | } | "|" | // | | | | | | | | | | bindings = < -&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&trans &kp LCUR &kp AMPS &kp KMLT &kp LPRN &kp RCUR &trans &trans &trans &trans &trans &kp F12 -&trans &kp COLN &kp CURU &kp PRCT &kp CRRT &kp KPLS &kp CLCK &kp LARW &kp DARW &kp UARW &kp RARW &trans -&trans &kp GRAV &kp BANG &kp ATSN &kp HASH &kp PIPE &trans &trans &kp INS &kp HOME &kp PGDN &kp PGUP &kp END &trans - &kp LPRN &kp RPRN &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&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 GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD +&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE + &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>; @@ -44,16 +44,16 @@ raise_layer { // ------------------------------------------------------------------------------------------------------------ // | | | | | | | | | | | | | | -// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | -// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | -// | | | | | | | | | | | _ | + | { | } | "|" | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | +// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | // | | | | | | | | | | bindings = < -&trans &tog 2 &kp KPLS &kp KDIV &kp KMLT &kp KMIN &trans &trans &trans &trans &trans &trans -&trans &kp LBKT &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp RBKT &trans &trans &trans &trans &trans &trans -&trans &kp SCLN &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp EQL &trans &cp M_PREV &cp M_VOLD &cp M_VOLU &cp M_NEXT &trans -&trans &kp TILD &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp BSLH &trans &trans &cp M_STOP &cp M_PLAY &cp M_MUTE &trans &trans &trans - &kp NUM_0 &kp DOT &kp RET &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&kp GRAV &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 &trans +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LARW &kp DARW &kp UARW &kp RARW &trans +&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KPLS &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp BSLH + &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>; diff --git a/app/boards/shields/lily58/lily58_left.conf b/app/boards/shields/lily58/lily58_left.conf index 2bd5872..6ff95d5 100644 --- a/app/boards/shields/lily58/lily58_left.conf +++ b/app/boards/shields/lily58/lily58_left.conf @@ -1,6 +1,6 @@ -# Enable encoder -CONFIG_EC11=y -CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# Uncomment to enable encoder +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file -- cgit v1.2.3 From 03319438553e68a29a8c66abc47686e0934afc71 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 29 Aug 2020 13:48:40 -0700 Subject: Removed extra encoder config lines --- app/boards/shields/lily58/lily58.conf | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58.conf b/app/boards/shields/lily58/lily58.conf index 14c1841..73f0d9d 100644 --- a/app/boards/shields/lily58/lily58.conf +++ b/app/boards/shields/lily58/lily58.conf @@ -1,6 +1,2 @@ -# Enable encoder -CONFIG_EC11=y -CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y - # Uncomment the following line to enable the Lily58 OLED Display # CONFIG_ZMK_DISPLAY=y -- cgit v1.2.3 From 1ffcbefd728f2b47fcbb5e4e8b117adf893f059a Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 29 Aug 2020 18:12:12 -0700 Subject: Added encoder to unified conf file --- app/boards/shields/lily58/lily58.conf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/boards') diff --git a/app/boards/shields/lily58/lily58.conf b/app/boards/shields/lily58/lily58.conf index 73f0d9d..31eb7c6 100644 --- a/app/boards/shields/lily58/lily58.conf +++ b/app/boards/shields/lily58/lily58.conf @@ -1,2 +1,6 @@ +# Uncomment to enable encoder +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + # Uncomment the following line to enable the Lily58 OLED Display # CONFIG_ZMK_DISPLAY=y -- cgit v1.2.3 From ca0f2bb074a103b871a3e0f7f5e1fed8b6b4069b Mon Sep 17 00:00:00 2001 From: CrossR Date: Tue, 1 Sep 2020 18:32:45 +0100 Subject: Add to setup. --- app/boards/shields/sofle/sofle.dtsi | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 9b3d3c0..653a772 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -47,19 +47,17 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; - status = "disabled"; + a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; }; right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; - status = "disabled"; + a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; }; sensors { -- cgit v1.2.3 From 081ae84d0ed4e5fd5a90e9a5e279cfcea55e81b4 Mon Sep 17 00:00:00 2001 From: kurtis-lew Date: Tue, 1 Sep 2020 20:22:11 -0700 Subject: Added Iris Shield --- app/boards/shields/iris/Kconfig.defconfig | 14 ++++++++ app/boards/shields/iris/Kconfig.shield | 8 +++++ app/boards/shields/iris/iris.conf | 0 app/boards/shields/iris/iris.dtsi | 51 +++++++++++++++++++++++++++ app/boards/shields/iris/iris.keymap | 56 ++++++++++++++++++++++++++++++ app/boards/shields/iris/iris_left.conf | 2 ++ app/boards/shields/iris/iris_left.overlay | 22 ++++++++++++ app/boards/shields/iris/iris_right.conf | 2 ++ app/boards/shields/iris/iris_right.overlay | 26 ++++++++++++++ 9 files changed, 181 insertions(+) create mode 100644 app/boards/shields/iris/Kconfig.defconfig create mode 100644 app/boards/shields/iris/Kconfig.shield create mode 100644 app/boards/shields/iris/iris.conf create mode 100644 app/boards/shields/iris/iris.dtsi create mode 100644 app/boards/shields/iris/iris.keymap create mode 100644 app/boards/shields/iris/iris_left.conf create mode 100644 app/boards/shields/iris/iris_left.overlay create mode 100644 app/boards/shields/iris/iris_right.conf create mode 100644 app/boards/shields/iris/iris_right.overlay (limited to 'app/boards') diff --git a/app/boards/shields/iris/Kconfig.defconfig b/app/boards/shields/iris/Kconfig.defconfig new file mode 100644 index 0000000..bf4919a --- /dev/null +++ b/app/boards/shields/iris/Kconfig.defconfig @@ -0,0 +1,14 @@ + +if SHIELD_IRIS_LEFT + +config ZMK_KEYBOARD_NAME + default "Iris Left" + +endif + +if SHIELD_IRIS_RIGHT + +config ZMK_KEYBOARD_NAME + default "Iris Right" + +endif \ No newline at end of file diff --git a/app/boards/shields/iris/Kconfig.shield b/app/boards/shields/iris/Kconfig.shield new file mode 100644 index 0000000..370bd22 --- /dev/null +++ b/app/boards/shields/iris/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2020 Pete Johanson, Kurtis Lew +# SPDX-License-Identifier: MIT + +config SHIELD_IRIS_LEFT + def_bool $(shields_list_contains,iris_left) + +config SHIELD_IRIS_RIGHT + def_bool $(shields_list_contains,iris_right) diff --git a/app/boards/shields/iris/iris.conf b/app/boards/shields/iris/iris.conf new file mode 100644 index 0000000..e69de29 diff --git a/app/boards/shields/iris/iris.dtsi b/app/boards/shields/iris/iris.dtsi new file mode 100644 index 0000000..f6e32c4 --- /dev/null +++ b/app/boards/shields/iris/iris.dtsi @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020 Pete Johanson, Kurtis Lew + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; +// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | +// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | +// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | + 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(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(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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; + + bt_unpair_combo: bt_unpair_combo { + compatible = "zmk,bt-unpair-combo"; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/iris/iris.keymap b/app/boards/shields/iris/iris.keymap new file mode 100644 index 0000000..4607adf --- /dev/null +++ b/app/boards/shields/iris/iris.keymap @@ -0,0 +1,56 @@ +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------------------------ +// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | +// | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | +// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | "[" | | "]" | N | M | , | . | / | SHIFT | +// | GUI | LOWER| SPACE | | ENTER | RAISE| ALT | + 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 GRAV +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS +&kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT +&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT + &kp LGUI &mo 1 &kp SPC &kp RET &mo 2 &kp RALT + >; + }; + + lower_layer { +// ------------------------------------------------------------------------------------------------------------ +// | | | | | | | | | | | | | | +// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | +// | | | | | | | | | | | _ | + | { | } | "|" | +// | | | | | | | | + bindings = < +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&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 GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD +&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE + &trans &trans &trans &trans &trans &trans + >; + }; + + raise_layer { +// ------------------------------------------------------------------------------------------------------------ +// | | | | | | | | | | | | | | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | +// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | +// | | | | | | | | + bindings = < +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&kp GRAV &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 &trans +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LARW &kp DARW &kp UARW &kp RARW &trans +&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KPLS &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp BSLH + &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; diff --git a/app/boards/shields/iris/iris_left.conf b/app/boards/shields/iris/iris_left.conf new file mode 100644 index 0000000..1e028a7 --- /dev/null +++ b/app/boards/shields/iris/iris_left.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y diff --git a/app/boards/shields/iris/iris_left.overlay b/app/boards/shields/iris/iris_left.overlay new file mode 100644 index 0000000..e04638e --- /dev/null +++ b/app/boards/shields/iris/iris_left.overlay @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Pete Johanson, Kurtis Lew + * + * SPDX-License-Identifier: MIT + */ + +#include "iris.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + ; +}; + +&bt_unpair_combo { + key-positions = <0 42>; +}; diff --git a/app/boards/shields/iris/iris_right.conf b/app/boards/shields/iris/iris_right.conf new file mode 100644 index 0000000..990cf7c --- /dev/null +++ b/app/boards/shields/iris/iris_right.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y diff --git a/app/boards/shields/iris/iris_right.overlay b/app/boards/shields/iris/iris_right.overlay new file mode 100644 index 0000000..3f3dcb8 --- /dev/null +++ b/app/boards/shields/iris/iris_right.overlay @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 Pete Johanson, Kurtis Lew + * + * SPDX-License-Identifier: MIT + */ + +#include "iris.dtsi" + +&default_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios + = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + ; +}; + +&bt_unpair_combo { + key-positions = <11 43>; +}; -- cgit v1.2.3 From c2ffeb1cf4a27b79c9fcc7cf0c83deab3cd4b84e Mon Sep 17 00:00:00 2001 From: Kurtis Lew Date: Wed, 2 Sep 2020 07:21:45 -0700 Subject: Added Copyright Header to Kconfig.defconfig --- app/boards/shields/iris/Kconfig.defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/iris/Kconfig.defconfig b/app/boards/shields/iris/Kconfig.defconfig index bf4919a..6439780 100644 --- a/app/boards/shields/iris/Kconfig.defconfig +++ b/app/boards/shields/iris/Kconfig.defconfig @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Pete Johanson, Kurtis Lew +# SPDX-License-Identifier: MIT if SHIELD_IRIS_LEFT @@ -11,4 +13,4 @@ if SHIELD_IRIS_RIGHT config ZMK_KEYBOARD_NAME default "Iris Right" -endif \ No newline at end of file +endif -- cgit v1.2.3 From 6e8f19028a58d5238aa75b3fef3551e2cedaebdc Mon Sep 17 00:00:00 2001 From: Kurtis Lew Date: Wed, 2 Sep 2020 07:22:39 -0700 Subject: Added copyright header to iris.keymap --- app/boards/shields/iris/iris.keymap | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/boards') diff --git a/app/boards/shields/iris/iris.keymap b/app/boards/shields/iris/iris.keymap index 4607adf..46b0817 100644 --- a/app/boards/shields/iris/iris.keymap +++ b/app/boards/shields/iris/iris.keymap @@ -1,3 +1,6 @@ +# Copyright (c) 2020 Pete Johanson, Kurtis Lew +# SPDX-License-Identifier: MIT + #include #include -- cgit v1.2.3 From 0ede549a13d6f79ef30ef6cb6e056ae94034ea8d Mon Sep 17 00:00:00 2001 From: CrossR Date: Thu, 3 Sep 2020 22:54:06 +0100 Subject: Fix Sofle build, update Intro page. --- app/boards/shields/sofle/sofle.dtsi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/boards') diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 653a772..bff42f6 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -50,6 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; + status = "disabled"; }; right_encoder: encoder_right { @@ -58,6 +59,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; + status = "disabled"; }; sensors { -- cgit v1.2.3 From 4ce42350e70a7e4f6b9b7ad3b262d0f00f485995 Mon Sep 17 00:00:00 2001 From: kurtis-lew Date: Fri, 4 Sep 2020 20:28:45 -0700 Subject: Update iris_right.overlay --- app/boards/shields/iris/iris_right.overlay | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/iris/iris_right.overlay b/app/boards/shields/iris/iris_right.overlay index 3f3dcb8..2d5dce8 100644 --- a/app/boards/shields/iris/iris_right.overlay +++ b/app/boards/shields/iris/iris_right.overlay @@ -12,12 +12,12 @@ &kscan0 { col-gpios - = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> ; }; -- cgit v1.2.3 From 6b433fdefd0793e836574f528445b7d4b6d781bc Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 7 Sep 2020 12:24:47 -0500 Subject: Finish DZ60RGB board definition --- app/boards/arm/dz60rgb/CMakeLists.txt | 2 -- app/boards/arm/dz60rgb/board.cmake | 3 ++- app/boards/arm/dz60rgb/dz60rgb_rev1.dts | 5 ++-- app/boards/arm/dz60rgb/dz60rgb_rev1.keymap | 25 ++++++++++++++++++ app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig | 3 --- app/boards/arm/dz60rgb/keymap/keymap.overlay | 37 --------------------------- app/boards/arm/dz60rgb/pinmux.c | 32 +++++++++++------------ 7 files changed, 46 insertions(+), 61 deletions(-) create mode 100644 app/boards/arm/dz60rgb/dz60rgb_rev1.keymap delete mode 100644 app/boards/arm/dz60rgb/keymap/keymap.overlay (limited to 'app/boards') diff --git a/app/boards/arm/dz60rgb/CMakeLists.txt b/app/boards/arm/dz60rgb/CMakeLists.txt index 6a0ec73..940af1f 100644 --- a/app/boards/arm/dz60rgb/CMakeLists.txt +++ b/app/boards/arm/dz60rgb/CMakeLists.txt @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -list(APPEND EXTRA_DTC_FLAGS "-qq") - if(CONFIG_PINMUX) zephyr_library() zephyr_library_sources(pinmux.c) diff --git a/app/boards/arm/dz60rgb/board.cmake b/app/boards/arm/dz60rgb/board.cmake index 4843c41..10f6e29 100644 --- a/app/boards/arm/dz60rgb/board.cmake +++ b/app/boards/arm/dz60rgb/board.cmake @@ -1,6 +1,7 @@ # SPDX-License-Identifier: MIT -board_runner_args(jlink "--device=STM32F303VC" "--speed=4000") +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 index 8066b5a..dc1b6ea 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts @@ -17,6 +17,7 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; }; default_transform: keymap_transform_0 { @@ -28,7 +29,7 @@ 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(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,9) RC(4,10) RC(4,11) RC(4,12) RC(4,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) >; }; @@ -55,7 +56,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4 , <&gpiob 3 GPIO_ACTIVE_HIGH> , <&gpiob 4 GPIO_ACTIVE_HIGH> , <&gpiob 5 GPIO_ACTIVE_HIGH> - , <&gpiob 6 GPIO_ACTIVE_HIGH> + , <&gpiob 8 GPIO_ACTIVE_HIGH> , <&gpiob 9 GPIO_ACTIVE_HIGH> , <&gpioc 13 GPIO_ACTIVE_HIGH> , <&gpioc 14 GPIO_ACTIVE_HIGH> 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 +#include + +/ { + 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_defconfig b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig index 5a4c099..33840f9 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig @@ -19,9 +19,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/boards/arm/dz60rgb/keymap/keymap.overlay b/app/boards/arm/dz60rgb/keymap/keymap.overlay deleted file mode 100644 index 9d83adc..0000000 --- a/app/boards/arm/dz60rgb/keymap/keymap.overlay +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -#include - -/ { - chosen { - zmk,keymap = &keymap0; - }; - - keymap0: keymap { - compatible = "zmk,keymap"; - label ="Default DZ60RGB Keymap"; - layers = <&default>; - }; - - layers { - compatible = "zmk,layers"; - - default: layer_0 { - label = "DEFAULT"; -// ------------------------------------------------------------------------------------------ -// | 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 - >; - }; - }; -}; diff --git a/app/boards/arm/dz60rgb/pinmux.c b/app/boards/arm/dz60rgb/pinmux.c index 5df5c90..60e231b 100644 --- a/app/boards/arm/dz60rgb/pinmux.c +++ b/app/boards/arm/dz60rgb/pinmux.c @@ -14,46 +14,46 @@ /* pin assignments for STM32F3DISCOVERY board */ static const struct pin_config pinconf[] = { -#ifdef CONFIG_UART_1 +#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 /* CONFIG_UART_1 */ -#ifdef CONFIG_UART_2 +#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 /* CONFIG_UART_2 */ -#ifdef CONFIG_I2C_1 +#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 /* CONFIG_I2C_1 */ -#ifdef CONFIG_I2C_2 +#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 /* CONFIG_I2C_2 */ -#ifdef CONFIG_SPI_1 +#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 /* CONFIG_SPI_1 */ -#ifdef CONFIG_SPI_2 +#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 /* CONFIG_SPI_2 */ +#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 */ -#ifdef CONFIG_CAN_1 +#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 /* CONFIG_CAN_1 */ +#endif }; static int pinmux_stm32_init(struct device *port) @@ -66,4 +66,4 @@ static int pinmux_stm32_init(struct device *port) } SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, - CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); + CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); \ No newline at end of file -- cgit v1.2.3 From e845995c2d5ea90327e68495569f7d1a25242ee2 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 7 Sep 2020 12:25:11 -0500 Subject: Fix Planck defconfig --- app/boards/arm/planck/planck_rev6_defconfig | 3 --- 1 file changed, 3 deletions(-) (limited to 'app/boards') 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 -- cgit v1.2.3 From ceda57ddfd7b49dd61e8795c37cd678b69a4a76f Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 7 Sep 2020 12:32:25 -0500 Subject: Fix comment name of keyboard --- app/boards/arm/dz60rgb/Kconfig.defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig index cfa71d3..c97a308 100644 --- a/app/boards/arm/dz60rgb/Kconfig.defconfig +++ b/app/boards/arm/dz60rgb/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Planck keyboard configuration +# DZ60RGB keyboard configuration # Copyright (c) 2020 Nick Winans # SPDX-License-Identifier: MIT -- cgit v1.2.3 From 68e72f9275401c3cb7541259c692a704cbfc5e82 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 9 Sep 2020 23:57:44 -0400 Subject: fix: Switch to single AUTHORS file.* Closes #164 --- app/boards/arm/dz60rgb/Kconfig.board | 2 +- app/boards/arm/dz60rgb/Kconfig.defconfig | 2 +- app/boards/arm/dz60rgb/dz60rgb_rev1.dts | 2 +- app/boards/arm/nrfmicro/Kconfig.board | 2 +- app/boards/arm/nrfmicro/Kconfig.defconfig | 2 +- app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi | 2 +- app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi | 2 +- app/boards/arm/nrfmicro/nrfmicro_11.dts | 2 +- app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts | 2 +- app/boards/arm/nrfmicro/nrfmicro_13.dts | 2 +- app/boards/arm/nrfmicro/pinmux.c | 2 +- app/boards/arm/planck/Kconfig.board | 2 +- app/boards/arm/planck/Kconfig.defconfig | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) (limited to 'app/boards') diff --git a/app/boards/arm/dz60rgb/Kconfig.board b/app/boards/arm/dz60rgb/Kconfig.board index a96271f..ec8dad6 100644 --- a/app/boards/arm/dz60rgb/Kconfig.board +++ b/app/boards/arm/dz60rgb/Kconfig.board @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Nick Winans +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT config BOARD_DZ60RGB_REV1 diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig index c97a308..779d312 100644 --- a/app/boards/arm/dz60rgb/Kconfig.defconfig +++ b/app/boards/arm/dz60rgb/Kconfig.defconfig @@ -1,6 +1,6 @@ # DZ60RGB keyboard configuration -# Copyright (c) 2020 Nick Winans +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT if BOARD_DZ60RGB_REV1 diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts index dc1b6ea..85c4ca5 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Nick Winans + * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ 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 -- cgit v1.2.3 From 652bb6ce05254f8168f279396a50b92d7a2182c3 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sat, 12 Sep 2020 23:48:44 -0400 Subject: feat(bluetooth): Add new settings_reset shield. * Easy to build board/image that will clear saved profile/bond information for a fresh start for keyboards. --- .../shields/settings_reset/Kconfig.defconfig | 10 +++++++++ app/boards/shields/settings_reset/Kconfig.shield | 5 +++++ .../shields/settings_reset/settings_reset.conf | 1 + .../shields/settings_reset/settings_reset.keymap | 22 ++++++++++++++++++++ .../shields/settings_reset/settings_reset.overlay | 24 ++++++++++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 app/boards/shields/settings_reset/Kconfig.defconfig create mode 100644 app/boards/shields/settings_reset/Kconfig.shield create mode 100644 app/boards/shields/settings_reset/settings_reset.conf create mode 100644 app/boards/shields/settings_reset/settings_reset.keymap create mode 100644 app/boards/shields/settings_reset/settings_reset.overlay (limited to 'app/boards') diff --git a/app/boards/shields/settings_reset/Kconfig.defconfig b/app/boards/shields/settings_reset/Kconfig.defconfig new file mode 100644 index 0000000..6d050cb --- /dev/null +++ b/app/boards/shields/settings_reset/Kconfig.defconfig @@ -0,0 +1,10 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_SETTINGS_RESET + +config ZMK_KEYBOARD_NAME + default "SETTINGS RESET" + +endif + diff --git a/app/boards/shields/settings_reset/Kconfig.shield b/app/boards/shields/settings_reset/Kconfig.shield new file mode 100644 index 0000000..b5ce97f --- /dev/null +++ b/app/boards/shields/settings_reset/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_SETTINGS_RESET + def_bool $(shields_list_contains,settings_reset) diff --git a/app/boards/shields/settings_reset/settings_reset.conf b/app/boards/shields/settings_reset/settings_reset.conf new file mode 100644 index 0000000..8052a6c --- /dev/null +++ b/app/boards/shields/settings_reset/settings_reset.conf @@ -0,0 +1 @@ +CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START=y diff --git a/app/boards/shields/settings_reset/settings_reset.keymap b/app/boards/shields/settings_reset/settings_reset.keymap new file mode 100644 index 0000000..0523644 --- /dev/null +++ b/app/boards/shields/settings_reset/settings_reset.keymap @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &reset + >; + }; + }; +}; + + diff --git a/app/boards/shields/settings_reset/settings_reset.overlay b/app/boards/shields/settings_reset/settings_reset.overlay new file mode 100644 index 0000000..a2b5799 --- /dev/null +++ b/app/boards/shields/settings_reset/settings_reset.overlay @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; + + input-gpios + = <&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + +}; + -- cgit v1.2.3 From 191a2d755ad4761bd04a30a113e05119ad7aa61e Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sun, 13 Sep 2020 22:53:24 -0400 Subject: chore: clang-format the codebase. * Use the LLVM style * Override indent width (8) and column limit (100) * Fixes #142. --- app/boards/arm/dz60rgb/pinmux.c | 54 +++++++++++++++++++--------------------- app/boards/arm/nrfmicro/pinmux.c | 27 ++++++++++---------- app/boards/arm/planck/pinmux.c | 52 +++++++++++++++++++------------------- app/boards/arm/proton_c/pinmux.c | 54 +++++++++++++++++++--------------------- 4 files changed, 90 insertions(+), 97 deletions(-) (limited to 'app/boards') diff --git a/app/boards/arm/dz60rgb/pinmux.c b/app/boards/arm/dz60rgb/pinmux.c index 60e231b..f59a31b 100644 --- a/app/boards/arm/dz60rgb/pinmux.c +++ b/app/boards/arm/dz60rgb/pinmux.c @@ -15,55 +15,53 @@ /* 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}, + {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}, + {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}, + {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}, + {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}, + {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}, + {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}, + {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}, + {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 */ + {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}, + {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); +static int pinmux_stm32_init(struct device *port) { + ARG_UNUSED(port); - stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); + stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); - return 0; + return 0; } -SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, - CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); \ No newline at end of file +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/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c index 0536fe0..4e330b6 100644 --- a/app/boards/arm/nrfmicro/pinmux.c +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -11,31 +11,30 @@ #include #include -static int pinmux_nrfmicro_init(struct device *port) -{ - ARG_UNUSED(port); +static int pinmux_nrfmicro_init(struct device *port) { + ARG_UNUSED(port); - struct device *p1 = device_get_binding("GPIO_1"); + struct device *p1 = device_get_binding("GPIO_1"); #if CONFIG_BOARD_NRFMICRO_13 - struct device *p0 = device_get_binding("GPIO_0"); - // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) - gpio_pin_configure(p1, 9, GPIO_OUTPUT); - gpio_pin_set(p1, 9, 0); + struct device *p0 = device_get_binding("GPIO_0"); + // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) + gpio_pin_configure(p1, 9, GPIO_OUTPUT); + gpio_pin_set(p1, 9, 0); #if CONFIG_BOARD_NRFMICRO_CHARGER - gpio_pin_configure(p0, 5, GPIO_OUTPUT); - gpio_pin_set(p0, 5, 0); + gpio_pin_configure(p0, 5, GPIO_OUTPUT); + gpio_pin_set(p0, 5, 0); #else - gpio_pin_configure(p0, 5, GPIO_INPUT); + gpio_pin_configure(p0, 5, GPIO_INPUT); #endif #else // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) - gpio_pin_configure(p1, 9, GPIO_OUTPUT); - gpio_pin_set(p1, 9, 1); + gpio_pin_configure(p1, 9, GPIO_OUTPUT); + gpio_pin_set(p1, 9, 1); #endif - return 0; + return 0; } SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); diff --git a/app/boards/arm/planck/pinmux.c b/app/boards/arm/planck/pinmux.c index 5df5c90..61cc16a 100644 --- a/app/boards/arm/planck/pinmux.c +++ b/app/boards/arm/planck/pinmux.c @@ -15,55 +15,53 @@ /* pin assignments for STM32F3DISCOVERY board */ static const struct pin_config pinconf[] = { #ifdef CONFIG_UART_1 - {STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX}, - {STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX}, + {STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX}, + {STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX}, #endif /* CONFIG_UART_1 */ #ifdef CONFIG_UART_2 - {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, - {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, + {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, + {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, #endif /* CONFIG_UART_2 */ #ifdef CONFIG_I2C_1 - {STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL}, - {STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA}, + {STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL}, + {STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA}, #endif /* CONFIG_I2C_1 */ #ifdef CONFIG_I2C_2 - {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL}, - {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA}, + {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL}, + {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA}, #endif /* CONFIG_I2C_2 */ #ifdef CONFIG_SPI_1 #ifdef CONFIG_SPI_STM32_USE_HW_SS - {STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS}, + {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}, + {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 /* CONFIG_SPI_1 */ #ifdef CONFIG_SPI_2 #ifdef CONFIG_SPI_STM32_USE_HW_SS - {STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS}, + {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}, + {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 /* CONFIG_SPI_2 */ #ifdef CONFIG_USB_DC_STM32 - {STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM}, - {STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP}, + {STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM}, + {STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP}, #endif /* CONFIG_USB_DC_STM32 */ #ifdef CONFIG_CAN_1 - {STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX}, - {STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX}, + {STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX}, + {STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX}, #endif /* CONFIG_CAN_1 */ }; -static int pinmux_stm32_init(struct device *port) -{ - ARG_UNUSED(port); +static int pinmux_stm32_init(struct device *port) { + ARG_UNUSED(port); - stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); + stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); - return 0; + return 0; } -SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, - CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); +SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); diff --git a/app/boards/arm/proton_c/pinmux.c b/app/boards/arm/proton_c/pinmux.c index a6aaae0..9ffabd7 100644 --- a/app/boards/arm/proton_c/pinmux.c +++ b/app/boards/arm/proton_c/pinmux.c @@ -15,55 +15,53 @@ /* 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}, + {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}, + {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}, + {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}, + {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}, + {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}, + {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}, + {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}, + {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 */ + {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}, + {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); +static int pinmux_stm32_init(struct device *port) { + ARG_UNUSED(port); - stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); + stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); - return 0; + return 0; } -SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, - CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); +SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); -- cgit v1.2.3 From 7b12dc6caf7517aa95d66fadb529c260be752ff5 Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 13 Sep 2020 23:29:31 -0500 Subject: feature(board): add BT prof management to defaults --- app/boards/shields/corne/corne.keymap | 11 ++++++----- app/boards/shields/iris/iris.keymap | 13 +++++++------ app/boards/shields/lily58/lily58.keymap | 13 +++++++------ app/boards/shields/qaz/qaz.keymap | 3 ++- app/boards/shields/romac/romac.keymap | 17 +++++++++-------- app/boards/shields/sofle/sofle.keymap | 13 +++++++------ 6 files changed, 38 insertions(+), 32 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/corne/corne.keymap b/app/boards/shields/corne/corne.keymap index c0bbb4a..5f0f15f 100644 --- a/app/boards/shields/corne/corne.keymap +++ b/app/boards/shields/corne/corne.keymap @@ -1,5 +1,6 @@ #include #include +#include / { keymap { @@ -21,14 +22,14 @@ lower_layer { // ----------------------------------------------------------------------------------------- // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | -// | CTRL | | | | | | | LFT | DWN | UP | RGT | | | +// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | // | SHFT | | | | | | | | | | | | | // | GUI | | SPC | | ENT | | ALT | 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 BKSP - &kp LCTL &trans &trans &trans &trans &trans &kp LARW &kp DARW &kp UARW &kp RARW &trans &trans - &kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &kp LGUI &trans &kp SPC &kp RET &trans &kp RALT + &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 BKSP + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LARW &kp DARW &kp UARW &kp RARW &trans &trans + &kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp LGUI &trans &kp SPC &kp RET &trans &kp RALT >; }; diff --git a/app/boards/shields/iris/iris.keymap b/app/boards/shields/iris/iris.keymap index 46b0817..3bd74ed 100644 --- a/app/boards/shields/iris/iris.keymap +++ b/app/boards/shields/iris/iris.keymap @@ -3,6 +3,7 @@ #include #include +#include / { keymap { @@ -26,17 +27,17 @@ lower_layer { // ------------------------------------------------------------------------------------------------------------ -// | | | | | | | | | | | | | | +// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | // | | | | | | | | | | | _ | + | { | } | "|" | // | | | | | | | | bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&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 GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD -&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE - &trans &trans &trans &trans &trans &trans +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans +&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 GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD +&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE + &trans &trans &trans &trans &trans &trans >; }; diff --git a/app/boards/shields/lily58/lily58.keymap b/app/boards/shields/lily58/lily58.keymap index afd2694..61c19f8 100644 --- a/app/boards/shields/lily58/lily58.keymap +++ b/app/boards/shields/lily58/lily58.keymap @@ -1,5 +1,6 @@ #include #include +#include / { keymap { @@ -25,17 +26,17 @@ lower_layer { // ------------------------------------------------------------------------------------------------------------ -// | | | | | | | | | | | | | | +// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | // | | | | | | | | | | | _ | + | { | } | "|" | // | | | | | | | | | | bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&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 GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD -&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE - &trans &trans &trans &trans &trans &trans &trans &trans +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans +&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 GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD +&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE + &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>; diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index ffa2f6c..07cd90e 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -6,6 +6,7 @@ #include #include +#include #define DEFAULT 0 #define NUM_SYM 1 @@ -34,7 +35,7 @@ nav { bindings = < - &none &none &none &none &none &none &none &kp UARW &none &kp BKSP + &bt BT_CLR &bt BT_NXT &bt BT_PRV &none &none &none &none &kp UARW &none &kp BKSP &trans &trans &trans &trans &none &none &kp LARW &kp DARW &kp RARW &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &trans &trans &kp RET &trans &kp FSLH diff --git a/app/boards/shields/romac/romac.keymap b/app/boards/shields/romac/romac.keymap index f94a829..97ea9c5 100644 --- a/app/boards/shields/romac/romac.keymap +++ b/app/boards/shields/romac/romac.keymap @@ -6,6 +6,7 @@ #include #include +#include / { keymap { @@ -28,16 +29,16 @@ nav_layer { // ----------------------- -// | _ | HOME | PGUP | -// | _ | END | PGDN | -// | _ | _ | _ | -// | _ | _ | RET | +// | BTNXT | HOME | PGUP | +// | BTPRV | END | PGDN | +// | BTCLR | _ | _ | +// | _ | _ | RET | // ----------------------- bindings = < - &trans &kp HOME &kp PGUP - &trans &kp END &kp PGDN - &trans &trans &trans - &trans &trans &kp RET + &bt BT_NXT &kp HOME &kp PGUP + &bt BT_PRV &kp END &kp PGDN + &bt BT_CLR &trans &trans + &trans &trans &kp RET >; }; }; diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index aadffa1..1cbe742 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -1,5 +1,6 @@ #include #include +#include / { keymap { @@ -44,17 +45,17 @@ raise_layer { // ------------------------------------------------------------------------------------------------------------ -// | | | | | | | | | | | | | | +// |BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | | INS | PSCR | GUI | | | | PGUP | | ^ | | | | // | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC | // | | UNDO | CUT | COPY | PASTE | | | | | | | | | | | // | | | | | | | | | | | | bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &kp INS &kp PRSC &kp GUI &trans &trans &kp PGUP &trans &kp UARW &trans &kp NUM_0 &trans -&trans &kp LALT &kp LCTL &kp LSFT &trans &kp CLCK &kp PGDN &kp LARW &kp DARW &kp RARW &kp DEL &kp BKSP -&trans &kp UNDO &kp CUT &kp COPY &kp PSTE &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans +&trans &kp INS &kp PRSC &kp GUI &trans &trans &kp PGUP &trans &kp UARW &trans &kp NUM_0 &trans +&trans &kp LALT &kp LCTL &kp LSFT &trans &kp CLCK &kp PGDN &kp LARW &kp DARW &kp RARW &kp DEL &kp BKSP +&trans &kp UNDO &kp CUT &kp COPY &kp PSTE &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD &inc_dec_kp PGUP PGDN>; -- cgit v1.2.3 From fc167f5f5ede2049f5d7649353b456e36c9f0be3 Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Mon, 14 Sep 2020 07:39:42 -0500 Subject: Update QAZ keymap for bluetooth config options and homerow hold-taps --- app/boards/shields/qaz/qaz.keymap | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index 07cd90e..1bcaba6 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -4,6 +4,7 @@ * SPDX-License-Identifier: MIT */ +#include #include #include #include @@ -11,7 +12,20 @@ #define DEFAULT 0 #define NUM_SYM 1 #define NAV 2 - + +/ { + behaviors { + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "homerow mods"; + #binding-cells = <2>; + tapping_term_ms = <225>; + flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; + }; + }; +}; + / { keymap { compatible = "zmk,keymap"; @@ -19,9 +33,9 @@ default_layer { bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P - &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp RET + &hm LGUI A &hm LALT S &hm LCTL D &hm LSFT F &kp G &kp H &hm RSFT J &hm RCTL K &hm RALT L &hm RGUI RET &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT - &kp LSFT &kp LGUI &kp LALT &mo NAV &kp SPC &mo NUM_SYM &kp QUOT &kp FSLH + &kp LSFT &kp LGUI &kp LALT < NAV RET < NUM_SYM SPC &kp COLN &kp QUOT &kp FSLH >; }; num_sym { @@ -38,7 +52,7 @@ &bt BT_CLR &bt BT_NXT &bt BT_PRV &none &none &none &none &kp UARW &none &kp BKSP &trans &trans &trans &trans &none &none &kp LARW &kp DARW &kp RARW &none &none &none &none &none &none &none &none &none &none - &none &none &none &none &none &trans &trans &kp RET &trans &kp FSLH + &bt BT_CLR &bt BT_NXT &none &trans &trans &kp RET &trans &kp FSLH >; }; }; -- cgit v1.2.3 From 63e105db908dbae529c44a76c7f29622574f188c Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Mon, 14 Sep 2020 08:45:31 -0500 Subject: Revising keymap to jive with upstream changes --- app/boards/shields/qaz/qaz.keymap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index 1bcaba6..8781428 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -52,7 +52,7 @@ &bt BT_CLR &bt BT_NXT &bt BT_PRV &none &none &none &none &kp UARW &none &kp BKSP &trans &trans &trans &trans &none &none &kp LARW &kp DARW &kp RARW &none &none &none &none &none &none &none &none &none &none - &bt BT_CLR &bt BT_NXT &none &trans &trans &kp RET &trans &kp FSLH + &none &none &none &trans &trans &kp RET &trans &kp FSLH >; }; }; -- cgit v1.2.3 From 62c47b1981f27bdcbdecb7aa3b704d665785ed2b Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Mon, 14 Sep 2020 08:46:07 -0500 Subject: Remove duplicate include --- app/boards/shields/qaz/qaz.keymap | 1 - 1 file changed, 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index 8781428..5ad9628 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -4,7 +4,6 @@ * SPDX-License-Identifier: MIT */ -#include #include #include #include -- cgit v1.2.3 From 42c42ccbbd114641c596d795a196307cf36aea5d Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Mon, 14 Sep 2020 09:25:31 -0500 Subject: Fixed some space/tab issues as well as updated copyright statements --- app/boards/shields/qaz/Kconfig.defconfig | 4 ++-- app/boards/shields/qaz/Kconfig.shield | 8 ++++---- app/boards/shields/qaz/qaz.keymap | 16 ++++++++-------- app/boards/shields/qaz/qaz.overlay | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/qaz/Kconfig.defconfig b/app/boards/shields/qaz/Kconfig.defconfig index f82f458..c84180b 100644 --- a/app/boards/shields/qaz/Kconfig.defconfig +++ b/app/boards/shields/qaz/Kconfig.defconfig @@ -1,5 +1,5 @@ - # Copyright (c) 2020 TJ Campie - # SPDX-License-Identifier: MIT +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT if SHIELD_QAZ diff --git a/app/boards/shields/qaz/Kconfig.shield b/app/boards/shields/qaz/Kconfig.shield index 9da6077..32c443c 100644 --- a/app/boards/shields/qaz/Kconfig.shield +++ b/app/boards/shields/qaz/Kconfig.shield @@ -1,5 +1,5 @@ -# Copyright (c) 2020 TJ Campie +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT - - config SHIELD_MY_BOARD - def_bool $(shields_list_contains,qaz) + +config SHIELD_MY_BOARD + def_bool $(shields_list_contains,qaz) diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index 5ad9628..3622972 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -1,6 +1,6 @@ /* - * Copyright (c) 2020 TJ Campie - * + * Copyright (c) 2020 The ZMK Contributors + * * SPDX-License-Identifier: MIT */ @@ -14,13 +14,13 @@ / { behaviors { - hm: homerow_mods { - compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; - #binding-cells = <2>; - tapping_term_ms = <225>; + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "homerow mods"; + #binding-cells = <2>; + tapping_term_ms = <225>; flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; + bindings = <&kp>, <&kp>; }; }; }; diff --git a/app/boards/shields/qaz/qaz.overlay b/app/boards/shields/qaz/qaz.overlay index 472005b..4e73370 100644 --- a/app/boards/shields/qaz/qaz.overlay +++ b/app/boards/shields/qaz/qaz.overlay @@ -1,6 +1,6 @@ /* - * Copyright (c) 2020 TJ Campie - * + * Copyright (c) 2020 The ZMK Contributors + * * SPDX-License-Identifier: MIT */ -- cgit v1.2.3 From 0bf4467729f3bf560a04e51900489d81fe129376 Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Mon, 14 Sep 2020 09:35:57 -0500 Subject: Update Kconfig.shield --- app/boards/shields/qaz/Kconfig.shield | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/qaz/Kconfig.shield b/app/boards/shields/qaz/Kconfig.shield index 32c443c..7cc8f1e 100644 --- a/app/boards/shields/qaz/Kconfig.shield +++ b/app/boards/shields/qaz/Kconfig.shield @@ -1,5 +1,5 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -config SHIELD_MY_BOARD +config SHIELD_QAZ def_bool $(shields_list_contains,qaz) -- cgit v1.2.3