Merge branch 'main' into macros

# Conflicts:
#	app/CMakeLists.txt
This commit is contained in:
Sergey Popyvanov 2021-11-29 08:45:48 +04:00
commit 59a441d27b
513 changed files with 35816 additions and 19161 deletions

View file

@ -1,4 +1,4 @@
FROM zmkfirmware/zmk-dev-arm:2.4 FROM docker.io/zmkfirmware/zmk-dev-arm:2.5
COPY .bashrc tmp COPY .bashrc tmp
RUN mv /tmp/.bashrc ~/.bashrc RUN mv /tmp/.bashrc ~/.bashrc

11
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,11 @@
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
## Board/Shield Check-list
- [ ] This board/shield is tested working on real hardware
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
- [ ] `.zmk.yml` metadata file added
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
- [ ] General consistent formatting of DeviceTree files
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
- [ ] If split, no name added for the right/peripheral half
- [ ] `.conf` file has optional extra features commented out

View file

@ -14,12 +14,13 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: zmkfirmware/zmk-build-arm:2.4 image: docker.io/zmkfirmware/zmk-build-arm:2.5
strategy: strategy:
matrix: matrix:
board: board:
- bluemicro840_v1 - bluemicro840_v1
- nice_nano - nice_nano
- nice_nano_v2
- nrfmicro_13 - nrfmicro_13
- proton_c - proton_c
shield: shield:
@ -69,11 +70,11 @@ jobs:
- board: planck_rev6 - board: planck_rev6
- board: proton_c - board: proton_c
shield: clueboard_california shield: clueboard_california
- board: nice_nano - board: nice_nano_v2
shield: kyria_left shield: kyria_left
cmake-args: -DCONFIG_ZMK_DISPLAY=y cmake-args: -DCONFIG_ZMK_DISPLAY=y
skip-archive: true skip-archive: true
- board: nice_nano - board: nice_nano_v2
shield: kyria_right shield: kyria_right
cmake-args: -DCONFIG_ZMK_DISPLAY=y cmake-args: -DCONFIG_ZMK_DISPLAY=y
skip-archive: true skip-archive: true

View file

@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.11 - uses: DoozyX/clang-format-lint-action@v0.13
with: with:
source: "./app" source: "./app"
extensions: "h,c" extensions: "h,c"

View file

@ -31,3 +31,16 @@ jobs:
- name: Prettier check - name: Prettier check
run: npm run prettier:check run: npm run prettier:check
working-directory: docs working-directory: docs
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
with:
working-directory: docs
- name: Build
run: npm run build
working-directory: docs
- name: TypeScript check
run: npm run typecheck
working-directory: docs

View file

@ -0,0 +1,45 @@
name: Hardware Metadata Validation
on:
push:
paths:
- ".github/workflows/hardware-metadata-validation.yml"
- "schema/hardware-metadata.schema.json"
- "app/boards/**/*.zmk.yml"
- "app/scripts/west_commands/metadata.py"
pull_request:
paths:
- ".github/workflows/hardware-metadata-validation.yml"
- "schema/hardware-metadata.schema.json"
- "app/boards/**/*.zmk.yml"
- "app/scripts/west_commands/metadata.py"
jobs:
check-metadata-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
with:
working-directory: app
- name: Prettier Check
run: npm run prettier:check
working-directory: app
validate-metadata:
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-dev-arm:2.5
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: pip install -r app/scripts/requirements.txt
- name: West init
run: west init -l app
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Validate Hardware Metadata
working-directory: app
run: west metadata check

View file

@ -16,7 +16,7 @@ jobs:
integration_test: integration_test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: zmkfirmware/zmk-build-arm:2.4 image: docker.io/zmkfirmware/zmk-build-arm:2.5
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2

View file

@ -60,7 +60,7 @@ representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at reported to the community leaders responsible for enforcement at
conduct@zmkfirmware.dev. conduct@zmk.dev.
All complaints will be reviewed and investigated promptly and fairly. All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the All community leaders are obligated to respect the privacy and security of the

View file

@ -7,7 +7,7 @@ you have any questions, please come join us on the
## Code of Conduct ## Code of Conduct
All community members are expected to abide by the [Code of Conduct][code-of-conduct]. All community members are expected to abide by the [Code of Conduct][code-of-conduct].
For any and all conduct inquiries or concerns, please contact conduct@zmkfirmware.dev. For any and all conduct inquiries or concerns, please contact conduct@zmk.dev.
[code-of-conduct]: https://github.com/zmkfirmware/zmk/blob/main/CODE_OF_CONDUCT.md [code-of-conduct]: https://github.com/zmkfirmware/zmk/blob/main/CODE_OF_CONDUCT.md
@ -35,8 +35,8 @@ ZMK project.
### Before Submitting a Report ### Before Submitting a Report
- Review the [Frequently Asked Questions](https://zmkfirmware.dev/docs/faq). - Review the [Frequently Asked Questions](https://zmk.dev/docs/faq).
- Check the [Troubleshooting Guide](https://zmkfirmware.dev/docs/troubleshooting) for answers. - Check the [Troubleshooting Guide](https://zmk.dev/docs/troubleshooting) for answers.
- Search the [open issues](https://github.com/zmkfirmware/zmk/issues) for an existing report that - Search the [open issues](https://github.com/zmkfirmware/zmk/issues) for an existing report that
matches your problem. matches your problem.
@ -47,10 +47,10 @@ To open a report:
- Head to https://github.com/zmkfirmware/zmk/issues/new - Head to https://github.com/zmkfirmware/zmk/issues/new
- Provide an accurate summary of the issue in the title. - Provide an accurate summary of the issue in the title.
- Provide as much detail as you can about the issue including: - Provide as much detail as you can about the issue including:
- What [board/shield](https://zmkfirmware.dev/docs/faq#what-is-a-board) you are using. - What [board/shield](https://zmk.dev/docs/faq#what-is-a-board) you are using.
- A link to the user repository, if you used it to build your firmware. - A link to the user repository, if you used it to build your firmware.
- Exact steps to reproduce the problem. - Exact steps to reproduce the problem.
- Any relevant screenshots or [logs](https://zmkfirmware.dev/docs/dev-guide-usb-logging) - Any relevant screenshots or [logs](https://zmk.dev/docs/dev-guide-usb-logging)
## Testing ## Testing
@ -91,7 +91,7 @@ You can setup git to run prettier automatically when you commit by installing th
### Development Setup ### Development Setup
To get your development environment setup going, start at the To get your development environment setup going, start at the
[basic setup](https://zmkfirmware.dev/docs/dev-setup) docs, and make sure you can build and flash [basic setup](https://zmk.dev/docs/development/setup/) docs, and make sure you can build and flash
your own locally built firmware. your own locally built firmware.
### Formatting ### Formatting
@ -124,4 +124,4 @@ When opening a pull request with your changes, please:
- Requested testing by reviewers or testers. - Requested testing by reviewers or testers.
- Screenshots or logs that support understanding the change. - Screenshots or logs that support understanding the change.
[discord-invite]: https://zmkfirmware.dev/community/discord/invite [discord-invite]: https://zmk.dev/community/discord/invite

View file

@ -1,13 +1,13 @@
# Zephyr™ Mechanical Keyboard (ZMK) Firmware # Zephyr™ Mechanical Keyboard (ZMK) Firmware
[![Discord](https://img.shields.io/discord/719497620560543766)](https://zmkfirmware.dev/community/discord/invite) [![Discord](https://img.shields.io/discord/719497620560543766)](https://zmk.dev/community/discord/invite)
[![Build](https://github.com/zmkfirmware/zmk/workflows/Build/badge.svg)](https://github.com/zmkfirmware/zmk/actions) [![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) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
[ZMK Firmware](https://zmkfirmware.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues. [ZMK Firmware](https://zmk.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
Check out the website to learn more: https://zmkfirmware.dev/ Check out the website to learn more: https://zmk.dev/
You can also come join our [ZMK Discord Server](https://zmkfirmware.dev/community/discord/invite) You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite)
To review features, check out the [feature overview](https://zmkfirmware.dev/docs/). ZMK is under active development, and new features are listed with 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. To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with 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.

1
app/.gitignore vendored
View file

@ -1 +1,2 @@
build/ build/
node_modules/

3
app/.prettierrc.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
endOfLine: "auto",
};

View file

@ -36,6 +36,7 @@ target_sources(app PRIVATE src/events/position_state_changed.c)
target_sources(app PRIVATE src/events/layer_state_changed.c) target_sources(app PRIVATE src/events/layer_state_changed.c)
target_sources(app PRIVATE src/events/keycode_state_changed.c) target_sources(app PRIVATE src/events/keycode_state_changed.c)
target_sources(app PRIVATE src/events/modifiers_state_changed.c) target_sources(app PRIVATE src/events/modifiers_state_changed.c)
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
target_sources(app PRIVATE src/events/sensor_event.c) target_sources(app PRIVATE src/events/sensor_event.c)
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c) target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c) target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c)
@ -47,6 +48,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c) target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c) target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
target_sources(app PRIVATE src/behaviors/behavior_macro.c) target_sources(app PRIVATE src/behaviors/behavior_macro.c)
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c) target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c) target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
target_sources(app PRIVATE src/behaviors/behavior_outputs.c) target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
@ -57,6 +59,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c) target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c) target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
target_sources(app PRIVATE src/combo.c) target_sources(app PRIVATE src/combo.c)
target_sources(app PRIVATE src/conditional_layer.c)
target_sources(app PRIVATE src/keymap.c) target_sources(app PRIVATE src/keymap.c)
endif() endif()
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c) target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)

View file

@ -25,7 +25,57 @@ config USB_DEVICE_PID
config USB_DEVICE_MANUFACTURER config USB_DEVICE_MANUFACTURER
default "ZMK Project" default "ZMK Project"
menu "HID Output Types" menu "HID"
choice ZMK_HID_REPORT_TYPE
prompt "HID Report Type"
config ZMK_HID_REPORT_TYPE_HKRO
bool "#-Key Roll Over (HKRO) HID Report"
help
Enable # key roll over for HID report. This selection is "boot keyboard" compatible
but limits the total number of possible keys to report as held to #.
config ZMK_HID_REPORT_TYPE_NKRO
bool "Full N-Key Roll Over (NKRO) HID Report"
help
Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard
from working with some BIOS/UEFI versions that only support "boot keyboard" support.
This option also prevents using some infrequently used higher range HID usages.
endchoice
if ZMK_HID_REPORT_TYPE_HKRO
config ZMK_HID_KEYBOARD_REPORT_SIZE
int "# Keyboard Keys Reportable"
default 6
endif
config ZMK_HID_CONSUMER_REPORT_SIZE
int "# Consumer Keys Reportable"
default 6
choice ZMK_HID_CONSUMER_REPORT_USAGES
prompt "HID Report Type"
config ZMK_HID_CONSUMER_REPORT_USAGES_FULL
bool "Full Consumer HID Usage Support"
help
Enable full Consumer usage ID values to be sent to hosts. Allows for less
frequently used usages, but has compatibability issues with some host OSes.
config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC
bool "Basic Consumer HID Usage Support"
help
Enable Consumer usage ID values up to "Playback Speed - Slow" to be sent to
hosts. Allows for broader compatibability with more host OSes.
endchoice
menu "Output Types"
config ZMK_USB config ZMK_USB
bool "USB" bool "USB"
@ -92,7 +142,10 @@ config ZMK_BLE_PASSKEY_ENTRY
#ZMK_BLE #ZMK_BLE
endif endif
#HID Output Types #Output Types
endmenu
# HID
endmenu endmenu
menu "Split Support" menu "Split Support"
@ -114,6 +167,7 @@ menuconfig ZMK_SPLIT_BLE_ROLE_CENTRAL
bool "Central" bool "Central"
select BT_CENTRAL select BT_CENTRAL
select BT_GATT_CLIENT select BT_GATT_CLIENT
select BT_GATT_AUTO_DISCOVER_CCC
if ZMK_SPLIT_BLE_ROLE_CENTRAL if ZMK_SPLIT_BLE_ROLE_CENTRAL
@ -156,7 +210,7 @@ endif
endif endif
#ZMK_SPLIT #ZMK_SPLIT
endif endif
if ZMK_BLE if ZMK_BLE
@ -209,36 +263,54 @@ config ZMK_RGB_UNDERGLOW_EXT_POWER
bool "RGB underglow toggling also controls external power" bool "RGB underglow toggling also controls external power"
default y default y
config ZMK_RGB_UNDERGLOW_BRT_MIN
int "RGB underglow minimum brightness in percent"
range 0 100
default 0
config ZMK_RGB_UNDERGLOW_BRT_MAX
int "RGB underglow maximum brightness in percent"
range ZMK_RGB_UNDERGLOW_BRT_MIN 100
default 100
config ZMK_RGB_UNDERGLOW_HUE_STEP config ZMK_RGB_UNDERGLOW_HUE_STEP
int "RGB underglow hue step in degrees of 360" int "RGB underglow hue step in degrees"
range 0 359
default 10 default 10
config ZMK_RGB_UNDERGLOW_SAT_STEP config ZMK_RGB_UNDERGLOW_SAT_STEP
int "RGB underglow sturation step in percent" int "RGB underglow saturation step in percent"
range 0 100
default 10 default 10
config ZMK_RGB_UNDERGLOW_BRT_STEP config ZMK_RGB_UNDERGLOW_BRT_STEP
int "RGB underglow brightness step in percent" int "RGB underglow brightness step in percent"
range 0 100
default 10 default 10
config ZMK_RGB_UNDERGLOW_HUE_START config ZMK_RGB_UNDERGLOW_HUE_START
int "RGB underglow start hue value from 0-359" int "RGB underglow start hue value in degrees"
range 0 359
default 0 default 0
config ZMK_RGB_UNDERGLOW_SAT_START config ZMK_RGB_UNDERGLOW_SAT_START
int "RGB underglow start saturations value from 0-100" int "RGB underglow start saturations value in percent"
range 0 100
default 100 default 100
config ZMK_RGB_UNDERGLOW_BRT_START config ZMK_RGB_UNDERGLOW_BRT_START
int "RGB underglow start brightness value from 0-100" int "RGB underglow start brightness value in percent"
default 100 range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX
default ZMK_RGB_UNDERGLOW_BRT_MAX
config ZMK_RGB_UNDERGLOW_SPD_START config ZMK_RGB_UNDERGLOW_SPD_START
int "RGB underglow start animation speed value from 1-5" int "RGB underglow start animation speed value"
range 1 5
default 3 default 3
config ZMK_RGB_UNDERGLOW_EFF_START config ZMK_RGB_UNDERGLOW_EFF_START
int "RGB underglow start effect int value related to the effect enum list" int "RGB underglow start effect int value related to the effect enum list"
range 0 3
default 0 default 0
config ZMK_RGB_UNDERGLOW_ON_START config ZMK_RGB_UNDERGLOW_ON_START
@ -263,14 +335,11 @@ config ZMK_SLEEP
if ZMK_SLEEP if ZMK_SLEEP
config SYS_POWER_DEEP_SLEEP_STATES
default y
choice SYS_PM_POLICY choice SYS_PM_POLICY
default SYS_PM_POLICY_APP default PM_POLICY_APP
endchoice endchoice
config DEVICE_POWER_MANAGEMENT config PM_DEVICE
default y default y
config ZMK_IDLE_SLEEP_TIMEOUT config ZMK_IDLE_SLEEP_TIMEOUT
@ -422,6 +491,11 @@ config ZMK_WPM
config SENSOR config SENSOR
default y default y
choice CBPRINTF_IMPLEMENTATION
default CBPRINTF_NANO
endchoice
module = ZMK module = ZMK
module-str = zmk module-str = zmk
source "subsys/logging/Kconfig.template.log_config" source "subsys/logging/Kconfig.template.log_config"

View file

@ -0,0 +1,11 @@
file_format: "1"
id: bdn9_rev2
name: BDN9 Rev2
type: board
arch: arm
features:
- keys
- encoder
outputs:
- usb
url: https://keeb.io/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb

View file

@ -0,0 +1,11 @@
file_format: "1"
id: bdn9_rev2
name: BDN9 Rev2
type: board
arch: arm
outputs:
- usb
features:
- keys
- encoder
url: https://keeb.io/collections/bdn9-collection/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb

View file

@ -11,6 +11,9 @@ CONFIG_FPU=y
# enable GPIO # enable GPIO
CONFIG_GPIO=y CONFIG_GPIO=y
# Enable pinmux
CONFIG_PINMUX=y
# Needed to reduce this to size that will fit on F072 # Needed to reduce this to size that will fit on F072
CONFIG_HEAP_MEM_POOL_SIZE=1024 CONFIG_HEAP_MEM_POOL_SIZE=1024

View file

@ -5,7 +5,7 @@
*/ */
/ { / {
pro_micro_d: connector_d { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
@ -25,6 +25,10 @@
, <16 0 &gpio0 28 0> /* D16 B2*/ , <16 0 &gpio0 28 0> /* D16 B2*/
, <14 0 &gpio0 3 0> /* D14 B3*/ , <14 0 &gpio0 3 0> /* D14 B3*/
, <15 0 &gpio1 13 0> /* D15 B1*/ , <15 0 &gpio1 13 0> /* D15 B1*/
, <18 0 &gpio0 2 0> /* D18/A0 F7*/
, <19 0 &gpio0 29 0> /* D19/A1 F6*/
, <20 0 &gpio0 26 0> /* D20/A2 F5*/
, <21 0 &gpio0 30 0> /* D21/A3 F4*/
; ;
}; };
@ -34,19 +38,20 @@
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 2 0> /* A0 F7*/ = <0 0 &gpio0 2 0> /* D18/A0 F7*/
, <1 0 &gpio0 29 0> /* A1 F6*/ , <1 0 &gpio0 29 0> /* D19/A1 F6*/
, <2 0 &gpio0 26 0> /* A2 F5*/ , <2 0 &gpio0 26 0> /* D20/A2 F5*/
, <3 0 &gpio0 30 0> /* A3 F4*/ , <3 0 &gpio0 30 0> /* D21/A3 F4*/
, <6 0 &gpio0 20 0> /* D4/A6 D4*/ , <6 0 &gpio0 20 0> /* D4/A6 D4*/
, <7 0 &gpio0 24 0> /* D6/A7 D7*/ , <7 0 &gpio0 24 0> /* D6/A7 D7*/
, <8 0 &gpio0 10 0> /* D8/A8 B4*/ , <8 0 &gpio0 10 0> /* D8/A8 B4*/
, <9 0 &gpio1 6 0> /* D9/A9 B5*/ , <9 0 &gpio1 6 0> /* D9/A9 B5*/
, <10 0 &gpio1 13 0> /* D10/A10 B6*/ , <10 0 &gpio1 11 0> /* D10/A10 B6*/
; ;
}; };
}; };
pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {}; pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {}; pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {}; pro_micro_serial: &uart0 {};

