Merge branch 'main' into settings-reset-bootloader
This commit is contained in:
commit
e87618eca5
905 changed files with 14993 additions and 12368 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM docker.io/zmkfirmware/zmk-dev-arm:3.0
|
FROM docker.io/zmkfirmware/zmk-dev-arm:3.2
|
||||||
|
|
||||||
COPY .bashrc tmp
|
COPY .bashrc tmp
|
||||||
RUN mv /tmp/.bashrc ~/.bashrc
|
RUN mv /tmp/.bashrc ~/.bashrc
|
||||||
|
|
24
.github/pull_request_template.md
vendored
24
.github/pull_request_template.md
vendored
|
@ -1,13 +1,15 @@
|
||||||
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
||||||
|
|
||||||
## Board/Shield Check-list
|
## 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))
|
- [ ] This board/shield is tested working on real hardware
|
||||||
- [ ] `.zmk.yml` metadata file added
|
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
|
||||||
- [ ] 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)
|
- [ ] `.zmk.yml` metadata file added
|
||||||
- [ ] General consistent formatting of DeviceTree files
|
- [ ] 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)
|
||||||
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
- [ ] General consistent formatting of DeviceTree files
|
||||||
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
||||||
- [ ] If split, no name added for the right/peripheral half
|
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
||||||
- [ ] Kconfig.defconfig file correctly wraps *all* configuration in conditional on the shield symbol
|
- [ ] If split, no name added for the right/peripheral half
|
||||||
- [ ] `.conf` file has optional extra features commented out
|
- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol
|
||||||
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
|
- [ ] `.conf` file has optional extra features commented out
|
||||||
|
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
|
||||||
|
|
4
.github/workflows/build-user-config.yml
vendored
4
.github/workflows/build-user-config.yml
vendored
|
@ -19,8 +19,8 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
archive_name:
|
archive_name:
|
||||||
description: 'Archive output file name'
|
description: "Archive output file name"
|
||||||
default: 'firmware'
|
default: "firmware"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
||||||
needs: compile-matrix
|
needs: compile-matrix
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
29
.github/workflows/clang-format-lint.yml
vendored
29
.github/workflows/clang-format-lint.yml
vendored
|
@ -1,29 +0,0 @@
|
||||||
name: Clang Format
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- ".github/workflows/clang-format-lint.yml"
|
|
||||||
- "app/boards/**/*.c"
|
|
||||||
- "app/include/**/*.h"
|
|
||||||
- "app/src/**"
|
|
||||||
- "app/drivers/**/*.c"
|
|
||||||
- "app/drivers/**/*.h"
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- ".github/workflows/clang-format-lint.yml"
|
|
||||||
- "app/boards/**/*.c"
|
|
||||||
- "app/include/**/*.h"
|
|
||||||
- "app/src/**"
|
|
||||||
- "app/drivers/**/*.c"
|
|
||||||
- "app/drivers/**/*.h"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: DoozyX/clang-format-lint-action@v0.13
|
|
||||||
with:
|
|
||||||
source: "./app"
|
|
||||||
extensions: "h,c"
|
|
10
.github/workflows/doc-checks.yml
vendored
10
.github/workflows/doc-checks.yml
vendored
|
@ -21,16 +21,6 @@ jobs:
|
||||||
- name: ESLint
|
- name: ESLint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
prettier:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
with:
|
|
||||||
working-directory: docs
|
|
||||||
- name: Prettier check
|
|
||||||
run: npm run prettier:check
|
|
||||||
working-directory: docs
|
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -15,21 +15,10 @@ on:
|
||||||
- "app/scripts/west_commands/metadata.py"
|
- "app/scripts/west_commands/metadata.py"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-metadata-format:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
with:
|
|
||||||
working-directory: app
|
|
||||||
- name: Prettier Check
|
|
||||||
run: npm run prettier:check
|
|
||||||
working-directory: app
|
|
||||||
validate-metadata:
|
validate-metadata:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.0
|
image: docker.io/zmkfirmware/zmk-dev-arm:3.2
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
15
.github/workflows/pre-commit.yml
vendored
Normal file
15
.github/workflows/pre-commit.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
name: pre-commit
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre-commit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- uses: pre-commit/action@v3.0.0
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -33,7 +33,7 @@ jobs:
|
||||||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
|
@ -1,12 +1,28 @@
|
||||||
fail_fast: false
|
fail_fast: false
|
||||||
repos:
|
repos:
|
||||||
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||||
|
rev: v1.5.1
|
||||||
|
hooks:
|
||||||
|
- id: remove-tabs
|
||||||
|
exclude: "vendor-prefixes\\.txt$"
|
||||||
- repo: https://github.com/pocc/pre-commit-hooks
|
- repo: https://github.com/pocc/pre-commit-hooks
|
||||||
rev: v1.1.1
|
rev: v1.3.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
args:
|
args:
|
||||||
- -i
|
- -i
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: v2.2.1
|
rev: v2.7.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
|
# Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29
|
||||||
|
additional_dependencies:
|
||||||
|
- prettier@2.8.7
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.4.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-shebang-scripts-are-executable
|
||||||
|
exclude: "\\.mustache$"
|
||||||
|
|
|
@ -51,7 +51,9 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_transparent.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_none.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c)
|
||||||
|
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c)
|
||||||
|
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c)
|
||||||
target_sources(app PRIVATE src/combo.c)
|
target_sources(app PRIVATE src/combo.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
|
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
|
||||||
target_sources(app PRIVATE src/behavior_queue.c)
|
target_sources(app PRIVATE src/behavior_queue.c)
|
||||||
|
|
72
app/Kconfig
72
app/Kconfig
|
@ -120,7 +120,13 @@ menuconfig ZMK_BLE
|
||||||
|
|
||||||
if ZMK_BLE
|
if ZMK_BLE
|
||||||
|
|
||||||
|
choice BT_LL_SW_LLCP_IMPL
|
||||||
|
default BT_LL_SW_LLCP_LEGACY
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
config SYSTEM_WORKQUEUE_STACK_SIZE
|
config SYSTEM_WORKQUEUE_STACK_SIZE
|
||||||
|
default 4096 if SOC_RP2040
|
||||||
default 2048
|
default 2048
|
||||||
|
|
||||||
config ZMK_BLE_THREAD_STACK_SIZE
|
config ZMK_BLE_THREAD_STACK_SIZE
|
||||||
|
@ -354,11 +360,7 @@ config ZMK_BEHAVIORS_QUEUE_SIZE
|
||||||
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE := zmk,behavior-key-toggle
|
rsource "Kconfig.behaviors"
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_KEY_TOGGLE
|
|
||||||
bool
|
|
||||||
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE))
|
|
||||||
|
|
||||||
config ZMK_MACRO_DEFAULT_WAIT_MS
|
config ZMK_MACRO_DEFAULT_WAIT_MS
|
||||||
int "Default time to wait (in milliseconds) before triggering the next behavior in macros"
|
int "Default time to wait (in milliseconds) before triggering the next behavior in macros"
|
||||||
|
@ -404,7 +406,18 @@ config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
||||||
#KSCAN Settings
|
#KSCAN Settings
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "USB Logging"
|
menu "Logging"
|
||||||
|
|
||||||
|
config ZMK_LOGGING_MINIMAL
|
||||||
|
bool "Suppress all ZMK debug log messages"
|
||||||
|
default false
|
||||||
|
|
||||||
|
if !ZMK_LOGGING_MINIMAL
|
||||||
|
|
||||||
|
config ZMK_LOG_LEVEL
|
||||||
|
default 4
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
config ZMK_USB_LOGGING
|
config ZMK_USB_LOGGING
|
||||||
bool "Enable USB CDC ACM logging to help debug"
|
bool "Enable USB CDC ACM logging to help debug"
|
||||||
|
@ -421,29 +434,54 @@ config ZMK_USB_LOGGING
|
||||||
|
|
||||||
if ZMK_USB_LOGGING
|
if ZMK_USB_LOGGING
|
||||||
|
|
||||||
config ZMK_LOG_LEVEL
|
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
|
||||||
default 4
|
default USB_CDC_ACM_LOG_LEVEL_OFF
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
choice USB_DRIVER_LOG_LEVEL_CHOICE
|
||||||
|
default USB_DRIVER_LOG_LEVEL_OFF
|
||||||
|
endchoice
|
||||||
|
|
||||||
# We do this to avoid log loop where logging to USB generates more log messages.
|
# We do this to avoid log loop where logging to USB generates more log messages.
|
||||||
config USB_CDC_ACM_LOG_LEVEL
|
|
||||||
default 1
|
|
||||||
|
|
||||||
config USB_CDC_ACM_RINGBUF_SIZE
|
config USB_CDC_ACM_RINGBUF_SIZE
|
||||||
default 1024
|
default 1024
|
||||||
|
|
||||||
config LOG_BUFFER_SIZE
|
|
||||||
default 8192
|
|
||||||
|
|
||||||
config LOG_STRDUP_BUF_COUNT
|
|
||||||
default 16
|
|
||||||
|
|
||||||
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
|
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
|
||||||
default 1000
|
default 1000
|
||||||
|
|
||||||
#ZMK_USB_LOGGING
|
#ZMK_USB_LOGGING
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#USB Logging
|
config ZMK_RTT_LOGGING
|
||||||
|
bool "Enable RTT logging to help debug"
|
||||||
|
select LOG
|
||||||
|
select DEBUG
|
||||||
|
select ASSERT
|
||||||
|
select USE_SEGGER_RTT
|
||||||
|
select CONSOLE
|
||||||
|
select RTT_CONSOLE
|
||||||
|
|
||||||
|
if ZMK_RTT_LOGGING
|
||||||
|
|
||||||
|
config SEGGER_RTT_BUFFER_SIZE_UP
|
||||||
|
default 8192
|
||||||
|
|
||||||
|
#ZMK_RTT_LOGGING
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
||||||
|
|
||||||
|
config LOG_BUFFER_SIZE
|
||||||
|
default 8192
|
||||||
|
|
||||||
|
config LOG_PROCESS_THREAD_SLEEP_MS
|
||||||
|
default 100
|
||||||
|
|
||||||
|
#ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
||||||
|
endif
|
||||||
|
|
||||||
|
#Logging
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
if SETTINGS
|
if SETTINGS
|
||||||
|
|
24
app/Kconfig.behaviors
Normal file
24
app/Kconfig.behaviors
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config ZMK_BEHAVIOR_KEY_TOGGLE
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED
|
||||||
|
|
||||||
|
|
||||||
|
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
|
||||||
|
config ZMK_BEHAVIOR_SENSOR_ROTATE
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_ENABLED
|
||||||
|
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
||||||
|
|
||||||
|
config ZMK_BEHAVIOR_SENSOR_ROTATE_VAR
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR_ENABLED
|
||||||
|
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
6
app/boards/01space_rp2040_042lcd.conf
Normal file
6
app/boards/01space_rp2040_042lcd.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CONFIG_ZMK_DISPLAY=y
|
||||||
|
CONFIG_LV_FONT_UNSCII_8=n
|
||||||
|
CONFIG_ZMK_USB=y
|
||||||
|
CONFIG_I2C=y
|
||||||
|
CONFIG_I2C_DW=y
|
||||||
|
CONFIG_LV_Z_VDB_SIZE=50
|
9
app/boards/01space_rp2040_042lcd.overlay
Normal file
9
app/boards/01space_rp2040_042lcd.overlay
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "usb_console.dtsi"
|
||||||
|
|
||||||
|
&xiao_serial { status = "disabled"; };
|
4
app/boards/adafruit_kb2040.conf
Normal file
4
app/boards/adafruit_kb2040.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
CONFIG_CONSOLE=n
|
||||||
|
CONFIG_SERIAL=n
|
||||||
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_ZMK_USB=y
|
9
app/boards/adafruit_kb2040.overlay
Normal file
9
app/boards/adafruit_kb2040.overlay
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "usb_console.dtsi"
|
||||||
|
|
||||||
|
&pro_micro_serial { status = "disabled"; };
|
4
app/boards/adafruit_qt_py_rp2040.conf
Normal file
4
app/boards/adafruit_qt_py_rp2040.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
CONFIG_CONSOLE=n
|
||||||
|
CONFIG_SERIAL=n
|
||||||
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_ZMK_USB=y
|
9
app/boards/adafruit_qt_py_rp2040.overlay
Normal file
9
app/boards/adafruit_qt_py_rp2040.overlay
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "usb_console.dtsi"
|
||||||
|
|
||||||
|
&xiao_serial { status = "disabled"; };
|
9
app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml
Normal file
9
app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: adafruit_kb2040
|
||||||
|
name: Adafruit KB2040
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
url: https://www.adafruit.com/product/5302
|
||||||
|
exposes: [pro_micro]
|
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: adafruit_qt_py_rp2040
|
||||||
|
name: Adafruit QT Py RP2040
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
url: https://www.adafruit.com/product/4900
|
||||||
|
exposes: [seeed_xiao]
|
39
app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi
Normal file
39
app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_default: uart0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
group2 {
|
||||||
|
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0_sleep: uart0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
||||||
|
<NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_default: i2c0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 20)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_sleep: i2c0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 20)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
#include "bluemicro840_v1-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "BlueMicro840_V1";
|
model = "BlueMicro840_V1";
|
||||||
|
@ -62,15 +63,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twim";
|
||||||
sda-pin = <15>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <17>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
rx-pin = <8>;
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -7,6 +7,8 @@ CONFIG_BOARD_BLUEMICRO840_V1=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
9
app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml
Normal file
9
app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: boardsource_blok
|
||||||
|
name: BoardSource blok
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
url: https://peg.software/docs/blok
|
||||||
|
exposes: [pro_micro]
|
|
@ -56,7 +56,7 @@
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL
|
&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 INS &kp DEL
|
||||||
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &reset
|
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &sys_reset
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans
|
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
|
||||||
&trans &trans &trans &bootloader &trans &trans &trans
|
&trans &trans &trans &bootloader &trans &trans &trans
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||||
&reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
&sys_reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp F1
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp F1
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
|
|
|
@ -42,12 +42,12 @@ config USB_DEVICE_STACK
|
||||||
endif # USB
|
endif # USB
|
||||||
|
|
||||||
config ZMK_DISPLAY
|
config ZMK_DISPLAY
|
||||||
select LVGL_USE_CONT
|
select LV_USE_CONT
|
||||||
select LVGL_FONT_MONTSERRAT_26
|
select LV_FONT_MONTSERRAT_26
|
||||||
select LVGL_FONT_MONTSERRAT_20
|
select LV_FONT_MONTSERRAT_20
|
||||||
select LVGL_FONT_MONTSERRAT_16
|
select LV_FONT_MONTSERRAT_16
|
||||||
select LVGL_USE_LABEL
|
select LV_USE_LABEL
|
||||||
select LVGL_USE_IMG
|
select LV_USE_IMG
|
||||||
|
|
||||||
choice ZMK_DISPLAY_STATUS_SCREEN
|
choice ZMK_DISPLAY_STATUS_SCREEN
|
||||||
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
||||||
|
|
|
@ -53,12 +53,31 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
spi0_default: spi0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||||
|
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||||
|
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi0_sleep: spi0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||||
|
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||||
|
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
sck-pin = <27>;
|
pinctrl-0 = <&spi0_default>;
|
||||||
mosi-pin = <8>;
|
pinctrl-1 = <&spi0_sleep>;
|
||||||
miso-pin = <22>;
|
pinctrl-names = "default", "sleep";
|
||||||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||||
|
|
||||||
epd: il0323@0 {
|
epd: il0323@0 {
|
||||||
|
|
|
@ -13,6 +13,9 @@ CONFIG_ZMK_DISPLAY=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# enable pinctrl
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
@ -39,17 +42,15 @@ CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||||
CONFIG_SSD1306=n
|
CONFIG_SSD1306=n
|
||||||
CONFIG_IL0323=y
|
CONFIG_IL0323=y
|
||||||
CONFIG_LVGL_BITS_PER_PIXEL=1
|
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||||
CONFIG_LVGL_COLOR_DEPTH_1=y
|
CONFIG_LV_COLOR_DEPTH_1=y
|
||||||
CONFIG_LVGL_DPI=145
|
CONFIG_LV_DPI_DEF=145
|
||||||
CONFIG_LVGL_VDB_SIZE=100
|
CONFIG_LV_Z_VDB_SIZE=100
|
||||||
CONFIG_LVGL_USE_THEME_MONO=y
|
CONFIG_LV_USE_THEME_MONO=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n
|
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n
|
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y
|
CONFIG_LV_FONT_MONTSERRAT_26=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y
|
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y
|
|
||||||
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
|
|
||||||
|
|
||||||
# custom status screens
|
# custom status screens
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
||||||
|
@ -73,19 +74,3 @@ CONFIG_ZMK_WIDGET_LAYER_STATUS=n
|
||||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||||
#CONFIG_LVGL_USE_DEBUG=y
|
#CONFIG_LVGL_USE_DEBUG=y
|
||||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||||
|
|
||||||
# Turn on USB CDC ACM device
|
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
|
||||||
CONFIG_USB_CDC_ACM=y
|
|
||||||
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024
|
|
||||||
|
|
||||||
# Enable serial console
|
|
||||||
CONFIG_SERIAL=y
|
|
||||||
CONFIG_CONSOLE=y
|
|
||||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
|
||||||
CONFIG_UART_LINE_CTRL=y
|
|
||||||
|
|
||||||
# Enable USB UART
|
|
||||||
CONFIG_UART_CONSOLE=y
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,12 +60,31 @@
|
||||||
col-offset = <6>;
|
col-offset = <6>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
spi0_default: spi0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||||
|
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||||
|
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi0_sleep: spi0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||||
|
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||||
|
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
sck-pin = <20>;
|
pinctrl-0 = <&spi0_default>;
|
||||||
mosi-pin = <24>;
|
pinctrl-1 = <&spi0_sleep>;
|
||||||
miso-pin = <27>;
|
pinctrl-names = "default", "sleep";
|
||||||
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||||
|
|
||||||
epd: il0323@0 {
|
epd: il0323@0 {
|
||||||
|
|
|
@ -13,6 +13,9 @@ CONFIG_ZMK_DISPLAY=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# enable pinctrl
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
@ -39,17 +42,15 @@ CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||||
CONFIG_SSD1306=n
|
CONFIG_SSD1306=n
|
||||||
CONFIG_IL0323=y
|
CONFIG_IL0323=y
|
||||||
CONFIG_LVGL_BITS_PER_PIXEL=1
|
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||||
CONFIG_LVGL_COLOR_DEPTH_1=y
|
CONFIG_LV_COLOR_DEPTH_1=y
|
||||||
CONFIG_LVGL_DPI=145
|
CONFIG_LV_DPI_DEF=145
|
||||||
CONFIG_LVGL_VDB_SIZE=100
|
CONFIG_LV_Z_VDB_SIZE=100
|
||||||
CONFIG_LVGL_USE_THEME_MONO=y
|
CONFIG_LV_USE_THEME_MONO=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n
|
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n
|
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y
|
CONFIG_LV_FONT_MONTSERRAT_26=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y
|
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
||||||
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y
|
|
||||||
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
|
|
||||||
|
|
||||||
# custom status screens
|
# custom status screens
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
||||||
|
@ -72,12 +73,3 @@ CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n
|
||||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||||
#CONFIG_LVGL_USE_DEBUG=y
|
#CONFIG_LVGL_USE_DEBUG=y
|
||||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||||
|
|
||||||
# Enable serial console
|
|
||||||
CONFIG_SERIAL=y
|
|
||||||
CONFIG_CONSOLE=y
|
|
||||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
|
||||||
CONFIG_UART_LINE_CTRL=y
|
|
||||||
|
|
||||||
# Enable USB UART
|
|
||||||
CONFIG_UART_CONSOLE=y
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "widgets/layer_status.h"
|
#include "widgets/layer_status.h"
|
||||||
#include "custom_status_screen.h"
|
#include "custom_status_screen.h"
|
||||||
|
|
||||||
#include <logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
LV_IMG_DECLARE(zenlogo);
|
LV_IMG_DECLARE(zenlogo);
|
||||||
|
@ -36,50 +36,42 @@ static struct zmk_widget_layer_status layer_status_widget;
|
||||||
lv_obj_t *zmk_display_status_screen() {
|
lv_obj_t *zmk_display_status_screen() {
|
||||||
|
|
||||||
lv_obj_t *screen;
|
lv_obj_t *screen;
|
||||||
screen = lv_obj_create(NULL, NULL);
|
screen = lv_obj_create(NULL);
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
||||||
zmk_widget_battery_status_init(&battery_status_widget, screen);
|
zmk_widget_battery_status_init(&battery_status_widget, screen);
|
||||||
lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), NULL, LV_ALIGN_IN_TOP_MID,
|
lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), LV_ALIGN_TOP_MID, 0, 2);
|
||||||
0, 2);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
||||||
zmk_widget_output_status_init(&output_status_widget, screen);
|
zmk_widget_output_status_init(&output_status_widget, screen);
|
||||||
lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), NULL, LV_ALIGN_IN_TOP_MID, 0,
|
lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_TOP_MID, 0, 41);
|
||||||
41);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
||||||
zmk_widget_peripheral_status_init(&peripheral_status_widget, screen);
|
zmk_widget_peripheral_status_init(&peripheral_status_widget, screen);
|
||||||
lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), NULL,
|
lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), LV_ALIGN_TOP_MID, 0,
|
||||||
LV_ALIGN_IN_TOP_MID, 0, 41);
|
41);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
||||||
zmk_widget_layer_status_init(&layer_status_widget, screen);
|
|
||||||
lv_obj_set_style_local_text_font(zmk_widget_layer_status_obj(&layer_status_widget),
|
|
||||||
LV_LABEL_PART_MAIN, LV_STATE_DEFAULT,
|
|
||||||
lv_theme_get_font_small());
|
|
||||||
lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), NULL, LV_ALIGN_IN_BOTTOM_MID, 0,
|
|
||||||
-5);
|
|
||||||
|
|
||||||
lv_obj_t *LayersHeading;
|
lv_obj_t *LayersHeading;
|
||||||
LayersHeading = lv_img_create(screen, NULL);
|
LayersHeading = lv_img_create(screen);
|
||||||
lv_obj_align(LayersHeading, NULL, LV_ALIGN_IN_BOTTOM_MID, 8, 5);
|
lv_obj_align(LayersHeading, LV_ALIGN_BOTTOM_MID, 0, -30);
|
||||||
lv_img_set_src(LayersHeading, &layers2);
|
lv_img_set_src(LayersHeading, &layers2);
|
||||||
|
|
||||||
|
zmk_widget_layer_status_init(&layer_status_widget, screen);
|
||||||
|
lv_obj_set_style_text_font(zmk_widget_layer_status_obj(&layer_status_widget),
|
||||||
|
&lv_font_montserrat_16, LV_PART_MAIN);
|
||||||
|
lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_MID, 0, -5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||||
lv_obj_t *zenlogo_icon;
|
lv_obj_t *zenlogo_icon;
|
||||||
zenlogo_icon = lv_img_create(screen, NULL);
|
zenlogo_icon = lv_img_create(screen);
|
||||||
lv_img_set_src(zenlogo_icon, &zenlogo);
|
lv_img_set_src(zenlogo_icon, &zenlogo);
|
||||||
lv_obj_align(zenlogo_icon, NULL, LV_ALIGN_IN_BOTTOM_MID, 2, -5);
|
lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 0, -5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// lv_task_handler();
|
|
||||||
lv_refr_now(NULL);
|
|
||||||
// display_blanking_off(display_dev);
|
|
||||||
|
|
||||||
return screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <bluetooth/services/bas.h>
|
#include <zephyr/bluetooth/services/bas.h>
|
||||||
|
|
||||||
#include <logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
#include <zmk/display.h>
|
#include <zmk/display.h>
|
||||||
#include "battery_status.h"
|
#include "battery_status.h"
|
||||||
#include <src/lv_themes/lv_theme.h>
|
|
||||||
#include <zmk/usb.h>
|
#include <zmk/usb.h>
|
||||||
#include <zmk/events/usb_conn_state_changed.h>
|
#include <zmk/events/usb_conn_state_changed.h>
|
||||||
#include <zmk/event_manager.h>
|
#include <zmk/event_manager.h>
|
||||||
|
@ -84,7 +83,7 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed);
|
||||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||||
|
|
||||||
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) {
|
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) {
|
||||||
widget->obj = lv_img_create(parent, NULL);
|
widget->obj = lv_img_create(parent);
|
||||||
|
|
||||||
sys_slist_append(&widgets, &widget->node);
|
sys_slist_append(&widgets, &widget->node);
|
||||||
widget_battery_status_init();
|
widget_battery_status_init();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
|
||||||
struct zmk_widget_battery_status {
|
struct zmk_widget_battery_status {
|
||||||
sys_snode_t node;
|
sys_snode_t node;
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
#include <zmk/display.h>
|
#include <zmk/display.h>
|
||||||
|
@ -54,7 +54,7 @@ ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, laye
|
||||||
ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed);
|
ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed);
|
||||||
|
|
||||||
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) {
|
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) {
|
||||||
widget->obj = lv_label_create(parent, NULL);
|
widget->obj = lv_label_create(parent);
|
||||||
|
|
||||||
sys_slist_append(&widgets, &widget->node);
|
sys_slist_append(&widgets, &widget->node);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
|
||||||
struct zmk_widget_layer_status {
|
struct zmk_widget_layer_status {
|
||||||
sys_snode_t node;
|
sys_snode_t node;
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <bluetooth/services/bas.h>
|
#include <zephyr/bluetooth/services/bas.h>
|
||||||
|
|
||||||
#include <logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
#include <zmk/display.h>
|
#include <zmk/display.h>
|
||||||
|
@ -123,9 +123,7 @@ ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) {
|
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) {
|
||||||
widget->obj = lv_img_create(parent, NULL);
|
widget->obj = lv_img_create(parent);
|
||||||
|
|
||||||
lv_obj_set_size(widget->obj, 40, 15);
|
|
||||||
|
|
||||||
sys_slist_append(&widgets, &widget->node);
|
sys_slist_append(&widgets, &widget->node);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
|
||||||
struct zmk_widget_output_status {
|
struct zmk_widget_output_status {
|
||||||
sys_snode_t node;
|
sys_snode_t node;
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <bluetooth/services/bas.h>
|
#include <zephyr/bluetooth/services/bas.h>
|
||||||
|
|
||||||
#include <logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
#include <zmk/display.h>
|
#include <zmk/display.h>
|
||||||
|
@ -48,7 +48,7 @@ ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed);
|
||||||
|
|
||||||
int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget,
|
int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget,
|
||||||
lv_obj_t *parent) {
|
lv_obj_t *parent) {
|
||||||
widget->obj = lv_img_create(parent, NULL);
|
widget->obj = lv_img_create(parent);
|
||||||
|
|
||||||
sys_slist_append(&widgets, &widget->node);
|
sys_slist_append(&widgets, &widget->node);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
|
||||||
struct zmk_widget_peripheral_status {
|
struct zmk_widget_peripheral_status {
|
||||||
sys_snode_t node;
|
sys_snode_t node;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# Building ZMK for the Ferris 0.2
|
# Building ZMK for the Ferris 0.2
|
||||||
|
|
||||||
|
|
||||||
## Standard Build
|
## Standard Build
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -104,11 +104,10 @@
|
||||||
clock-frequency = <I2C_BITRATE_FAST>;
|
clock-frequency = <I2C_BITRATE_FAST>;
|
||||||
|
|
||||||
right_io: mcp23017@20 {
|
right_io: mcp23017@20 {
|
||||||
compatible = "microchip,mcp23017";
|
compatible = "microchip,mcp230xx";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
gpio-controller;
|
gpio-controller;
|
||||||
reg = <0x20>;
|
reg = <0x20>;
|
||||||
label = "RIGHT_IO";
|
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
ngpios = <16>;
|
ngpios = <16>;
|
||||||
};
|
};
|
||||||
|
@ -116,6 +115,10 @@
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&clk_hsi {
|
&clk_hsi {
|
||||||
|
@ -139,10 +142,6 @@
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
cdc_acm_uart: cdc_acm_uart {
|
|
||||||
compatible = "zephyr,cdc-acm-uart";
|
|
||||||
label = "CDC_ACM_0";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
|
|
|
@ -20,9 +20,6 @@ CONFIG_ZMK_USB=y
|
||||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
||||||
CONFIG_USB_SELF_POWERED=n
|
CONFIG_USB_SELF_POWERED=n
|
||||||
|
|
||||||
# Enable IO multiplexer
|
|
||||||
CONFIG_GPIO_MCP23017=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
|
||||||
|
|
||||||
|
|
39
app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi
Normal file
39
app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_default: uart0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 4)>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
group2 {
|
||||||
|
psels = <NRF_PSEL(UART_TX, 0, 8)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0_sleep: uart0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 4)>,
|
||||||
|
<NRF_PSEL(UART_TX, 0, 8)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_default: i2c0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 20)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_sleep: i2c0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 20)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
#include "mikoto_520-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "mikoto";
|
model = "mikoto";
|
||||||
|
@ -62,14 +63,17 @@
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twi";
|
||||||
sda-pin = <17>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <20>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <8>;
|
current-speed = <115200>;
|
||||||
rx-pin = <4>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -7,6 +7,8 @@ CONFIG_BOARD_MIKOTO_520=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,19 @@
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <device.h>
|
#include <zephyr/device.h>
|
||||||
#include <init.h>
|
#include <zephyr/init.h>
|
||||||
#include <drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
#include <sys/sys_io.h>
|
#include <zephyr/sys/sys_io.h>
|
||||||
#include <devicetree.h>
|
#include <zephyr/devicetree.h>
|
||||||
|
|
||||||
static int pinmux_mikoto_init(const struct device *port) {
|
static int pinmux_mikoto_init(const struct device *port) {
|
||||||
ARG_UNUSED(port);
|
ARG_UNUSED(port);
|
||||||
|
|
||||||
#if CONFIG_BOARD_MIKOTO_520
|
#if CONFIG_BOARD_MIKOTO_520
|
||||||
const struct device *p0 = device_get_binding("GPIO_0");
|
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||||
const struct device *p1 = device_get_binding("GPIO_1");
|
const struct device *p1 = DEVICE_DT_GET(DT_NODELABEL(gpio1));
|
||||||
#if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA
|
#if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA
|
||||||
gpio_pin_configure(p0, 26, GPIO_INPUT | GPIO_PULL_DOWN);
|
gpio_pin_configure(p0, 26, GPIO_INPUT | GPIO_PULL_DOWN);
|
||||||
gpio_pin_configure(p1, 15, GPIO_INPUT);
|
gpio_pin_configure(p1, 15, GPIO_INPUT);
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
# nice!60
|
# nice!60
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The nice!60 is a hotswap 60% made by Nice Keyboards. https://nicekeyboards.com/nice-60
|
The nice!60 is a hotswap 60% made by Nice Keyboards. https://nicekeyboards.com/nice-60
|
||||||
|
|
||||||
## Building nice!60 ZMK firmware
|
## Building nice!60 ZMK firmware
|
||||||
|
|
||||||
```
|
```
|
||||||
west build -p -b nice60
|
west build -p -b nice60
|
||||||
```
|
```
|
||||||
|
|
12
app/boards/arm/nice60/nice60-pinctrl.dtsi
Normal file
12
app/boards/arm/nice60/nice60-pinctrl.dtsi
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 27)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -10,6 +10,8 @@
|
||||||
#include <dt-bindings/led/led.h>
|
#include <dt-bindings/led/led.h>
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
#include "nice60-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "nice!60";
|
model = "nice!60";
|
||||||
compatible = "nice,60";
|
compatible = "nice,60";
|
||||||
|
@ -107,13 +109,12 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi0 {
|
&spi3 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
/* Cannot be used together with i2c0. */
|
|
||||||
|
pinctrl-0 = <&spi3_default>;
|
||||||
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
sck-pin = <12>;
|
|
||||||
mosi-pin = <27>;
|
|
||||||
miso-pin = <13>;
|
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
led_strip: ws2812@0 {
|
||||||
compatible = "worldsemi,ws2812-spi";
|
compatible = "worldsemi,ws2812-spi";
|
||||||
|
|
|
@ -8,6 +8,8 @@ CONFIG_BOARD_NICE60=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
39
app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi
Normal file
39
app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_default: uart0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
group2 {
|
||||||
|
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0_sleep: uart0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
||||||
|
<NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_default: i2c0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 20)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_sleep: i2c0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 20)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include "nice_nano-pinctrl.dtsi"
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -45,14 +46,17 @@
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twi";
|
||||||
sda-pin = <17>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <20>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
current-speed = <115200>;
|
||||||
rx-pin = <8>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -10,6 +10,9 @@ CONFIG_ARM_MPU=y
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
# Use pinctrl
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@ CONFIG_BOARD_NICE_NANO_V2=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# Use pinctrl
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
39
app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi
Normal file
39
app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_default: uart0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
group2 {
|
||||||
|
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0_sleep: uart0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
||||||
|
<NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_default: i2c0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 30)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 31)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_sleep: i2c0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 30)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 31)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
39
app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi
Normal file
39
app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_default: uart0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
group2 {
|
||||||
|
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0_sleep: uart0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
||||||
|
<NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_default: i2c0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_sleep: i2c0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
#include "nrfmicro-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "nrfmicro";
|
model = "nrfmicro";
|
||||||
|
@ -47,15 +48,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twim";
|
||||||
sda-pin = <15>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <17>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
rx-pin = <8>;
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_11=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins_flipped.dtsi"
|
#include "arduino_pro_micro_pins_flipped.dtsi"
|
||||||
|
#include "nrfmicro-flipped-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "nrfmicro";
|
model = "nrfmicro";
|
||||||
|
@ -47,15 +48,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twim";
|
||||||
sda-pin = <30>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <31>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
rx-pin = <8>;
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_11_FLIPPED=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
#include "nrfmicro-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "nrfmicro";
|
model = "nrfmicro";
|
||||||
|
@ -60,15 +61,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twim";
|
||||||
sda-pin = <15>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <17>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
rx-pin = <8>;
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52833_qiaa.dtsi>
|
#include <nordic/nrf52833_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins_52833.dtsi"
|
#include "arduino_pro_micro_pins_52833.dtsi"
|
||||||
|
#include "nrfmicro-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "nrfmicro";
|
model = "nrfmicro";
|
||||||
|
@ -60,15 +61,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twim";
|
||||||
sda-pin = <15>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <17>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
rx-pin = <8>;
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_13_52833=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_13=y
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
|
@ -4,18 +4,18 @@
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <device.h>
|
#include <zephyr/device.h>
|
||||||
#include <init.h>
|
#include <zephyr/init.h>
|
||||||
#include <drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
#include <sys/sys_io.h>
|
#include <zephyr/sys/sys_io.h>
|
||||||
#include <devicetree.h>
|
#include <zephyr/devicetree.h>
|
||||||
|
|
||||||
static int pinmux_nrfmicro_init(const struct device *port) {
|
static int pinmux_nrfmicro_init(const struct device *port) {
|
||||||
ARG_UNUSED(port);
|
ARG_UNUSED(port);
|
||||||
|
|
||||||
#if (CONFIG_BOARD_NRFMICRO_13 || CONFIG_BOARD_NRFMICRO_13_52833)
|
#if (CONFIG_BOARD_NRFMICRO_13 || CONFIG_BOARD_NRFMICRO_13_52833)
|
||||||
const struct device *p0 = device_get_binding("GPIO_0");
|
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||||
#if CONFIG_BOARD_NRFMICRO_CHARGER
|
#if CONFIG_BOARD_NRFMICRO_CHARGER
|
||||||
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
||||||
gpio_pin_set(p0, 5, 0);
|
gpio_pin_set(p0, 5, 0);
|
||||||
|
|
56
app/boards/arm/pillbug/pillbug-pinctrl.dtsi
Normal file
56
app/boards/arm/pillbug/pillbug-pinctrl.dtsi
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_default: uart0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
group2 {
|
||||||
|
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0_sleep: uart0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
||||||
|
<NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_default: i2c0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 13)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_sleep: i2c0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 13)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi1_default: spi1_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_SCK, 0, 40)>,
|
||||||
|
<NRF_PSEL(SPIM_MOSI, 0, 11)>,
|
||||||
|
<NRF_PSEL(SPIM_MISO, 1, 26)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi1_sleep: spi1_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_SCK, 0, 40)>,
|
||||||
|
<NRF_PSEL(SPIM_MOSI, 0, 11)>,
|
||||||
|
<NRF_PSEL(SPIM_MISO, 1, 26)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include "pillbug-pinctrl.dtsi"
|
||||||
#include "blackpill_pins.dtsi"
|
#include "blackpill_pins.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -63,22 +64,25 @@
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twi";
|
||||||
sda-pin = <15>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <13>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi1{
|
&spi1 {
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
sck-pin = <40>;
|
pinctrl-0 = <&spi1_default>;
|
||||||
mosi-pin = <11>;
|
pinctrl-1 = <&spi1_sleep>;
|
||||||
miso-pin = <26>;
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
current-speed = <115200>;
|
||||||
rx-pin = <8>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
|
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
|
||||||
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
|
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
|
||||||
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans
|
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans
|
||||||
&reset &bootloader &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
&sys_reset &bootloader &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,18 +4,18 @@
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <device.h>
|
#include <zephyr/device.h>
|
||||||
#include <init.h>
|
#include <zephyr/init.h>
|
||||||
#include <drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
#include <sys/sys_io.h>
|
#include <zephyr/sys/sys_io.h>
|
||||||
#include <devicetree.h>
|
#include <zephyr/devicetree.h>
|
||||||
|
|
||||||
static int pinmux_puchi_ble_init(const struct device *port) {
|
static int pinmux_puchi_ble_init(const struct device *port) {
|
||||||
ARG_UNUSED(port);
|
ARG_UNUSED(port);
|
||||||
|
|
||||||
#if CONFIG_BOARD_PUCHI_BLE_v1
|
#if CONFIG_BOARD_PUCHI_BLE_v1
|
||||||
const struct device *p0 = device_get_binding("GPIO_0");
|
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||||
#if CONFIG_BOARD_PUCHI_BLE_CHARGER
|
#if CONFIG_BOARD_PUCHI_BLE_CHARGER
|
||||||
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
||||||
gpio_pin_set(p0, 5, 0);
|
gpio_pin_set(p0, 5, 0);
|
||||||
|
|
39
app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi
Normal file
39
app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_default: uart0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
group2 {
|
||||||
|
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uart0_sleep: uart0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
||||||
|
<NRF_PSEL(UART_TX, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_default: i2c0_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c0_sleep: i2c0_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||||
|
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -7,6 +7,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
#include "puchi_ble_v1-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "puchi_ble";
|
model = "puchi_ble";
|
||||||
|
@ -61,14 +62,16 @@
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twi";
|
||||||
sda-pin = <15>;
|
pinctrl-0 = <&i2c0_default>;
|
||||||
scl-pin = <17>;
|
pinctrl-1 = <&i2c0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
pinctrl-0 = <&uart0_default>;
|
||||||
rx-pin = <8>;
|
pinctrl-1 = <&uart0_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
|
|
|
@ -11,6 +11,9 @@ CONFIG_ARM_MPU=y
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
# Use pinctrl
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
# S40NC
|
# S40NC
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Shorty40NoCordy (S40NC) is a limited run 40% bluetooth keyboard originally made and sold by MechWild.
|
Shorty40NoCordy (S40NC) is a limited run 40% bluetooth keyboard originally made and sold by MechWild.
|
||||||
|
|
||||||
## Building S40NC ZMK firmware
|
## Building S40NC ZMK firmware
|
||||||
|
|
||||||
```
|
```
|
||||||
west build -p -b s40nc
|
west build -p -b s40nc
|
||||||
```
|
```
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
&bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp C_PP
|
&bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp C_PP
|
||||||
&bt BT_SEL 0 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &kp K_LOCK
|
&bt BT_SEL 0 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &kp K_LOCK
|
||||||
&bt BT_SEL 1 &out OUT_USB &kp CAPS &kp KP_NUM &kp SLCK &trans &trans &kp COMMA &kp DOT &kp K_VOL_UP &kp K_MUTE
|
&bt BT_SEL 1 &out OUT_USB &kp CAPS &kp KP_NUM &kp SLCK &trans &trans &kp COMMA &kp DOT &kp K_VOL_UP &kp K_MUTE
|
||||||
&bt BT_SEL 2 &out OUT_BLE &kp PAUSE_BREAK &reset &trans &bootloader &kp C_BRI_DN &kp K_VOL_DN &kp C_BRI_UP
|
&bt BT_SEL 2 &out OUT_BLE &kp PAUSE_BREAK &sys_reset &trans &bootloader &kp C_BRI_DN &kp K_VOL_DN &kp C_BRI_UP
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: seeeduino_xiao_rp2040
|
||||||
|
name: Seeeduino XIAO RP2040
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
url: https://wiki.seeedstudio.com/XIAO-RP2040/
|
||||||
|
exposes: [seeed_xiao]
|
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: sparkfun_pro_micro_rp2040
|
||||||
|
name: SparkFun Pro Micro RP2040
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
url: https://www.sparkfun.com/products/18288
|
||||||
|
exposes: [pro_micro]
|
4
app/boards/boardsource_blok.conf
Normal file
4
app/boards/boardsource_blok.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
CONFIG_CONSOLE=n
|
||||||
|
CONFIG_SERIAL=n
|
||||||
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_ZMK_USB=y
|
9
app/boards/boardsource_blok.overlay
Normal file
9
app/boards/boardsource_blok.overlay
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "usb_console.dtsi"
|
||||||
|
|
||||||
|
&pro_micro_serial { status = "disabled"; };
|
5
app/boards/rpi_pico.conf
Normal file
5
app/boards/rpi_pico.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
CONFIG_CONSOLE=n
|
||||||
|
CONFIG_SERIAL=n
|
||||||
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||||
|
CONFIG_ZMK_USB=y
|
8
app/boards/rpi_pico.overlay
Normal file
8
app/boards/rpi_pico.overlay
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "usb_console.dtsi"
|
||||||
|
|
4
app/boards/seeeduino_xiao_rp2040.conf
Normal file
4
app/boards/seeeduino_xiao_rp2040.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
CONFIG_CONSOLE=n
|
||||||
|
CONFIG_SERIAL=n
|
||||||
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_ZMK_USB=y
|
9
app/boards/seeeduino_xiao_rp2040.overlay
Normal file
9
app/boards/seeeduino_xiao_rp2040.overlay
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "usb_console.dtsi"
|
||||||
|
|
||||||
|
&xiao_serial { status = "disabled"; };
|
|
@ -4,9 +4,9 @@ Customizable full-size split ortholinear.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Compatible with MX-compatible, Alps-compatible, and Kailh Low-Profile Choc switches.
|
- Compatible with MX-compatible, Alps-compatible, and Kailh Low-Profile Choc switches.
|
||||||
* Breakoff pieces to allow for 4 to 6 rows and 7 to 9 columns.
|
- Breakoff pieces to allow for 4 to 6 rows and 7 to 9 columns.
|
||||||
* RGB LED connections
|
- RGB LED connections
|
||||||
|
|
||||||
## Hardware Notes
|
## Hardware Notes
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7
|
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7
|
||||||
&out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans
|
&out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans
|
||||||
&ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans
|
&ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans
|
||||||
&reset &bootloader &trans &trans &trans &trans &trans &trans &trans &reset &bootloader &trans &trans &trans &trans &trans &trans &trans
|
&sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans
|
||||||
&rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans
|
&rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans
|
||||||
&trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans
|
&trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans
|
||||||
>;
|
>;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
lower_layer {
|
lower_layer {
|
||||||
bindings = <
|
bindings = <
|
||||||
&bt BT_CLR &none &reset &bootloader
|
&bt BT_CLR &none &sys_reset &bootloader
|
||||||
&trans &bt BT_SEL 3 &bt BT_SEL 4 &none
|
&trans &bt BT_SEL 3 &bt BT_SEL 4 &none
|
||||||
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2
|
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2
|
||||||
>;
|
>;
|
||||||
|
|
|
@ -1,12 +1,27 @@
|
||||||
#include <dt-bindings/led/led.h>
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
&spi1 {
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi3_sleep: spi3_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
mosi-pin = <6>;
|
|
||||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
pinctrl-0 = <&spi3_default>;
|
||||||
sck-pin = <5>;
|
pinctrl-1 = <&spi3_sleep>;
|
||||||
miso-pin = <7>;
|
pinctrl-names = "default", "sleep";
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
led_strip: ws2812@0 {
|
||||||
compatible = "worldsemi,ws2812-spi";
|
compatible = "worldsemi,ws2812-spi";
|
||||||
|
@ -17,7 +32,7 @@
|
||||||
spi-max-frequency = <4000000>;
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
/* WS2812 */
|
/* WS2812 */
|
||||||
chain-length = <14>; /* arbitrary; change at will */
|
chain-length = <10>; /* arbitrary; change at will */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,27 @@
|
||||||
#include <dt-bindings/led/led.h>
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
&spi1 {
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi3_sleep: spi3_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
mosi-pin = <6>;
|
|
||||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
pinctrl-0 = <&spi3_default>;
|
||||||
sck-pin = <5>;
|
pinctrl-1 = <&spi3_sleep>;
|
||||||
miso-pin = <7>;
|
pinctrl-names = "default", "sleep";
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
led_strip: ws2812@0 {
|
||||||
compatible = "worldsemi,ws2812-spi";
|
compatible = "worldsemi,ws2812-spi";
|
||||||
|
@ -17,7 +32,7 @@
|
||||||
spi-max-frequency = <4000000>;
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
/* WS2812 */
|
/* WS2812 */
|
||||||
chain-length = <14>; /* arbitrary; change at will */
|
chain-length = <10>; /* arbitrary; change at will */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL
|
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL
|
||||||
&kp TAB &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp PG_UP &kp LBKT &kp RBKT &kp BSLH
|
&kp TAB &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp PG_UP &kp LBKT &kp RBKT &kp BSLH
|
||||||
&kp LSHFT &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp EQUAL &kp PG_DN &kp HOME &kp END &kp ENTER
|
&kp LSHFT &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp EQUAL &kp PG_DN &kp HOME &kp END &kp ENTER
|
||||||
&kp LCTRL &kp LGUI &kp LALT &reset &to DEFAULT &kp SPACE &trans &mo BT_CTRL &kp LEFT &kp RIGHT &kp UP &kp DOWN
|
&kp LCTRL &kp LGUI &kp LALT &sys_reset &to DEFAULT &kp SPACE &trans &mo BT_CTRL &kp LEFT &kp RIGHT &kp UP &kp DOWN
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,17 +28,17 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LV_Z_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
config LVGL_DPI
|
config LV_Z_DPI
|
||||||
default 148
|
default 148
|
||||||
|
|
||||||
config LVGL_BITS_PER_PIXEL
|
config LV_Z_BITS_PER_PIXEL
|
||||||
default 1
|
default 1
|
||||||
|
|
||||||
choice LVGL_COLOR_DEPTH
|
choice LV_COLOR_DEPTH
|
||||||
default LVGL_COLOR_DEPTH_1
|
default LV_COLOR_DEPTH_1
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endif # LVGL
|
endif # LVGL
|
||||||
|
|
|
@ -1,24 +1,38 @@
|
||||||
#include <dt-bindings/led/led.h>
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
&spi1 {
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi3_sleep: spi3_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
/* Cannot be used together with i2c0. */
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
mosi-pin = <6>;
|
|
||||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
pinctrl-0 = <&spi3_default>;
|
||||||
sck-pin = <5>;
|
pinctrl-1 = <&spi3_sleep>;
|
||||||
miso-pin = <7>;
|
pinctrl-names = "default", "sleep";
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
led_strip: ws2812@0 {
|
||||||
compatible = "worldsemi,ws2812-spi";
|
compatible = "worldsemi,ws2812-spi";
|
||||||
label = "SK6812mini";
|
label = "WS2812";
|
||||||
|
|
||||||
/* SPI */
|
/* SPI */
|
||||||
reg = <0>; /* ignored, but necessary for SPI bindings */
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
spi-max-frequency = <4000000>;
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
/* WS2812 */
|
/* WS2812 */
|
||||||
chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */
|
chain-length = <10>; /* arbitrary; change at will */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
|
47
app/boards/shields/corne/boards/nice_nano_v2.overlay
Normal file
47
app/boards/shields/corne/boards/nice_nano_v2.overlay
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi3_sleep: spi3_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-0 = <&spi3_default>;
|
||||||
|
pinctrl-1 = <&spi3_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
|
|
||||||
|
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>;
|
||||||
|
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
|
@ -10,6 +10,10 @@
|
||||||
col-offset = <6>;
|
col-offset = <6>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&five_column_transform {
|
||||||
|
col-offset = <6>;
|
||||||
|
};
|
||||||
|
|
||||||
&kscan0 {
|
&kscan0 {
|
||||||
col-gpios
|
col-gpios
|
||||||
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
bindings = <
|
bindings = <
|
||||||
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
||||||
//│ RESET │ │ │ │PROFILE 0 │ │ │ │ │ │ RESET │
|
//│ RESET │ │ │ │PROFILE 0 │ │ │ │ │ │ RESET │
|
||||||
&reset &trans &trans &trans &bt BT_SEL 0 &trans &trans &trans &trans &reset
|
&sys_reset &trans &trans &trans &bt BT_SEL 0 &trans &trans &trans &trans &sys_reset
|
||||||
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
||||||
//│BOOTLOADER│ │ │ │PROFILE 1 │ │ │ │ │ │BOOTLOADER│
|
//│BOOTLOADER│ │ │ │PROFILE 1 │ │ │ │ │ │BOOTLOADER│
|
||||||
&bootloader &trans &trans &trans &bt BT_SEL 1 &trans &trans &trans &trans &bootloader
|
&bootloader &trans &trans &trans &bt BT_SEL 1 &trans &trans &trans &trans &bootloader
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
control {
|
control {
|
||||||
bindings = <
|
bindings = <
|
||||||
&reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans
|
&sys_reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans
|
||||||
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &out OUT_USB &out OUT_BLE &none &kp EQUAL &kp MINUS
|
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &out OUT_USB &out OUT_BLE &none &kp EQUAL &kp MINUS
|
||||||
&kp CAPS &kp F5 &kp F6 &kp F7 &kp F8 &kp LBKT &kp RBKT &none &kp GRAVE &kp BSLH
|
&kp CAPS &kp F5 &kp F6 &kp F7 &kp F8 &kp LBKT &kp RBKT &none &kp GRAVE &kp BSLH
|
||||||
&kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &kp RSHFT
|
&kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &none &kp RSHFT
|
||||||
&kp LCTRL &kp LGUI &kp LALT &reset &none &trans
|
&kp LCTRL &kp LGUI &kp LALT &sys_reset &none &trans
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,17 +31,17 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LV_Z_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
config LVGL_DPI
|
config LV_Z_DPI
|
||||||
default 148
|
default 148
|
||||||
|
|
||||||
config LVGL_BITS_PER_PIXEL
|
config LV_Z_BITS_PER_PIXEL
|
||||||
default 1
|
default 1
|
||||||
|
|
||||||
choice LVGL_COLOR_DEPTH
|
choice LV_COLOR_DEPTH
|
||||||
default LVGL_COLOR_DEPTH_1
|
default LV_COLOR_DEPTH_1
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endif # LVGL
|
endif # LVGL
|
||||||
|
|
47
app/boards/shields/elephant42/boards/nice_nano.overlay
Normal file
47
app/boards/shields/elephant42/boards/nice_nano.overlay
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi3_sleep: spi3_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-0 = <&spi3_default>;
|
||||||
|
pinctrl-1 = <&spi3_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
|
|
||||||
|
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>;
|
||||||
|
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,23 +1,38 @@
|
||||||
#include <dt-bindings/led/led.h>
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
&spi1 {
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi3_sleep: spi3_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
/* Cannot be used together with i2c0. */
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
mosi-pin = <6>;
|
|
||||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
pinctrl-0 = <&spi3_default>;
|
||||||
sck-pin = <5>;
|
pinctrl-1 = <&spi3_sleep>;
|
||||||
miso-pin = <7>;
|
pinctrl-names = "default", "sleep";
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
led_strip: ws2812@0 {
|
||||||
compatible = "worldsemi,ws2812-spi";
|
compatible = "worldsemi,ws2812-spi";
|
||||||
label = "WS2812";
|
label = "WS2812";
|
||||||
|
|
||||||
/* SPI */
|
/* SPI */
|
||||||
reg = <0>; /* ignored, but necessary for SPI bindings */
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
spi-max-frequency = <4000000>;
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
/* WS2812 */
|
/* WS2812 */
|
||||||
chain-length = <27>; /* There are per-key RGB and the LAST 6 are underglow */
|
chain-length = <10>; /* arbitrary; change at will */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue