Merge commit '61b249666b13f7f356c0e77ee5eb500d672d7dce' into boards/dz60rgb

This commit is contained in:
Nick 2020-09-07 12:22:18 -05:00
commit fa40558f73
348 changed files with 8512 additions and 2566 deletions

View file

@ -8,18 +8,26 @@ jobs:
name: Build Test
strategy:
matrix:
board: [proton_c, nice_nano]
board: [proton_c, nice_nano, bluemicro840_v1, nrfmicro_13]
shield:
- corne_left
- corne_right
- kyria_left
- kyria_right
- lily58_left
- lily58_right
- romac
include:
- board: proton_c
shield: clueboard_california
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
timeout-minutes: 2
continue-on-error: true
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
@ -29,11 +37,11 @@ jobs:
tools/
zephyr/
bootloader/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
key: 2-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
2-${{ runner.os }}-build-${{ env.cache-name }}-
2-${{ runner.os }}-build-
2-${{ runner.os }}-
- name: West Init
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-init

70
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,70 @@
on:
push:
paths:
- "app/tests/**"
- "app/src/**"
pull_request:
paths:
- "app/tests/**"
- "app/src/**"
name: Test
jobs:
integration_test:
runs-on: ubuntu-latest
name: Integration Tests
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
timeout-minutes: 2
continue-on-error: true
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
key: 2-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
restore-keys: |
2-${{ runner.os }}-build-${{ env.cache-name }}-
2-${{ runner.os }}-build-
2-${{ runner.os }}-
- name: West Init
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-init
with:
args: 'init "-l app"'
- name: West Update
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-update
with:
args: "update"
- name: West Config Zephyr Base
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-config
with:
args: 'config "--global zephyr.base-prefer configfile"'
- name: West Zephyr Export
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-zephyr-export
with:
args: "zephyr-export"
- name: Test All
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-build
with:
entrypoint: /bin/bash
args: '-c "cd app && ./run-test.sh all"'
- name: Archive Build
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: "log-files"
path: app/build/**/*.log

View file

@ -1,5 +1,6 @@
{
"files.associations": {
"*.overlay": "dts"
"*.overlay": "dts",
"*.keymap": "dts"
}
}

View file

@ -4,11 +4,11 @@
[![Build](https://github.com/zmkfirmware/zmk/workflows/Build/badge.svg)](https://github.com/zmkfirmware/zmk/actions)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
This project is a complete work in progress, with absolutely nothing functioning yet. The goal is to explore a new MK firmware
This project is a complete work in progress, with only basic things functioning. The goal is to explore a new MK firmware
with a less restritive license and better BLE support, built on top of the [Zephyr™ Project](https://www.zephyrproject.org/)
Check out the website to learn more: https://zmkfirmware.dev/
You can also come join our [ZMK Discord Server](https://zmkfirmware.dev/community/discord/invite)
To review planned features, check out the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub.
To review planned features, check out the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.

View file

@ -1,4 +1,3 @@
# Find Zephyr. This also loads Zephyr's build system.
cmake_minimum_required(VERSION 3.13.1)
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
@ -15,13 +14,10 @@ list(APPEND SYSCALL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/drivers/zephyr)
include(cmake/zmk_config.cmake)
# Find Zephyr. This also loads Zephyr's build system.
find_package(Zephyr REQUIRED HINTS ../zephyr)
project(zmk)
if(EXISTS ${KEYMAP_DIR}/keymap.c)
target_sources(app PRIVATE ${KEYMAP_DIR}/keymap.c)
endif()
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
# Add your source file to the "app" target. This must come after
@ -29,8 +25,6 @@ zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
target_include_directories(app PRIVATE include)
target_sources(app PRIVATE src/kscan.c)
target_sources(app PRIVATE src/matrix_transform.c)
target_sources(app PRIVATE src/keymap.c)
target_sources(app PRIVATE src/hid_listener.c)
target_sources(app PRIVATE src/hid.c)
target_sources(app PRIVATE src/sensors.c)
target_sources_ifdef(CONFIG_ZMK_DISPLAY app PRIVATE src/display.c)
@ -41,12 +35,16 @@ target_sources(app PRIVATE src/events/modifiers_state_changed.c)
target_sources(app PRIVATE src/events/sensor_event.c)
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
target_sources(app PRIVATE src/behaviors/behavior_mod_tap.c)
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
target_sources(app PRIVATE src/behaviors/behavior_none.c)
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
target_sources(app PRIVATE src/keymap.c)
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble.c)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble_unpair_combo.c)
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL app PRIVATE src/split_listener.c)
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL app PRIVATE src/split/bluetooth/service.c)
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL app PRIVATE src/split/bluetooth/central.c)
@ -56,5 +54,7 @@ target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/hog.c)
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
target_sources(app PRIVATE src/endpoints.c)
target_sources(app PRIVATE src/hid_listener.c)
target_sources(app PRIVATE src/main.c)
zephyr_cc_option(-Wfatal-errors)