View file

@ -21,7 +21,7 @@
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>; gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
@ -29,6 +29,7 @@
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
init-delay-ms = <20>;
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
}; };

View file

@ -0,0 +1,10 @@
file_format: "1"
id: bluemicro840_v1
name: BlueMicro840 v1
type: board
arch: arm
outputs:
- usb
- ble
url: https://nrf52.jpconstantineau.com/docs/bluemicro840_v1/
exposes: [pro_micro]

View file

@ -0,0 +1,8 @@
# Ferris board configuration
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_FERRIS
bool "Ferris rev 0.2"
depends on SOC_STM32F072XB

View file

@ -0,0 +1,23 @@
# Ferris board configuration
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if BOARD_FERRIS
config BOARD
default "ferris_rev02"
config ZMK_KEYBOARD_NAME
default "Ferris rev 0.2"
config ZMK_USB
default y
config ZMK_KSCAN_MATRIX_POLLING
default y
config ZMK_KSCAN_COMPOSITE_DRIVER
default y
endif # BOARD_FERRIS

View file

@ -0,0 +1,16 @@
# Building ZMK for the Ferris 0.2
## Standard Build
```
west build -p -d build/ferris --board ferris_rev02
```
## Flashing
`west` can be used to flash the board directly. Press the reset button once, and run:
```
west flash -d build/ferris
```

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
board_runner_args(jlink "--device=STM32F072CB" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -0,0 +1,139 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <st/f0/stm32f072Xb.dtsi>
#include <st/f0/stm32f072v(8-b)tx-pinctrl.dtsi>
#include <dt-bindings/zmk/matrix_transform.h>
/ {
model = "Ferris rev0.2";
compatible = "ferris,rev02", "st,stm32f072";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan;
zmk,matrix_transform = &transform;
/* TODO: Enable once we support the IC for underglow
zmk,underglow = &led_strip;
*/
};
transform: transform {
compatible = "zmk,matrix-transform";
rows = <4>;
columns = <10>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
RC(3,3) RC(3,4) RC(3,5) RC(3,6)
>;
};
kscan: kscan {
compatible = "zmk,kscan-composite";
label = "KSCAN";
rows = <4>;
columns = <10>;
left {
kscan = <&kscan_left>;
};
right {
kscan = <&kscan_right>;
column-offset = <5>;
};
};
kscan_left: kscan_left {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_LEFT";
diode-direction = "col2row";
col-gpios
= <&gpiob 8 (GPIO_ACTIVE_HIGH)>
, <&gpiob 4 (GPIO_ACTIVE_HIGH)>
, <&gpiob 3 (GPIO_ACTIVE_HIGH)>
, <&gpioa 15 (GPIO_ACTIVE_HIGH)>
, <&gpioa 14 (GPIO_ACTIVE_HIGH)>
;
row-gpios
= <&gpiob 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
kscan_right: kscan_right {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_RIGHT";
diode-direction = "row2col";
col-gpios
= <&right_io 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
row-gpios
= <&right_io 8 (GPIO_ACTIVE_LOW)>
, <&right_io 9 (GPIO_ACTIVE_LOW)>
, <&right_io 10 (GPIO_ACTIVE_LOW)>
, <&right_io 11 (GPIO_ACTIVE_LOW)>
;
};
};
&i2c2 {
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
right_io: mcp23017@20 {
compatible = "microchip,mcp23017";
status = "okay";
gpio-controller;
reg = <0x20>;
label = "RIGHT_IO";
#gpio-cells = <2>;
ngpios = <16>;
};
};
&usb {
status = "okay";
};
&rtc {
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 128Kb of flash */
storage_partition: partition@3e800 {
label = "storage";
reg = <0x0001e800 0x00001800>;
};
};
};

