Merge branch 'main' into settings-reset-bootloader

This commit is contained in:
ReFil 2023-04-26 12:20:34 +01:00
commit e87618eca5
905 changed files with 14993 additions and 12368 deletions

View file

@ -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
RUN mv /tmp/.bashrc ~/.bashrc

View file

@ -1,5 +1,7 @@
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
## Board/Shield Check-list
- [ ] This board/shield is tested working on real hardware
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
- [ ] `.zmk.yml` metadata file added
@ -8,6 +10,6 @@
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
- [ ] If split, no name added for the right/peripheral half
- [ ] Kconfig.defconfig file correctly wraps *all* configuration in conditional on the shield symbol
- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol
- [ ] `.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)

View file

@ -19,8 +19,8 @@ on:
required: false
type: string
archive_name:
description: 'Archive output file name'
default: 'firmware'
description: "Archive output file name"
default: "firmware"
required: false
type: string

View file

@ -17,7 +17,7 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.0
image: docker.io/zmkfirmware/zmk-build-arm:3.2
needs: compile-matrix
strategy:
matrix:

View file

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

View file

@ -21,16 +21,6 @@ jobs:
- name: ESLint
run: npm run lint
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:
runs-on: ubuntu-latest
steps:

View file

@ -15,21 +15,10 @@ on:
- "app/scripts/west_commands/metadata.py"
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:
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-dev-arm:3.0
image: docker.io/zmkfirmware/zmk-dev-arm:3.2
steps:
- uses: actions/checkout@v3
- name: Install dependencies

15
.github/workflows/pre-commit.yml vendored Normal file
View 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

View file

@ -33,7 +33,7 @@ jobs:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.0
image: docker.io/zmkfirmware/zmk-build-arm:3.2
steps:
- name: Checkout
uses: actions/checkout@v3

View file

@ -1,12 +1,28 @@
fail_fast: false
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
rev: v1.1.1
rev: v1.3.5
hooks:
- id: clang-format
args:
- -i
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
rev: v2.7.1
hooks:
- 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$"

View file

@ -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_transparent.c)
target_sources(app PRIVATE src/behaviors/behavior_none.c)
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
target_sources_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/behaviors/behavior_tap_dance.c)
target_sources(app PRIVATE src/behavior_queue.c)

View file

@ -120,7 +120,13 @@ menuconfig ZMK_BLE
if ZMK_BLE
choice BT_LL_SW_LLCP_IMPL
default BT_LL_SW_LLCP_LEGACY
endchoice
config SYSTEM_WORKQUEUE_STACK_SIZE
default 4096 if SOC_RP2040
default 2048
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"
default 64
DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE := zmk,behavior-key-toggle
config ZMK_BEHAVIOR_KEY_TOGGLE
bool
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE))
rsource "Kconfig.behaviors"
config ZMK_MACRO_DEFAULT_WAIT_MS
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
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
bool "Enable USB CDC ACM logging to help debug"
@ -421,29 +434,54 @@ config ZMK_USB_LOGGING
if ZMK_USB_LOGGING
config ZMK_LOG_LEVEL
default 4
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
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.
config USB_CDC_ACM_LOG_LEVEL
default 1
config USB_CDC_ACM_RINGBUF_SIZE
default 1024
config LOG_BUFFER_SIZE
default 8192
config LOG_STRDUP_BUF_COUNT
default 16
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
default 1000
#ZMK_USB_LOGGING
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
if SETTINGS

24
app/Kconfig.behaviors Normal file
View 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

View 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

View file

@ -0,0 +1,9 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "usb_console.dtsi"
&xiao_serial { status = "disabled"; };

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View file

@ -0,0 +1,9 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "usb_console.dtsi"
&pro_micro_serial { status = "disabled"; };

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View file

@ -0,0 +1,9 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "usb_console.dtsi"
&xiao_serial { status = "disabled"; };

View 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]

View file

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

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

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "bluemicro840_v1-pinctrl.dtsi"
/ {
model = "BlueMicro840_V1";
@ -62,15 +63,17 @@
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -7,6 +7,8 @@ CONFIG_BOARD_BLUEMICRO840_V1=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

View 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]

View file

@ -56,7 +56,7 @@
// ------------------------------------------------------------------------------------------
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 &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
&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
@ -84,7 +84,7 @@
raise {
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
&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 &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
&trans &trans &trans &bootloader &trans &trans &trans
@ -112,7 +112,7 @@
raise {
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
&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
&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
@ -140,7 +140,7 @@
raise {
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
&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
&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
@ -168,7 +168,7 @@
raise {
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
&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
&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

View file

@ -26,7 +26,7 @@
raise {
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
&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
&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

View file

@ -42,12 +42,12 @@ config USB_DEVICE_STACK
endif # USB
config ZMK_DISPLAY
select LVGL_USE_CONT
select LVGL_FONT_MONTSERRAT_26
select LVGL_FONT_MONTSERRAT_20
select LVGL_FONT_MONTSERRAT_16
select LVGL_USE_LABEL
select LVGL_USE_IMG
select LV_USE_CONT
select LV_FONT_MONTSERRAT_26
select LV_FONT_MONTSERRAT_20
select LV_FONT_MONTSERRAT_16
select LV_USE_LABEL
select LV_USE_IMG
choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM

View file

@ -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 {
status = "okay";
compatible = "nordic,nrf-spim";
sck-pin = <27>;
mosi-pin = <8>;
miso-pin = <22>;
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
epd: il0323@0 {

View file

@ -13,6 +13,9 @@ CONFIG_ZMK_DISPLAY=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable pinctrl
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y
@ -39,17 +42,15 @@ CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_SSD1306=n
CONFIG_IL0323=y
CONFIG_LVGL_BITS_PER_PIXEL=1
CONFIG_LVGL_COLOR_DEPTH_1=y
CONFIG_LVGL_DPI=145
CONFIG_LVGL_VDB_SIZE=100
CONFIG_LVGL_USE_THEME_MONO=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_DPI_DEF=145
CONFIG_LV_Z_VDB_SIZE=100
CONFIG_LV_USE_THEME_MONO=y
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
# custom status screens
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_USE_DEBUG=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

View file

@ -60,12 +60,31 @@
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 {
status = "okay";
compatible = "nordic,nrf-spim";
sck-pin = <20>;
mosi-pin = <24>;
miso-pin = <27>;
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
epd: il0323@0 {

View file

@ -13,6 +13,9 @@ CONFIG_ZMK_DISPLAY=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable pinctrl
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y
@ -39,17 +42,15 @@ CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_SSD1306=n
CONFIG_IL0323=y
CONFIG_LVGL_BITS_PER_PIXEL=1
CONFIG_LVGL_COLOR_DEPTH_1=y
CONFIG_LVGL_DPI=145
CONFIG_LVGL_VDB_SIZE=100
CONFIG_LVGL_USE_THEME_MONO=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_DPI_DEF=145
CONFIG_LV_Z_VDB_SIZE=100
CONFIG_LV_USE_THEME_MONO=y
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
# custom status screens
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_USE_DEBUG=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

View file

@ -11,7 +11,7 @@
#include "widgets/layer_status.h"
#include "custom_status_screen.h"
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
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 *screen;
screen = lv_obj_create(NULL, NULL);
screen = lv_obj_create(NULL);
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
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,
0, 2);
lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), LV_ALIGN_TOP_MID, 0, 2);
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
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,
41);
lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_TOP_MID, 0, 41);
#endif
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
zmk_widget_peripheral_status_init(&peripheral_status_widget, screen);
lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), NULL,
LV_ALIGN_IN_TOP_MID, 0, 41);
lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), LV_ALIGN_TOP_MID, 0,
41);
#endif
#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;
LayersHeading = lv_img_create(screen, NULL);
lv_obj_align(LayersHeading, NULL, LV_ALIGN_IN_BOTTOM_MID, 8, 5);
LayersHeading = lv_img_create(screen);
lv_obj_align(LayersHeading, LV_ALIGN_BOTTOM_MID, 0, -30);
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
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
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_obj_align(zenlogo_icon, NULL, LV_ALIGN_IN_BOTTOM_MID, 2, -5);
lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 0, -5);
#endif
// lv_task_handler();
lv_refr_now(NULL);
// display_blanking_off(display_dev);
return screen;
}

View file

@ -5,15 +5,14 @@
*
*/
#include <kernel.h>
#include <bluetooth/services/bas.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include "battery_status.h"
#include <src/lv_themes/lv_theme.h>
#include <zmk/usb.h>
#include <zmk/events/usb_conn_state_changed.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) */
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);
widget_battery_status_init();

View file

@ -9,7 +9,7 @@
#include <lvgl.h>
#include <kernel.h>
#include <zephyr/kernel.h>
struct zmk_widget_battery_status {
sys_snode_t node;

View file

@ -5,8 +5,8 @@
*
*/
#include <kernel.h>
#include <logging/log.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#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);
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);

View file

@ -8,7 +8,7 @@
#pragma once
#include <lvgl.h>
#include <kernel.h>
#include <zephyr/kernel.h>
struct zmk_widget_layer_status {
sys_snode_t node;

View file

@ -5,10 +5,10 @@
*
*/
#include <kernel.h>
#include <bluetooth/services/bas.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
@ -123,9 +123,7 @@ ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed);
#endif
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) {
widget->obj = lv_img_create(parent, NULL);
lv_obj_set_size(widget->obj, 40, 15);
widget->obj = lv_img_create(parent);
sys_slist_append(&widgets, &widget->node);

View file

@ -8,7 +8,7 @@
#pragma once
#include <lvgl.h>
#include <kernel.h>
#include <zephyr/kernel.h>
struct zmk_widget_output_status {
sys_snode_t node;

View file

@ -5,10 +5,10 @@
*
*/
#include <kernel.h>
#include <bluetooth/services/bas.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#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,
lv_obj_t *parent) {
widget->obj = lv_img_create(parent, NULL);
widget->obj = lv_img_create(parent);
sys_slist_append(&widgets, &widget->node);

View file

@ -8,7 +8,7 @@
#pragma once
#include <lvgl.h>
#include <kernel.h>
#include <zephyr/kernel.h>
struct zmk_widget_peripheral_status {
sys_snode_t node;

View file

@ -1,6 +1,5 @@
# Building ZMK for the Ferris 0.2
## Standard Build
```

View file

@ -104,11 +104,10 @@
clock-frequency = <I2C_BITRATE_FAST>;
right_io: mcp23017@20 {
compatible = "microchip,mcp23017";
compatible = "microchip,mcp230xx";
status = "okay";
gpio-controller;
reg = <0x20>;
label = "RIGHT_IO";
#gpio-cells = <2>;
ngpios = <16>;
};
@ -116,6 +115,10 @@
&usb {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
&clk_hsi {
@ -139,10 +142,6 @@
&rtc {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
&flash0 {

View file

@ -20,9 +20,6 @@ CONFIG_ZMK_USB=y
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
CONFIG_USB_SELF_POWERED=n
# Enable IO multiplexer
CONFIG_GPIO_MCP23017=y
# Needed to reduce this to size that will fit on F072
CONFIG_HEAP_MEM_POOL_SIZE=1024

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

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "mikoto_520-pinctrl.dtsi"
/ {
model = "mikoto";
@ -62,14 +63,17 @@
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
scl-pin = <20>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <8>;
rx-pin = <4>;
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -7,6 +7,8 @@ CONFIG_BOARD_MIKOTO_520=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

View file

@ -4,19 +4,19 @@
* SPDX-License-Identifier: MIT
*/
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <drivers/gpio.h>
#include <sys/sys_io.h>
#include <devicetree.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/sys_io.h>
#include <zephyr/devicetree.h>
static int pinmux_mikoto_init(const struct device *port) {
ARG_UNUSED(port);
#if CONFIG_BOARD_MIKOTO_520
const struct device *p0 = device_get_binding("GPIO_0");
const struct device *p1 = device_get_binding("GPIO_1");
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
const struct device *p1 = DEVICE_DT_GET(DT_NODELABEL(gpio1));
#if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA
gpio_pin_configure(p0, 26, GPIO_INPUT | GPIO_PULL_DOWN);
gpio_pin_configure(p1, 15, GPIO_INPUT);

View file

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

View file

@ -0,0 +1,12 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 27)>;
};
};
};

View file

@ -10,6 +10,8 @@
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h>
#include "nice60-pinctrl.dtsi"
/ {
model = "nice!60";
compatible = "nice,60";
@ -107,13 +109,12 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
status = "okay";
};
&spi0 {
&spi3 {
compatible = "nordic,nrf-spim";
/* Cannot be used together with i2c0. */
pinctrl-0 = <&spi3_default>;
pinctrl-names = "default";
status = "okay";
sck-pin = <12>;
mosi-pin = <27>;
miso-pin = <13>;
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";

View file

@ -8,6 +8,8 @@ CONFIG_BOARD_NICE60=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

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

View file

@ -5,6 +5,7 @@
*/
#include <nordic/nrf52840_qiaa.dtsi>
#include "nice_nano-pinctrl.dtsi"
#include "arduino_pro_micro_pins.dtsi"
/ {
@ -45,14 +46,17 @@
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
scl-pin = <20>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -10,6 +10,9 @@ CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# Use pinctrl
CONFIG_PINCTRL=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y

View file

@ -7,6 +7,9 @@ CONFIG_BOARD_NICE_NANO_V2=y
# Enable MPU
CONFIG_ARM_MPU=y
# Use pinctrl
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

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

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

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "nrfmicro-pinctrl.dtsi"
/ {
model = "nrfmicro";
@ -47,15 +48,17 @@
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_11=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins_flipped.dtsi"
#include "nrfmicro-flipped-pinctrl.dtsi"
/ {
model = "nrfmicro";
@ -47,15 +48,17 @@
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <30>;
scl-pin = <31>;
compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_11_FLIPPED=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "nrfmicro-pinctrl.dtsi"
/ {
model = "nrfmicro";
@ -60,15 +61,17 @@
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52833_qiaa.dtsi>
#include "arduino_pro_micro_pins_52833.dtsi"
#include "nrfmicro-pinctrl.dtsi"
/ {
model = "nrfmicro";
@ -60,15 +61,17 @@
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_13_52833=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

View file

@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_13=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y

View file

@ -4,18 +4,18 @@
* SPDX-License-Identifier: MIT
*/
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <drivers/gpio.h>
#include <sys/sys_io.h>
#include <devicetree.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/sys_io.h>
#include <zephyr/devicetree.h>
static int pinmux_nrfmicro_init(const struct device *port) {
ARG_UNUSED(port);
#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
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
gpio_pin_set(p0, 5, 0);

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

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "pillbug-pinctrl.dtsi"
#include "blackpill_pins.dtsi"
/ {
@ -63,22 +64,25 @@
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <13>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&spi1 {
status = "disabled";
compatible = "nordic,nrf-spim";
sck-pin = <40>;
mosi-pin = <11>;
miso-pin = <26>;
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

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

View file

@ -4,18 +4,18 @@
* SPDX-License-Identifier: MIT
*/
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <drivers/gpio.h>
#include <sys/sys_io.h>
#include <devicetree.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/sys_io.h>
#include <zephyr/devicetree.h>
static int pinmux_puchi_ble_init(const struct device *port) {
ARG_UNUSED(port);
#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
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
gpio_pin_set(p0, 5, 0);

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

View file

@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "puchi_ble_v1-pinctrl.dtsi"
/ {
model = "puchi_ble";
@ -61,14 +62,16 @@
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {

View file

@ -11,6 +11,9 @@ CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# Use pinctrl
CONFIG_PINCTRL=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y

View file

@ -1,9 +1,11 @@
# S40NC
![S40NC](https://i.imgur.com/fk8587n.jpg)
Shorty40NoCordy (S40NC) is a limited run 40% bluetooth keyboard originally made and sold by MechWild.
## Building S40NC ZMK firmware
```
west build -p -b s40nc
```

View file

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

View file

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

View file

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

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View 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
View file

@ -0,0 +1,5 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_ZMK_USB=y

View file

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

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View file

@ -0,0 +1,9 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "usb_console.dtsi"
&xiao_serial { status = "disabled"; };

View file

@ -4,9 +4,9 @@ Customizable full-size split ortholinear.
## Features
* 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.
* RGB LED connections
- 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.
- RGB LED connections
## Hardware Notes

View file

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

View file

@ -32,7 +32,7 @@
lower_layer {
bindings = <
&bt BT_CLR &none &reset &bootloader
&bt BT_CLR &none &sys_reset &bootloader
&trans &bt BT_SEL 3 &bt BT_SEL 4 &none
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2
>;

View file

@ -1,12 +1,27 @@
#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";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
@ -17,7 +32,7 @@
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <14>; /* arbitrary; change at will */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

View file

@ -1,12 +1,27 @@
#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";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
@ -17,7 +32,7 @@
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <14>; /* arbitrary; change at will */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

View file

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

View file

@ -28,17 +28,17 @@ endif # ZMK_DISPLAY
if LVGL
config LVGL_VDB_SIZE
config LV_Z_VDB_SIZE
default 64
config LVGL_DPI
config LV_Z_DPI
default 148
config LVGL_BITS_PER_PIXEL
config LV_Z_BITS_PER_PIXEL
default 1
choice LVGL_COLOR_DEPTH
default LVGL_COLOR_DEPTH_1
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice
endif # LVGL

View file

@ -1,24 +1,38 @@
#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";
/* Cannot be used together with i2c0. */
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "SK6812mini";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

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

View file

@ -10,6 +10,10 @@
col-offset = <6>;
};
&five_column_transform {
col-offset = <6>;
};
&kscan0 {
col-gpios
= <&pro_micro 14 GPIO_ACTIVE_HIGH>

View file

@ -88,7 +88,7 @@
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ 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 &trans &trans &trans &bt BT_SEL 1 &trans &trans &trans &trans &bootloader

View file

@ -52,7 +52,7 @@
control {
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
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans

View file

@ -48,8 +48,8 @@
bindings = <
&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 LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &reset &none &trans
&kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &none &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &sys_reset &none &trans
>;
};
};

View file

@ -31,17 +31,17 @@ endif # ZMK_DISPLAY
if LVGL
config LVGL_VDB_SIZE
config LV_Z_VDB_SIZE
default 64
config LVGL_DPI
config LV_Z_DPI
default 148
config LVGL_BITS_PER_PIXEL
config LV_Z_BITS_PER_PIXEL
default 1
choice LVGL_COLOR_DEPTH
default LVGL_COLOR_DEPTH_1
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice
endif # LVGL

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

View file

@ -1,23 +1,38 @@
#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";
/* Cannot be used together with i2c0. */
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;
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 = <27>; /* There are per-key RGB and the LAST 6 are underglow */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

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