View file

@ -41,7 +41,7 @@ menuconfig ZMK_BLE
select BT_GATT_DIS
select BT_GATT_BAS
select SETTINGS
select BT_SETTINGS
# select BT_SETTINGS
if ZMK_BLE
@ -88,6 +88,7 @@ config ZMK_SPLIT_BLE
bool "Split keyboard support via BLE transport"
depends on ZMK_BLE
default y
select BT_USER_PHY_UPDATE
if ZMK_SPLIT_BLE
@ -105,6 +106,10 @@ if ZMK_SPLIT_BLE_ROLE_CENTRAL
config BT_MAX_CONN
default 5
config BT_MAX_PAIRED
# Bump this everywhere once we support switching active connections!
default 2
endif
config ZMK_SPLIT_BLE_ROLE_PERIPHERAL
@ -119,6 +124,9 @@ config ZMK_USB
config BT_MAX_CONN
default 5
config BT_GAP_AUTO_UPDATE_CONN_PARAMS
default n
endif
endchoice
@ -185,6 +193,10 @@ source "subsys/logging/Kconfig.template.log_config"
rsource "boards/Kconfig"
rsource "boards/shields/*/Kconfig.defconfig"
rsource "boards/shields/*/Kconfig.shield"
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig"
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
source "Kconfig.zephyr"

View file

@ -0,0 +1,8 @@
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
-c
-b 0x26000
-f 0xADA52840
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
)

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_BLUEMICRO840_V1

View file

@ -0,0 +1,8 @@
# BlueMicro840 board configuration
# Copyright (c) 2020 Pete Johanson, Derek Schmell
# SPDX-License-Identifier: MIT
config BOARD_BLUEMICRO840_V1
bool "BlueMicro840_V1"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,30 @@
# BlueMicro840 board configuration
# Copyright (c) 2020 Pete Johanson, Derek Schmell
# SPDX-License-Identifier: MIT
if BOARD_BLUEMICRO840_V1
config BOARD
default "bluemicro840_v1"
if USB
config USB_NRFX
default y
config USB_DEVICE_STACK
default y
endif # USB
config BT_CTLR
default BT
config ZMK_BLE
default y
config ZMK_USB
default y
endif # BOARD_BLUEMICRO840_V1

View file

@ -0,0 +1,52 @@
/*
* Copyright (c) 2020 Derek Schmell
*
* SPDX-License-Identifier: MIT
*/
/ {
pro_micro_d: connector_d {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 8 0> /* D0 D2 */
, <1 0 &gpio0 6 0> /* D1 D3*/
, <2 0 &gpio0 15 0> /* D2 D1*/
, <3 0 &gpio0 17 0> /* D3 D0*/
, <4 0 &gpio0 20 0> /* D4/A6 D4*/
, <5 0 &gpio0 13 0> /* D5 C6*/
, <6 0 &gpio0 24 0> /* D6/A7 D7*/
, <7 0 &gpio0 9 0> /* D7 E6*/
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
, <16 0 &gpio0 28 0> /* D16 B2*/
, <14 0 &gpio0 3 0> /* D14 B3*/
, <15 0 &gpio1 13 0> /* D15 B1*/
;
};
pro_micro_a: connector_a {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 2 0> /* A0 F7*/
, <1 0 &gpio0 29 0> /* A1 F6*/
, <2 0 &gpio0 26 0> /* A2 F5*/
, <3 0 &gpio0 30 0> /* A3 F4*/
, <6 0 &gpio0 20 0> /* D4/A6 D4*/
, <7 0 &gpio0 24 0> /* D6/A7 D7*/
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
, <10 0 &gpio1 13 0> /* D10/A10 B6*/
;
};
};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {};