View file

@ -0,0 +1,79 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#define NAV_L 1
#define OTHER_L 2
#define NUM_L 3
#define SYM_L 4
// Using layer taps on thumbs, having quick tap as well helps w/ repeating space/backspace
&lt { quick_tap_ms = <200>; };
/ {
behaviors {
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "homerow mods";
#binding-cells = <2>;
tapping_term_ms = <200>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;
};
};
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
&hm LGUI A &hm LALT S &hm LCTRL D &hm LSHFT F &kp G &kp H &hm RSHFT J &hm RCTRL K &hm LALT L &hm LGUI QUOT
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
&lt NAV_L TAB &kp ENTER &lt NUM_L SPACE &lt SYM_L BKSP
>;
};
nav_layer {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &kp LARW &kp DARW &kp UARW &kp RARW
&trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END
&trans &trans &kp ESC &kp DEL
>;
};
other_layer {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &kp HOME &trans &trans &trans
&trans &trans &trans &trans
>;
};
num_layer {
bindings = <
&kp LBKT &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans
&kp SEMI &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &trans &trans &trans &trans
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp BSLH &trans &trans &trans &trans &trans
&kp N0 &kp MINUS &trans &trans
>;
};
sym_layer {
bindings = <
&kp LBRC &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp RBRC &trans &trans &trans &trans &trans
&kp COLON &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp PLUS &trans &trans &trans &trans &trans
&kp TILDE &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(BSLH) &trans &trans &trans &trans &trans
&kp LS(N0) &kp UNDER &trans &trans
>;
};
};
};

View file

@ -0,0 +1,12 @@
identifier: ferris_rev02
name: Ferris 0.2
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 40
supported:
- switches
- underglow

View file

@ -0,0 +1,10 @@
file_format: "1"
id: ferris_rev02
name: Ferris 0.2
type: board
arch: arm
features:
- keys
outputs:
- usb
url: https://github.com/pierrechevalier83/ferris/tree/main/0.2

View file

@ -0,0 +1,43 @@
# SPDX-License-Identifier: MIT
CONFIG_BOARD_FERRIS=y
CONFIG_SOC_SERIES_STM32F0X=y
CONFIG_SOC_STM32F072XB=y
# 48MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
# enable PINMUX
CONFIG_PINMUX=y
# enable GPIO
CONFIG_GPIO=y
# Enable i2c
CONFIG_I2C=y
# ZMK Settings
CONFIG_ZMK_USB=y
CONFIG_ZMK_KSCAN_GPIO_DRIVER=y
CONFIG_ZMK_KSCAN_COMPOSITE_DRIVER=y
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
CONFIG_USB_SELF_POWERED=n
# Enable IO multiplexer
CONFIG_GPIO_MCP23017=y
# Needed to reduce this to size that will fit on F072
CONFIG_HEAP_MEM_POOL_SIZE=1024
# clock configuration
CONFIG_CLOCK_CONTROL=y
# Clock configuration for Cube Clock control driver
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
# use HSI as PLL input
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
# produce 48MHz clock at PLL output
# CONFIG_CLOCK_STM32_PLL_PREDIV=1
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=6
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
CONFIG_CLOCK_STM32_APB1_PRESCALER=1
# CONFIG_CLOCK_STM32_APB2_PRESCALER=1

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,29 @@
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on (BOARD_MIKOTO_520)
choice BOARD_MIKOTO_CHARGER_CURRENT
prompt "Charge current to supply to attached batteries"
depends on (BOARD_MIKOTO_520)
config BOARD_MIKOTO_CHARGER_CURRENT_40MA
bool "40mA charge current, for battery capacity 40mAh or higher"
config BOARD_MIKOTO_CHARGER_CURRENT_100MA
bool "100mA charge current, for battery capacity 100mAh or higher"
config BOARD_MIKOTO_CHARGER_CURRENT_150MA
bool "150mA charge current, for battery capacity 150mAh or higher"
config BOARD_MIKOTO_CHARGER_CURRENT_250MA
bool "250mA charge current, for battery capacity 250mAh or higher"
config BOARD_MIKOTO_CHARGER_CURRENT_350MA
bool "350mA charge current, for battery capacity 350mAh or higher"
config BOARD_MIKOTO_CHARGER_CURRENT_NONE
bool "Disable charge current"
endchoice

View file

@ -0,0 +1,8 @@
# mikoto board configuration
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_MIKOTO_520
bool "mikoto_520"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,40 @@
# Electronut Labs Papyr board configuration
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if BOARD_MIKOTO_520
config BOARD
default "mikoto"
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
choice BOARD_MIKOTO_CHARGER_CURRENT
default BOARD_MIKOTO_CHARGER_CURRENT_100MA
endchoice
config ZMK_BATTERY_VOLTAGE_DIVIDER
default y
endif # BOARD_MIKOTO_520

View file

@ -0,0 +1,59 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/ {
pro_micro: connector {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 4 0> /* D0 */
, <1 0 &gpio0 8 0> /* D1 */
, <2 0 &gpio0 17 0> /* D2 */
, <3 0 &gpio0 20 0> /* D3 */
, <4 0 &gpio0 22 0> /* D4/A6 */
, <5 0 &gpio0 24 0> /* D5 */
, <6 0 &gpio1 0 0> /* D6/A7 */
, <7 0 &gpio1 2 0> /* D7 */
, <8 0 &gpio1 4 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio0 9 0> /* D10/A10 */
, <16 0 &gpio0 10 0> /* D16 */
, <14 0 &gpio1 13 0> /* D14 */
, <15 0 &gpio0 2 0> /* D15 */
, <18 0 &gpio0 29 0> /* D18/A0 */
, <19 0 &gpio0 31 0> /* D19/A1 */
, <20 0 &gpio0 25 0> /* D20/A2 */
, <21 0 &gpio0 11 0> /* D21/A3 */
;
};
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 29 0> /* D18/A0 */
, <1 0 &gpio0 31 0> /* D19/A1 */
, <2 0 &gpio0 25 0> /* D20/A2 */
, <3 0 &gpio0 11 0> /* D21/A3 */
, <6 0 &gpio0 22 0> /* D4/A6 */
, <7 0 &gpio1 0 0> /* D6/A7 */
, <8 0 &gpio1 4 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio0 9 0> /* D10/A10 */
;
};
};
pro_micro_d: &pro_micro {};
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,115 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
/ {
model = "mikoto";
compatible = "zhiayang,mikoto";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 2>;
output-ohms = <10000000>;
full-ohms = <(10000000 + 4000000)>;
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
scl-pin = <20>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <8>;
rx-pin = <4>;
};
&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>;
sd_partition: partition@0 {
label = "softdevice";
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
label = "storage";
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

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

View file

@ -0,0 +1,10 @@
file_format: "1"
id: mikoto_520
name: Mikoto 5.20
type: board
arch: arm
outputs:
- usb
- ble
url: https://github.com/zhiayang/mikoto
exposes: [pro_micro]

View file

@ -0,0 +1,20 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_MIKOTO_520=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,48 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* 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_mikoto_init(const struct device *port) {
ARG_UNUSED(port);
#if CONFIG_BOARD_MIKOTO_520
const struct device *p0 = device_get_binding("GPIO_0");
const struct device *p1 = device_get_binding("GPIO_1");
#if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA
gpio_pin_configure(p0, 26, GPIO_INPUT | GPIO_PULL_DOWN);
gpio_pin_configure(p1, 15, GPIO_INPUT);
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_100MA
gpio_pin_configure(p0, 26, GPIO_OUTPUT);
gpio_pin_set(p0, 26, 0);
gpio_pin_configure(p1, 15, GPIO_INPUT);
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_150MA
gpio_pin_configure(p0, 26, GPIO_OUTPUT);
gpio_pin_set(p0, 26, 0);
gpio_pin_configure(p1, 15, GPIO_INPUT | GPIO_PULL_DOWN);
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_250MA
gpio_pin_configure(p0, 26, GPIO_INPUT);
gpio_pin_configure(p1, 15, GPIO_OUTPUT);
gpio_pin_set(p1, 15, 0);
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_350MA
gpio_pin_configure(p0, 26, GPIO_OUTPUT);
gpio_pin_set(p0, 26, 0);
gpio_pin_configure(p1, 15, GPIO_OUTPUT);
gpio_pin_set(p1, 15, 0);
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_NONE
gpio_pin_configure(p0, 26, GPIO_INPUT);
gpio_pin_configure(p1, 15, GPIO_INPUT);
#endif
#endif
return 0;
}
SYS_INIT(pinmux_mikoto_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);

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 0x1000
-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 @@
# Copyright (c) 2021 Nick Winans
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_NICE60

View file

@ -0,0 +1,6 @@
# Copyright (c) 2021 Nick Winans
# SPDX-License-Identifier: MIT
config BOARD_NICE60
bool "nice!60"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,31 @@
# Copyright (c) 2021 Nick Winans
# SPDX-License-Identifier: MIT
if BOARD_NICE60
config ZMK_KEYBOARD_NAME
default "nice!60"
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 ZMK_BATTERY_VOLTAGE_DIVIDER
default y
endif # BOARD_NICE60

View file

@ -0,0 +1,9 @@
# nice!60
![nice!60](https://i.imgur.com/0YWv5PE.png)
The nice!60 is a hotswap 60% made by Nice Keyboards. https://nicekeyboards.com/nice-60
## Building nice!60 ZMK firmware
```
west build -p -b nice60
```

View file

@ -0,0 +1,7 @@
# Copyright (c) 2021 Nick Winans
# SPDX-License-Identifier: MIT
set(OPENOCD_NRF5_SUBFAMILY nrf52)
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)

View file

@ -0,0 +1,172 @@
/*
* Copyright (c) 2021 Nick Winans
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/zmk/matrix_transform.h>
/ {
model = "nice!60";
compatible = "nice,60";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
zmk,underglow = &led_strip;
};
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,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,9) RC(4,10) RC(4,11) RC(4,13)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio1 3 GPIO_ACTIVE_HIGH>
, <&gpio1 7 GPIO_ACTIVE_HIGH>
, <&gpio1 4 GPIO_ACTIVE_HIGH>
, <&gpio1 6 GPIO_ACTIVE_HIGH>
, <&gpio1 5 GPIO_ACTIVE_HIGH>
, <&gpio1 1 GPIO_ACTIVE_HIGH>
, <&gpio1 2 GPIO_ACTIVE_HIGH>
;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
};
vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 2>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>;
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&spi0 {
compatible = "nordic,nrf-spim";
/* Cannot be used together with i2c0. */
status = "okay";
sck-pin = <12>;
mosi-pin = <27>;
miso-pin = <13>;
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 = <12>; /* LED strip length */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
&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>;
sd_partition: partition@0 {
label = "mbr";
reg = <0x00000000 0x00001000>;
};
code_partition: partition@1000 {
label = "code_partition";
reg = <0x00001000 0x000d3000>;
};
/*
* The flash starting at 0x000d4000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@d4000 {
label = "storage";
reg = <0x000d4000 0x00020000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -0,0 +1,50 @@
/*
* Copyright (c) 2021 Nick Winans
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/bt.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | WIN | MO(1) | CTL |
// ------------------------------------------------------------------------------------------
bindings = <
&gresc &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&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 SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &mo 1 &kp RCTRL
>;
};
rgb_layer {
// ------------------------------------------------------------------------------------------------
// | BT CLR | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | EFFECT REV |
// | BT 1 | | UP | | HUEUP | SATUP | BRIUP | SPDUP | | | | | | |
// | BT 2 | LT | DN | RT | HUEDN | SATDN | BRIDN | SPDDN | | | | | EFFECT FORW |
// | BT 3 | | | | | | | | | | | |
// | BT 4 | | | TOG RGB | PRT SCR | | | DEL |
// ------------------------------------------------------------------------------------------------
bindings = <
&bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR
&bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans
&bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF
&bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL
>;
};
};
};

View file

@ -0,0 +1,14 @@
identifier: nice60
name: nice!60
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,12 @@
file_format: "1"
id: nice60
name: nice!60
type: board
arch: arm
features:
- keys
- underglow
outputs:
- usb
- ble
url: https://nicekeyboards.com/nice-60

View file

@ -0,0 +1,27 @@
# Copyright (c) 2021 Nick Winans
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_NICE60=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_ZMK_RGB_UNDERGLOW=y
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3

View file

@ -4,4 +4,4 @@ config BOARD_ENABLE_DCDC
bool "Enable DCDC mode" bool "Enable DCDC mode"
select SOC_DCDC_NRF52X select SOC_DCDC_NRF52X
default y default y
depends on BOARD_NICE_NANO depends on (BOARD_NICE_NANO || BOARD_NICE_NANO_V2)

View file

@ -7,3 +7,7 @@ config BOARD_NICE_NANO
bool "nice!nano" bool "nice!nano"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_NICE_NANO_V2
bool "nice!nano v2"
depends on SOC_NRF52840_QIAA

View file

@ -1,7 +1,7 @@
# Copyright (c) 2020 Pete Johanson # Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
if BOARD_NICE_NANO if BOARD_NICE_NANO || BOARD_NICE_NANO_V2
config BOARD config BOARD
default "nice_nano" default "nice_nano"
@ -25,7 +25,18 @@ config ZMK_BLE
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2
if BOARD_NICE_NANO
config ZMK_BATTERY_VOLTAGE_DIVIDER config ZMK_BATTERY_VOLTAGE_DIVIDER
default y default y
endif # BOARD_NICE_NANO endif # BOARD_NICE_NANO
if BOARD_NICE_NANO_V2
config ZMK_BATTERY_NRF_VDDH
default y
endif # BOARD_NICE_NANO_V2

View file

@ -5,7 +5,7 @@
*/ */
/ { / {
pro_micro_d: connector_d { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
@ -25,6 +25,10 @@
, <16 0 &gpio0 10 0> /* D16 */ , <16 0 &gpio0 10 0> /* D16 */
, <14 0 &gpio1 11 0> /* D14 */ , <14 0 &gpio1 11 0> /* D14 */
, <15 0 &gpio1 13 0> /* D15 */ , <15 0 &gpio1 13 0> /* D15 */
, <18 0 &gpio1 15 0> /* D18/A0 */
, <19 0 &gpio0 2 0> /* D19/A1 */
, <20 0 &gpio0 29 0> /* D20/A2 */
, <21 0 &gpio0 31 0> /* D21/A3 */
; ;
}; };
@ -34,10 +38,10 @@
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio1 15 0> /* A0 */ = <0 0 &gpio1 15 0> /* D18/A0 */
, <1 0 &gpio0 2 0> /* A1 */ , <1 0 &gpio0 2 0> /* D19/A1 */
, <2 0 &gpio0 29 0> /* A2 */ , <2 0 &gpio0 29 0> /* D20/A2 */
, <3 0 &gpio0 31 0> /* A3 */ , <3 0 &gpio0 31 0> /* D21/A3 */
, <6 0 &gpio0 22 0> /* D4/A6 */ , <6 0 &gpio0 22 0> /* D4/A6 */
, <7 0 &gpio1 0 0> /* D6/A7 */ , <7 0 &gpio1 0 0> /* D6/A7 */
, <8 0 &gpio1 4 0> /* D8/A8 */ , <8 0 &gpio1 4 0> /* D8/A8 */
@ -47,6 +51,7 @@
}; };
}; };
pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {}; pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {}; pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {}; pro_micro_serial: &uart0 {};