View file

@ -0,0 +1,96 @@
/*
* Copyright (c) 2020 Pete Johanson, Derek Schmell
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
/ {
model = "BlueMicro840_V1";
compatible = "bluemicro840,v1";
chosen {
zephyr,code-partition = &code_partition;
// zephyr,console = &uart0;
//zephyr,bt-mon-uart = &uart0;
//zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
tx-pin = <39>;
rx-pin = <34>;
rts-pin = <33>;
cts-pin = <12>;
};
&usbd {
status = "okay";
};
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "adafruit_boot";
reg = <0x000000000 0x0000C000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000d2000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};

View file

@ -0,0 +1,15 @@
identifier: bluemicro840_v1
name: BlueMicro840_V1
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,20 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BLUEMICRO840_V1=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_NICE_NANO

View file

@ -6,3 +6,4 @@
config BOARD_NICE_NANO
bool "nice!nano"
depends on SOC_NRF52840_QIAA

View file

@ -1,5 +1,3 @@
# Electronut Labs Papyr board configuration
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT

View file

@ -1,4 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)

View file

@ -24,7 +24,7 @@
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
@ -39,13 +39,6 @@
status = "okay";
};
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <115200>;
tx-pin = <6>;
rx-pin = <8>;
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;

View file

@ -0,0 +1,14 @@
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
-c
-b 0x26000
-f 0xADA52840
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
)
if(CONFIG_PINMUX)
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
endif()

View file

@ -0,0 +1,10 @@
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13)
config BOARD_NRFMICRO_CHARGER
bool "Enable battery charger"
default y
depends on (BOARD_NRFMICRO_13)

View file

@ -0,0 +1,16 @@
# nrfmicro board configuration
# Copyright (c) 2020 Okke Formsma, joric
# SPDX-License-Identifier: MIT
config BOARD_NRFMICRO_11
bool "nrfmicro_11"
depends on SOC_NRF52840_QIAA
config BOARD_NRFMICRO_11_FLIPPED
bool "nrfmicro_11_flipped"
depends on SOC_NRF52840_QIAA
config BOARD_NRFMICRO_13
bool "nrfmicro_13"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,40 @@
# Electronut Labs Papyr board configuration
# Copyright (c) 2020 Okke Formsma, joric
# SPDX-License-Identifier: MIT
if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
config BOARD
default "nrfmicro"
if USB
config USB_NRFX
default y
config USB_DEVICE_STACK
default y
endif # USB
config BT_CTLR
default BT
config ZMK_BLE
default y
config ZMK_USB
default y
config PINMUX
default y
if BOARD_NRFMICRO_13
config BOARD_NRFMICRO_CHARGER
default y
endif # BOARD_NRFMICRO_13
endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13

View file

@ -0,0 +1,54 @@
/*
* Copyright (c) 2020 Okke Formsma, joric
*
* SPDX-License-Identifier: MIT
*/
/ {
pro_micro_d: connector_d {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 8 0> /* D0 */
, <1 0 &gpio0 6 0> /* D1 */
, <2 0 &gpio0 15 0> /* D2 */
, <3 0 &gpio0 17 0> /* D3 */
, <4 0 &gpio0 20 0> /* D4/A6 */
, <5 0 &gpio0 13 0> /* D5 */
, <6 0 &gpio0 24 0> /* D6/A7 */
, <7 0 &gpio0 9 0> /* D7 */
, <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */
, <16 0 &gpio0 28 0> /* D16 */
, <14 0 &gpio0 3 0> /* D14 */
, <15 0 &gpio1 13 0> /* D15 */
;
};
pro_micro_a: connector_a {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 2 0> /* A0 */
, <1 0 &gpio0 29 0> /* A1 */
, <2 0 &gpio0 31 0> /* A2 */
, <3 0 &gpio0 30 0> /* A3 */
, <6 0 &gpio0 20 0> /* D4/A6 */
, <7 0 &gpio0 24 0> /* D6/A7 */
, <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */
;
};
};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {};