View file

@ -1,31 +1,13 @@
/* /*
* Copyright (c) 2020 Pete Johanson * Copyright (c) 2021 The ZMK Contributors
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
*/ */
/dts-v1/; /dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi> #include "nice_nano.dtsi"
#include "arduino_pro_micro_pins.dtsi"
/ { / {
model = "nice!nano";
compatible = "nice,nano";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
@ -40,76 +22,3 @@
full-ohms = <(2000000 + 806000)>; full-ohms = <(2000000 + 806000)>;
}; };
}; };
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
scl-pin = <20>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
};
&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>;
sd_partition: partition@0 {
label = "softdevice";
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
label = "storage";
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -0,0 +1,100 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
/ {
model = "nice!nano";
compatible = "nice,nano";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
scl-pin = <20>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
};
&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>;
sd_partition: partition@0 {
label = "softdevice";
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
label = "storage";
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -0,0 +1,10 @@
file_format: "1"
id: nice_nano
name: nice!nano v1
type: board
arch: arm
outputs:
- usb
- ble
url: https://nicekeyboards.com/nice-nano
exposes: [pro_micro]

View file

@ -0,0 +1,22 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include "nice_nano.dtsi"
/ {
ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
init-delay-ms = <10>;
};
vbatt {
compatible = "zmk,battery-nrf-vddh";
label = "BATTERY";
};
};

View file

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

View file

@ -0,0 +1,10 @@
file_format: "1"
id: nice_nano_v2
name: nice!nano v2
type: board
arch: arm
outputs:
- usb
- ble
url: https://nicekeyboards.com/nice-nano
exposes: [pro_micro]

View file

@ -0,0 +1,20 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_NICE_NANO_V2=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,10 @@
file_format: "1"
id: nrf52840_m2
name: nRF52840 M.2 Module
type: board
arch: arm
outputs:
- usb
- ble
url: https://wiki.makerdiary.com/nrf52840-m2/
exposes: [makerdiary_nrf52840_m2]

View file

@ -6,7 +6,7 @@
/ { / {
pro_micro_d: connector_d { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
@ -24,8 +24,12 @@
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */ , <10 0 &gpio1 11 0> /* D10/A10 */
, <16 0 &gpio0 28 0> /* D16 */ , <16 0 &gpio0 28 0> /* D16 */
, <14 0 &gpio0 3 0> /* D14 */ , <14 0 &gpio0 3 0> /* D14 */
, <15 0 &gpio1 13 0> /* D15 */ , <15 0 &gpio1 13 0> /* D15 */
, <18 0 &gpio0 2 0> /* D18/A0 */
, <19 0 &gpio0 29 0> /* D19/A1 */
, <20 0 &gpio0 31 0> /* D20/A2 */
, <21 0 &gpio0 30 0> /* D21/A3 */
; ;
}; };
@ -35,10 +39,10 @@
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 2 0> /* A0 */ = <0 0 &gpio0 2 0> /* D18/A0 */
, <1 0 &gpio0 29 0> /* A1 */ , <1 0 &gpio0 29 0> /* D19/A1 */
, <2 0 &gpio0 31 0> /* A2 */ , <2 0 &gpio0 31 0> /* D20/A2 */
, <3 0 &gpio0 30 0> /* A3 */ , <3 0 &gpio0 30 0> /* D21/A3 */
, <6 0 &gpio0 20 0> /* D4/A6 */ , <6 0 &gpio0 20 0> /* D4/A6 */
, <7 0 &gpio0 24 0> /* D6/A7 */ , <7 0 &gpio0 24 0> /* D6/A7 */
, <8 0 &gpio0 10 0> /* D8/A8 */ , <8 0 &gpio0 10 0> /* D8/A8 */
@ -49,6 +53,7 @@
}; };
pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {}; pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {}; pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {}; pro_micro_serial: &uart0 {};

View file

@ -5,7 +5,7 @@
*/ */
/ { / {
pro_micro_d: connector_d { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
@ -21,10 +21,14 @@
, <7 0 &gpio0 3 0> /* D7 */ , <7 0 &gpio0 3 0> /* D7 */
, <8 0 &gpio0 28 0> /* D8/A8 */ , <8 0 &gpio0 28 0> /* D8/A8 */
, <9 0 &gpio1 11 0> /* D9/A9 */ , <9 0 &gpio1 11 0> /* D9/A9 */
, <10 0 &gpio1 6 0> /* D10/A10 */ , <10 0 &gpio1 6 0> /* D10/A10 */
, <16 0 &gpio0 10 0> /* D16 */ , <16 0 &gpio0 10 0> /* D16 */
, <14 0 &gpio0 9 0> /* D14 */ , <14 0 &gpio0 9 0> /* D14 */
, <15 0 &gpio0 24 0> /* D15 */ , <15 0 &gpio0 24 0> /* D15 */
, <18 0 &gpio0 13 0> /* D18/A0 */
, <19 0 &gpio0 20 0> /* D19/A1 */
, <20 0 &gpio0 17 0> /* D20/A2 */
, <21 0 &gpio0 15 0> /* D21/A3 */
; ;
}; };
@ -34,10 +38,10 @@
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 13 0> /* A0 */ = <0 0 &gpio0 13 0> /* D18/A0 */
, <1 0 &gpio0 20 0> /* A1 */ , <1 0 &gpio0 20 0> /* D19/A1 */
, <2 0 &gpio0 17 0> /* A2 */ , <2 0 &gpio0 17 0> /* D20/A2 */
, <3 0 &gpio0 15 0> /* A3 */ , <3 0 &gpio0 15 0> /* D21/A3 */
, <6 0 &gpio0 29 0> /* D4/A6 */ , <6 0 &gpio0 29 0> /* D4/A6 */
, <7 0 &gpio1 13 0> /* D6/A7 */ , <7 0 &gpio1 13 0> /* D6/A7 */
, <8 0 &gpio0 28 0> /* D8/A8 */ , <8 0 &gpio0 28 0> /* D8/A8 */
@ -47,6 +51,7 @@
}; };
}; };
pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {}; pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {}; pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {}; pro_micro_serial: &uart0 {};

View file

@ -0,0 +1,10 @@
file_format: "1"
id: nrfmicro_11
name: nRFMicro 1.1/1.2
type: board
arch: arm
outputs:
- usb
- ble
url: https://github.com/joric/nrfmicro/
exposes: [pro_micro]

View file

@ -0,0 +1,10 @@
file_format: "1"
id: nrfmicro_11_flipped
name: nRFMicro 1.1 (flipped)
type: board
arch: arm
outputs:
- usb
- ble
url: https://github.com/joric/nrfmicro/
exposes: [pro_micro]

View file

@ -0,0 +1,10 @@
file_format: "1"
id: nrfmicro_13
name: nRFMicro 1.3/1.4
type: board
arch: arm
outputs:
- usb
- ble
url: https://github.com/joric/nrfmicro/
exposes: [pro_micro]

View file

@ -6,6 +6,7 @@
/dts-v1/; /dts-v1/;
#include <st/f3/stm32f303Xc.dtsi> #include <st/f3/stm32f303Xc.dtsi>
#include <dt-bindings/zmk/matrix_transform.h>
/ { / {
model = "Plack PCD, rev6"; model = "Plack PCD, rev6";
@ -15,11 +16,13 @@
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &layout_grid_transform;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row";
row-gpios row-gpios
= <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
@ -40,6 +43,42 @@
; ;
}; };
layout_grid_transform:
keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <8>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,5) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
>;
};
layout_mit_transform:
keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <8>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
>;
};
layout_2x2u_transform:
keymap_transform_2 {
compatible = "zmk,matrix-transform";
columns = <6>;
rows = <8>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,5) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
>;
};
}; };
&usb { &usb {

View file

@ -0,0 +1,10 @@
file_format: "1"
id: planck_rev6
name: Planck Rev6
type: board
arch: arm
features:
- keys
outputs:
- usb
url: https://olkb.com/collections/planck

View file

@ -1,7 +0,0 @@
# SPDX-License-Identifier: MIT
if(CONFIG_PINMUX)
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
endif()

View file

@ -5,7 +5,7 @@
*/ */
/ { / {
pro_micro_d: connector_d { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
@ -25,6 +25,10 @@
, <16 0 &gpiob 15 0> /* D16 */ , <16 0 &gpiob 15 0> /* D16 */
, <14 0 &gpiob 14 0> /* D14 */ , <14 0 &gpiob 14 0> /* D14 */
, <15 0 &gpiob 13 0> /* D15 */ , <15 0 &gpiob 13 0> /* D15 */
, <18 0 &gpiob 8 0> /* D18/A0 */
, <19 0 &gpioa 0 0> /* D19/A1 */
, <20 0 &gpioa 1 0> /* D20/A2 */
, <21 0 &gpioa 2 0> /* D21/A3 */
; ;
}; };
@ -34,10 +38,10 @@
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpiob 8 0> /* A0 */ = <0 0 &gpiob 8 0> /* D18/A0 */
, <1 0 &gpioa 0 0> /* A1 */ , <1 0 &gpioa 0 0> /* D19/A1 */
, <2 0 &gpioa 1 0> /* A2 */ , <2 0 &gpioa 1 0> /* D20/A2 */
, <3 0 &gpioa 2 0> /* A3 */ , <3 0 &gpioa 2 0> /* D21/A3 */
, <6 0 &gpiob 5 0> /* D4/A6 */ , <6 0 &gpiob 5 0> /* D4/A6 */
, <7 0 &gpiob 3 0> /* D6/A7 */ , <7 0 &gpiob 3 0> /* D6/A7 */
, <8 0 &gpiob 1 0> /* D8/A8 */ , <8 0 &gpiob 1 0> /* D8/A8 */
@ -47,6 +51,7 @@
}; };
}; };
pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c1 {}; pro_micro_i2c: &i2c1 {};
pro_micro_spi: &spi1 {}; pro_micro_spi: &spi2 {};
pro_micro_serial: &usart1 {}; pro_micro_serial: &usart1 {};

View file

@ -1,67 +0,0 @@
/*
* Copyright (c) 2017 I-SENSE group of ICCS
*
* SPDX-License-Identifier: MIT
*/
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <drivers/pinmux.h>
#include <sys/sys_io.h>
#include <pinmux/stm32/pinmux_stm32.h>
/* pin assignments for STM32F3DISCOVERY board */
static const struct pin_config pinconf[] = {
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) && CONFIG_SERIAL
{STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX},
{STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) && CONFIG_SERIAL
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX},
{STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C
{STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL},
{STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C
{STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL},
{STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) && CONFIG_SPI
#ifdef CONFIG_SPI_STM32_USE_HW_SS
{STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS},
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
{STM32_PIN_PA5, STM32F3_PINMUX_FUNC_PA5_SPI1_SCK},
{STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO},
{STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) && CONFIG_SPI
#ifdef CONFIG_SPI_STM32_USE_HW_SS
{STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS},
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
{STM32_PIN_PB13, STM32F3_PINMUX_FUNC_PB13_SPI2_SCK},
{STM32_PIN_PB14, STM32F3_PINMUX_FUNC_PB14_SPI2_MISO},
{STM32_PIN_PB15, STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI},
#endif
#ifdef CONFIG_USB_DC_STM32
{STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM},
{STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP},
#endif /* CONFIG_USB_DC_STM32 */
#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) && CONFIG_CAN
{STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX},
{STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX},
#endif
};
static int pinmux_stm32_init(const 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);

View file

@ -6,6 +6,7 @@
/dts-v1/; /dts-v1/;
#include <st/f3/stm32f303Xc.dtsi> #include <st/f3/stm32f303Xc.dtsi>
#include <st/f3/stm32f303c(b-c)tx-pinctrl.dtsi>
#include "arduino_pro_micro_pins.dtsi" #include "arduino_pro_micro_pins.dtsi"
/ { / {
@ -26,6 +27,18 @@
}; };
}; };
&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
};
&spi2 {
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
};
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
};
&usb { &usb {
status = "okay"; status = "okay";
}; };

View file

@ -0,0 +1,9 @@
file_format: "1"
id: proton_c
name: QMK Proton-C
type: board
arch: arm
outputs:
- usb
url: https://qmk.fm/proton-c/
exposes: [pro_micro]

View file

@ -0,0 +1,10 @@
file_format: "1"
id: makerdiary_nrf52840_m2
name: MakerDiary nRF52840 M.2
type: interconnect
url: https://wiki.makerdiary.com/nrf52840-m2/
manufacturer: MakerDiary
description: |
The MakerDiary nRF52840 M.2 module is a module using the M.2/NGFF form factor to expose a
large number of GPIO pins, allowing use of a variety of peripherals such using I2C, SPI,
etc.

View file

@ -0,0 +1,10 @@
file_format: "1"
id: pro_micro
name: Pro Micro
type: interconnect
url: https://www.sparkfun.com/products/12640
manufacturer: SparkFun
description: |
The SparkFun Pro Micro grew popular as a low cost ATmega32U4 board with sufficient GPIO and peripherals
to work for many keyboard needs. Since the original Pro Micro, many pin compatible boards have appeared,
with various changes or improvements, such as the Elite-C w/ USB-C, nice!nano with nRF52840 wireless.

View file