View file

@ -0,0 +1,52 @@
/*
* Copyright (c) 2020 Okke Formsma, joric
*
* SPDX-License-Identifier: MIT
*/
/ {
pro_micro_d: connector_d {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 8 0> /* D0 */
, <1 0 &gpio0 6 0> /* D1 */
, <2 0 &gpio0 30 0> /* D2 */
, <3 0 &gpio0 31 0> /* D3 */
, <4 0 &gpio0 29 0> /* D4/A6 */
, <5 0 &gpio0 2 0> /* D5 */
, <6 0 &gpio1 13 0> /* D6/A7 */
, <7 0 &gpio0 3 0> /* D7 */
, <8 0 &gpio0 28 0> /* D8/A8 */
, <9 0 &gpio1 11 0> /* D9/A9 */
, <10 0 &gpio1 6 0> /* D10/A10 */
, <16 0 &gpio0 10 0> /* D16 */
, <14 0 &gpio0 9 0> /* D14 */
, <15 0 &gpio0 24 0> /* D15 */
;
};
pro_micro_a: connector_a {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 13 0> /* A0 */
, <1 0 &gpio0 20 0> /* A1 */
, <2 0 &gpio0 17 0> /* A2 */
, <3 0 &gpio0 15 0> /* A3 */
, <6 0 &gpio0 29 0> /* D4/A6 */
, <7 0 &gpio1 13 0> /* D6/A7 */
, <8 0 &gpio0 28 0> /* D8/A8 */
, <9 0 &gpio1 11 0> /* D9/A9 */
, <10 0 &gpio1 6 0> /* D10/A10 */
;
};
};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {};

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)

View file

@ -0,0 +1,93 @@
/*
* Copyright (c) 2020 Okke Formsma, joric
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
/ {
model = "nrfmicro";
compatible = "joric,nrfmicro";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
tx-pin = <39>;
rx-pin = <34>;
rts-pin = <33>;
cts-pin = <12>;
};
&usbd {
status = "okay";
};
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "adafruit_boot";
reg = <0x000000000 0x0000C000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000d2000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};

View file

@ -0,0 +1,15 @@
identifier: nrfmicro_11
name: nrfmicro_11
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,22 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_NRFMICRO_11=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

View file

@ -0,0 +1,93 @@
/*
* Copyright (c) 2020 Okke Formsma, joric
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins_flipped.dtsi"
/ {
model = "nrfmicro";
compatible = "joric,nrfmicro";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <30>;
scl-pin = <31>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
tx-pin = <39>;
rx-pin = <34>;
rts-pin = <33>;
cts-pin = <12>;
};
&usbd {
status = "okay";
};
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "adafruit_boot";
reg = <0x000000000 0x0000C000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000d2000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};

View file

@ -0,0 +1,15 @@
identifier: nrfmicro_11_flipped
name: nrfmicro_11_flipped
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,22 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_NRFMICRO_11_FLIPPED=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

View file

@ -0,0 +1,93 @@
/*
* Copyright (c) 2020 Okke Formsma, joric
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
/ {
model = "nrfmicro";
compatible = "joric,nrfmicro";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
tx-pin = <39>;
rx-pin = <34>;
rts-pin = <33>;
cts-pin = <12>;
};
&usbd {
status = "okay";
};
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "adafruit_boot";
reg = <0x000000000 0x0000C000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000d2000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};

View file

@ -0,0 +1,15 @@
identifier: nrfmicro_13
name: nrfmicro_13
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,22 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_NRFMICRO_13=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

View file

@ -0,0 +1,41 @@
/*
* Copyright (c) 2020 Okke Formsma, joric
*
* SPDX-License-Identifier: MIT
*/
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <drivers/gpio.h>
#include <sys/sys_io.h>
#include <devicetree.h>
static int pinmux_nrfmicro_init(struct device *port)
{
ARG_UNUSED(port);
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);
#if CONFIG_BOARD_NRFMICRO_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);
gpio_pin_set(p1, 9, 1);
#endif
return 0;
}
SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);