@ -6,3 +6,5 @@ CONFIG_ZMK_BLE=n
CONFIG_LOG=y CONFIG_LOG=y
CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_LOG_BACKEND_SHOW_COLOR=n
CONFIG_ZMK_LOG_LEVEL_DBG=y CONFIG_ZMK_LOG_LEVEL_DBG=y
CONFIG_DEBUG=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

View file

@ -0,0 +1,19 @@
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_A_DUX_LEFT
config ZMK_KEYBOARD_NAME
default "A. Dux"
config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y
endif
if SHIELD_A_DUX_LEFT || SHIELD_A_DUX_RIGHT
config ZMK_SPLIT
default y
endif

View file

@ -0,0 +1,8 @@
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_A_DUX_LEFT
def_bool $(shields_list_contains,a_dux_left)
config SHIELD_A_DUX_RIGHT
def_bool $(shields_list_contains,a_dux_right)

View file

@ -0,0 +1,15 @@
# A. Dux
Shield configuration for [Architeuthis Dux by Tapi][1] (aka A. Dux, A.D., "Giant Squid").
![Wireless Architeuthis Dux with nice!nano controllers][2]
This shield is an adaptation of the direct pin [Cradio shield by @davidphilipbarr][3].
## Cephalopoda
Check out the rest of Tapi's Cephalopoda collection of low profile split ergonomic mechanical keyboards at <https://github.com/tapioki/cephalopoda>.
[1]: https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux
[2]: https://media.discordapp.net/attachments/855822038287908864/866315666802081792/image0.jpg
[3]: https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields/cradio

View file

@ -0,0 +1,2 @@
# Copyright (c) 2021 The ZMK Contributors
# SPDX-License-Identifier: MIT

View file

@ -0,0 +1,52 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* 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 = <34>;
rows = <1>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17)
RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22)
RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27)
RC(0,15) RC(0,16) RC(0,33) RC(0,32)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios =
<&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&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,26 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ {
keymap {
compatible = "zmk,keymap";
// This is a sample keymap intended to be replaced with your own
base_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 SEMI
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH
&kp TAB &kp BSPC &kp SPACE &kp ENTER
>;
};
};
};

View file

@ -0,0 +1,11 @@
file_format: "1"
id: a_dux
name: A. Dux
type: shield
url: https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux
requires: [pro_micro]
features:
- keys
siblings:
- a_dux_left
- a_dux_right

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "a_dux.dtsi"

View file

@ -0,0 +1,11 @@
/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "a_dux.dtsi"
&default_transform {
col-offset = <17>;
};

View file

@ -4,20 +4,13 @@
if SHIELD_BFO9000_LEFT if SHIELD_BFO9000_LEFT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "BFO9000 Left" default "BFO-9000"
config ZMK_SPLIT_BLE_ROLE_CENTRAL config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y default y
endif endif
if SHIELD_BFO9000_RIGHT
config ZMK_KEYBOARD_NAME
default "BFO9000 Right"
endif
if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT
config ZMK_SPLIT config ZMK_SPLIT

View file

@ -32,12 +32,12 @@
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&pro_micro_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
}; };

View file

@ -0,0 +1,11 @@
file_format: "1"
id: bfo9000
name: BFO-9000
type: shield
url: https://keeb.io/products/bfo-9000-keyboard-customizable-full-size-split-ortholinear
requires: [pro_micro]
features:
- keys
siblings:
- bfo9000_left
- bfo9000_right

View file

@ -8,14 +8,14 @@
&kscan0 { &kscan0 {
col-gpios col-gpios
= <&pro_micro_d 9 GPIO_ACTIVE_HIGH> = <&pro_micro 9 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 10 GPIO_ACTIVE_HIGH> , <&pro_micro 10 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH> , <&pro_micro 16 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH> , <&pro_micro 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH> , <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> , <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> , <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH> , <&pro_micro 20 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH> , <&pro_micro 21 GPIO_ACTIVE_HIGH>
; ;
}; };

View file

@ -12,14 +12,14 @@
&kscan0 { &kscan0 {
col-gpios col-gpios
= <&pro_micro_d 9 GPIO_ACTIVE_HIGH> = <&pro_micro 9 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 10 GPIO_ACTIVE_HIGH> , <&pro_micro 10 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH> , <&pro_micro 16 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH> , <&pro_micro 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH> , <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> , <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> , <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH> , <&pro_micro 20 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH> , <&pro_micro 21 GPIO_ACTIVE_HIGH>
; ;
}; };

View file

@ -17,16 +17,16 @@
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&pro_micro_a 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios col-gpios
= <&pro_micro_d 10 GPIO_ACTIVE_HIGH> = <&pro_micro 10 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH> , <&pro_micro 16 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH> , <&pro_micro 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH> , <&pro_micro 15 GPIO_ACTIVE_HIGH>
; ;
}; };
}; };

View file

@ -0,0 +1,8 @@
file_format: "1"
id: boardsource3x4
name: Boardsource 3x4 Macropad
type: shield
url: https://boardsource.xyz/store/5ecc2008eee64242946c98c1
requires: [pro_micro]
features:
- keys

View file

@ -8,13 +8,6 @@ config ZMK_SPLIT_BLE_ROLE_CENTRAL
endif endif
if SHIELD_CORNE_RIGHT
config ZMK_KEYBOARD_NAME
default "Corne Right"
endif
if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT
config ZMK_SPLIT config ZMK_SPLIT

View file

@ -50,10 +50,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
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
}; };

View file

@ -16,40 +16,40 @@
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP | // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | SHFT | // | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC |
// | GUI | LWR | SPC | | ENT | RSE | ALT | // | GUI | LWR | SPC | | ENT | RSE | ALT |
bindings = < bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
>; >;
}; };
lower_layer { lower_layer {
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | // | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | // | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
// | SHFT | | | | | | | | | | | | | // | SHFT | | | | | | | | | | | | |
// | GUI | | SPC | | ENT | | ALT | // | GUI | | SPC | | ENT | | ALT |
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &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 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>; >;
}; };
raise_layer { raise_layer {
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
// | ESC | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP | // | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | { | } | "|" | ` | // | CTRL | | | | | | | - | = | [ | ] | \ | ` |
// | SHFT | | | | | | | _ | + | [ | ] | \ | ~ | // TODO: Fix this row when &mkp is committed // | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
// | GUI | | SPC | | ENT | | ALT | // | GUI | | SPC | | ENT | | ALT |
bindings = < bindings = <
&kp ESC &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC &kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp PIPE &kp GRAVE &kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH &kp TILDE &kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>; >;
}; };
}; };

View file

@ -0,0 +1,14 @@
file_format: "1"
id: corne
name: Corne
type: shield
url: https://github.com/foostan/crkbd/
requires: [pro_micro]
exposes: [i2c_oled]
features:
- keys
- display
- underglow
siblings:
- corne_left
- corne_right

View file

@ -8,11 +8,11 @@
&kscan0 { &kscan0 {
col-gpios col-gpios
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH> = <&pro_micro 21 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH> , <&pro_micro 20 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> , <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> , <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH> , <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH> , <&pro_micro 14 GPIO_ACTIVE_HIGH>
; ;
}; };

View file

@ -12,11 +12,11 @@
&kscan0 { &kscan0 {
col-gpios col-gpios
= <&pro_micro_d 14 GPIO_ACTIVE_HIGH> = <&pro_micro 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH> , <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> , <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> , <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH> , <&pro_micro 20 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH> , <&pro_micro 21 GPIO_ACTIVE_HIGH>
; ;
}; };

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