View file

@ -1,23 +1,11 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/matrix-transform.h>
/ {
chosen {
zmk,keymap = &keymap0;
};
keymap0: keymap {
keymap {
compatible = "zmk,keymap";
label ="Default Planck Keymap";
layers = <&default>;
};
layers {
compatible = "zmk,layers";
default: layer_0 {
label = "DEFAULT";
default_layer {
// -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC |
// | ESC | A | S | D | F | G | H | J | K | L | ; | ' |

View file

@ -1,4 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
if(CONFIG_PINMUX)
zephyr_library()

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2017 I-SENSE group of ICCS
*
* SPDX-License-Identifier: Apache-2.0
* SPDX-License-Identifier: MIT
*/
#include <kernel.h>

View file

@ -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

View file

@ -1,79 +1,18 @@
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <zmk/kscan-mock.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/kscan-mock.h>
/ {
chosen {
zmk,kscan = &kscan0;
zmk,keymap = &keymap0;
zmk,kscan = &kscan;
};
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>;
};
};
left_hand: kscan_1 {
kscan: kscan {
compatible = "zmk,kscan-mock";
label = "KSCAN_LEFT";
label = "KSCAN_MOCK";
rows = <2>;
columns = <2>;
events = <ZMK_MOCK_PRESS(0,1,300) ZMK_MOCK_PRESS(0,0,300) ZMK_MOCK_RELEASE(0,0,300) ZMK_MOCK_RELEASE(0,1,300)>;
// events = <ZMK_MOCK_PRESS(0,0,800) ZMK_MOCK_RELEASE(0,0,800) ZMK_MOCK_PRESS(0,1,800) ZMK_MOCK_RELEASE(0,1,800)>;
};
right_hand: kscan_2 {
compatible = "zmk,kscan-mock";
label = "KSCAN_RIGHT";
rows = <2>;
columns = <2>;
events = <ZMK_MOCK_PRESS(1,1,800) ZMK_MOCK_RELEASE(1,1,100) ZMK_MOCK_PRESS(0,1,800) ZMK_MOCK_RELEASE(0,1,100)>;
};
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;
};
};

View file

@ -1,23 +1,11 @@
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/matrix-transform.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
chosen {
zmk,keymap = &keymap0;
};
keymap0: keymap {
compatible = "zmk,keymap";
label ="Default Kyria Keymap";
layers = <&default>;
};
layers {
compatible = "zmk,layers";
default: layer_0 {
label = "DEFAULT";
default_layer {
bindings = <
&kp NUM_9 &kp NUM_8
&kp NUM_7 &kp NUM_6

View file

@ -0,0 +1,58 @@
if SHIELD_CORNE_LEFT
config ZMK_KEYBOARD_NAME
default "Corne Left"
endif
if SHIELD_CORNE_RIGHT
config ZMK_KEYBOARD_NAME
default "Corne Right"
endif
if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT
config ZMK_SPLIT
default y
if ZMK_DISPLAY
config I2C
default y
config SSD1306
default y
config SSD1306_REVERSE_MODE
default y
endif # ZMK_DISPLAY
if LVGL
config LVGL_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

View file

@ -0,0 +1,8 @@
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
config SHIELD_CORNE_LEFT
def_bool $(shields_list_contains,corne_left)
config SHIELD_CORNE_RIGHT
def_bool $(shields_list_contains,corne_right)

View file

@ -0,0 +1,29 @@
&spi1 {
compatible = "nordic,nrf-spi";
/* Cannot be used together with i2c0. */
status = "okay";
mosi-pin = <6>;
// 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 = "SK6812mini";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,6 @@
# Uncomment the following lines to enable the Corne RGB Underglow
# ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# Uncomment the following line to enable the Corne OLED Display
# CONFIG_ZMK_DISPLAY=y

View file

@ -0,0 +1,86 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix-transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
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,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
five_column_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <10>;
rows = <4>;
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = <
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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
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";
};
// TODO: per-key RGB node(s)?
};
&pro_micro_i2c {
status = "okay";
oled: 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>;
};
};

View file

@ -0,0 +1,50 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | SHFT |
// | GUI | LWR | SPC | | ENT | RSE | ALT |
bindings = <
&kp TAB &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 &mo 1 &kp SPC &kp RET &mo 2 &kp RALT
>;
};
lower_layer {
// -----------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | CTRL | | | | | | | 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
>;
};
raise_layer {
// -----------------------------------------------------------------------------------------
// | ESC | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | { | } | "|" | ` |
// | SHFT | | | | | | | _ | + | [ | ] | \ | ~ | // TODO: Fix this row when &mkp is committed
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp ESC &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp BKSP
&kp LCTL &trans &trans &trans &trans &trans &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp PIPE &kp GRAV
&kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH &kp TILD
&kp LGUI &trans &kp SPC &kp RET &trans &kp RALT
>;
};
};
};

View file

@ -0,0 +1,2 @@
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y

View file

@ -0,0 +1,22 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include "corne.dtsi"
&kscan0 {
col-gpios
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&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>
;
};
&bt_unpair_combo {
key-positions = <0 38>;
};

View file

@ -0,0 +1,2 @@
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include "corne.dtsi"
&default_transform {
col-offset = <6>;
};
&kscan0 {
col-gpios
= <&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>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
;
};
&bt_unpair_combo {
key-positions = <11 39>;
};

View file

@ -0,0 +1,16 @@
# Copyright (c) 2020 Pete Johanson, Kurtis Lew
# SPDX-License-Identifier: MIT
if SHIELD_IRIS_LEFT
config ZMK_KEYBOARD_NAME
default "Iris Left"
endif
if SHIELD_IRIS_RIGHT
config ZMK_KEYBOARD_NAME
default "Iris Right"
endif

View file

@ -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)

View file

@ -0,0 +1,51 @@
/*
* Copyright (c) 2020 Pete Johanson, Kurtis Lew
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix-transform.h>
/ {
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";
};
};

View file

@ -0,0 +1,59 @@
# Copyright (c) 2020 Pete Johanson, Kurtis Lew
# SPDX-License-Identifier: MIT
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// ------------------------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
// | 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
>;
};
};
};

View file

@ -0,0 +1,2 @@
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y

View file

@ -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>;
};

View file

@ -0,0 +1,2 @@
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y

View file

@ -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_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>
;
};
&bt_unpair_combo {
key-positions = <11 43>;
};

View file

@ -1,6 +1,5 @@
&spi1 {
compatible = "nordic,nrf-spi";
/* Cannot be used together with i2c0. */
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.

View file

@ -0,0 +1,29 @@
&spi1 {
compatible = "nordic,nrf-spi";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <12>; // 0.12 is not broken out on the nRFMicro
miso-pin = <22>; // 0.22 is not broken out on the nRFMicro
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 = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,28 @@
&spi1 {
compatible = "nordic,nrf-spi";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <12>; // 0.12 is not broken out on the nRFMicro
miso-pin = <22>; // 0.22 is not broken out on the nRFMicro
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 = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,28 @@
&spi1 {
compatible = "nordic,nrf-spi";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <12>; // 0.12 is not broken out on the nRFMicro
miso-pin = <22>; // 0.22 is not broken out on the nRFMicro
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 = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,10 @@
# Uncomment these two line to add support for encoders to your firmware
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
# Uncomment the following line to enable the Kyria OLED Display
# CONFIG_ZMK_DISPLAY=y
# Uncomment the following lines to enable RGB underglow
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y

View file

@ -81,6 +81,10 @@ 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)
sensors = <&left_encoder &right_encoder>;
};
bt_unpair_combo: bt_unpair_combo {
compatible = "zmk,bt-unpair-combo";
};
// TODO: RGB node(s)
};

View file

@ -1,23 +1,11 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/matrix-transform.h>
/ {
chosen {
zmk,keymap = &keymap0;
};
keymap0: keymap {
keymap {
compatible = "zmk,keymap";
label ="Default Kyria Keymap";
layers = <&default>;
};
layers {
compatible = "zmk,layers";
default: layer_0 {
label = "DEFAULT";
default_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' |

View file

@ -22,3 +22,7 @@
&left_encoder {
status = "okay";
};
&bt_unpair_combo {
key-positions = <0 44>;
};

View file

@ -27,3 +27,7 @@
&right_encoder {
status = "okay";
};
&bt_unpair_combo {
key-positions = <11 45>;
};

View file

@ -1,36 +0,0 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/matrix-transform.h>
/ {
chosen {
zmk,keymap = &keymap0;
};
keymap0: keymap {
compatible = "zmk,keymap";
label ="Default Lily58 Keymap";
layers = <&default>;
};
layers {
compatible = "zmk,layers";
default: layer_0 {
label = "DEFAULT";
// ---------------------------------------------------------------------------------------------------------------------------------
// | 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 | , | . | / | CTRL |
// | GUI | DEL | RET | SPACE | | SPACE | TAB | BSPC | R-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 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 LBKT &kp RBKT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RCTL
&kp LGUI &kp DEL &kp RET &kp SPC &kp SPC &kp TAB &kp BKSP &kp RALT
>;
};
};
};

View file

@ -0,0 +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

View file

@ -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 |
@ -44,12 +44,29 @@ 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>;
};
sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder>;
};
bt_unpair_combo: bt_unpair_combo {
compatible = "zmk,bt-unpair-combo";
};
};
&pro_micro_i2c {
status = "okay";
ssd1306@3c {
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";

View file

@ -0,0 +1,62 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// ------------------------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
// | 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 |
// | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI |
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 LALT &kp LGUI &mo 1 &kp SPC &kp RET &mo 2 &kp BKSP &kp RGUI
>;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
};
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 &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 | | | | + | - | = | [ | ] | \ |
// | | | | | | | | | |
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
>;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
};
};
};

View file

@ -1,2 +1,6 @@
# Uncomment to enable encoder
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y

View file

@ -17,3 +17,10 @@
;
};
&left_encoder {
status = "okay";
};
&bt_unpair_combo {
key-positions = <0 53>;
};

View file

@ -21,3 +21,6 @@
;
};
&bt_unpair_combo {
key-positions = <11 54>;
};

View file

@ -1,13 +0,0 @@
if SHIELD_PETEJOHANSON_HANDWIRE
config ZMK_KEYBOARD_NAME
default "Pete's Handwire Breadboard"
config ZMK_BLE
default y
config ZMK_ACTION_MOD_TAP
default y
endif

View file

@ -1,5 +0,0 @@
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: MIT
config SHIELD_PETEJOHANSON_HANDWIRE
def_bool $(shields_list_contains,petejohanson_handwire)

View file

@ -1,40 +0,0 @@
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
/ {
chosen {
zmk,keymap = &keymap0;
};
keymap0: keymap {
compatible = "zmk,keymap";
label ="Default keymap";
layers = <&default &lower &raise>;
};
layers {
compatible = "zmk,layers";
default: layer_0 {
label = "DEFAULT";
bindings = <
&cp M_NEXT &mt MOD_LSFT B &trans &trans
&mo 1 &mo 2 &trans &trans>;
};
lower: layer_1 {
label = "LOWER";
bindings = <
&cp M_PLAY &cp M_NEXT &trans &trans
&trans &trans &trans &trans>;
};
raise: layer_2 {
label = "RAISE";
bindings = <
&kp C &kp D &trans &trans
&trans &kp E &trans &trans>;
};
};
};

View file

@ -1 +0,0 @@
CONFIG_ZMK_KSCAN_COMPOSITE_DRIVER=y

View file

@ -1,44 +0,0 @@
/ {
chosen {
zmk,kscan = &kscan0;
};
kscan0: kscan_0 {
compatible = "zmk,kscan-composite";
label = "KSCAN_COMP";
rows = <2>;
columns = <4>;
left {
kscan = <&left_hand>;
};
right {
kscan = <&right_hand>;
column-offset = <2>;
};
};
left_hand: kscan_1 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_LEFT";
diode-direction = "row2col";
row-gpios = <&arduino_header 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
col-gpios = <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
right_hand: kscan_2 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_RIGHT";
diode-direction = "row2col";
row-gpios = <&arduino_header 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
col-gpios = <&arduino_header 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};

View file

@ -1,13 +0,0 @@
if SHIELD_PETEJOHANSON_PRO_MICRO_HANDWIRE
config ZMK_KEYBOARD_NAME
default "Pete's ProMicro Compat Handwire"
config ZMK_USB
default y
config ZMK_ACTION_MOD_TAP
default y
endif

View file

@ -1,5 +0,0 @@
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
config SHIELD_PETEJOHANSON_PRO_MICRO_HANDWIRE
def_bool $(shields_list_contains,petejohanson_pro_micro_handwire)

View file

@ -1,41 +0,0 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
chosen {
zmk,keymap = &keymap0;
};
keymap0: keymap {
compatible = "zmk,keymap";
label ="Default keymap";
layers = <&default &lower &raise>;
};
layers {
compatible = "zmk,layers";
default: layer_0 {
label = "DEFAULT";
bindings = <
&mo 1 &kp A
&mo 2 &kp C>;
};
lower: layer_1 {
label = "LOWER";
bindings = <
&trans &kp D
&trans &kp E>;
};
raise: layer_2 {
label = "RAISE";
bindings = <
&trans &kp I
&trans &kp H>;
};
};
};

View file

@ -1,17 +0,0 @@
/ {
chosen {
zmk,kscan = &kscan0;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "row2col";
row-gpios = <&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
col-gpios = <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};

View file

@ -0,0 +1,9 @@
# Copyright (c) 2020 TJ Campie
# SPDX-License-Identifier: MIT
if SHIELD_QAZ
config ZMK_KEYBOARD_NAME
default "QAZ"
endif

View file

@ -0,0 +1,5 @@
# Copyright (c) 2020 TJ Campie
# SPDX-License-Identifier: MIT
config SHIELD_MY_BOARD
def_bool $(shields_list_contains,qaz)

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2020 TJ Campie
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#define DEFAULT 0
#define NUM_SYM 1
#define NAV 2
/ {
keymap {
compatible = "zmk,keymap";
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
&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 {
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
&bootloader &reset &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
&none &none &none &none &none &trans &trans &kp RET &trans &kp FSLH
>;
};
};
};

View file

@ -0,0 +1,53 @@
/*
* Copyright (c) 2020 TJ Campie
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix-transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
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)>
;
};
};

View file

@ -0,0 +1,10 @@
# Copyright (c) 2020 Pete Johanson, Richard Jones
# SPDX-License-Identifier: MIT
if SHIELD_ROMAC
config ZMK_KEYBOARD_NAME
default "RoMac"
endif

View file

@ -0,0 +1,5 @@
# Copyright (c) 2020 Pete Johanson, Richard Jones
# SPDX-License-Identifier: MIT
config SHIELD_ROMAC
def_bool $(shields_list_contains,romac)

View file

View file

@ -0,0 +1,46 @@
/*
* Copyright (c) 2020 Pete Johanson, Richard Jones
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
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
>;
};
};
};

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2020 Pete Johanson, Richard Jones
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix-transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
};
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>;
};
};

View file

@ -0,0 +1,54 @@
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT
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

View file

@ -0,0 +1,8 @@
# Copyright (c) 2020 Ryan Cross
# 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)

View file

@ -0,0 +1,9 @@
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT
# 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

View file

@ -0,0 +1,93 @@
/*
* Copyright (c) 2020 Pete Johanson, Ryan Cross
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix-transform.h>
/ {
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 |
// | 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(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";
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)>
;
};
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";
};
right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_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 = <4>;
status = "disabled";
};
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";
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>;
};
};

Some files were not shown because too many files have changed in this diff Show more