refactor: Replace tabs with spaces

Standardized indentation to use spaces with a new pre-commit hook.
This commit is contained in:
Joel Spadin 2023-04-22 23:25:56 -05:00 committed by Pete Johanson
parent 32ae776c42
commit 94061bb916
613 changed files with 11572 additions and 11567 deletions

View File

@ -1,5 +1,10 @@
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.3.5 rev: v1.3.5
hooks: hooks:

View File

@ -8,167 +8,167 @@ menu "ZMK"
menu "Basic Keyboard Setup" menu "Basic Keyboard Setup"
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
string "Keyboard Name" string "Keyboard Name"
config USB_DEVICE_PRODUCT config USB_DEVICE_PRODUCT
default ZMK_KEYBOARD_NAME default ZMK_KEYBOARD_NAME
config BT_DEVICE_NAME config BT_DEVICE_NAME
default ZMK_KEYBOARD_NAME default ZMK_KEYBOARD_NAME
config USB_DEVICE_VID config USB_DEVICE_VID
default 0x1D50 default 0x1D50
config USB_DEVICE_PID config USB_DEVICE_PID
default 0x615E default 0x615E
config USB_DEVICE_MANUFACTURER config USB_DEVICE_MANUFACTURER
default "ZMK Project" default "ZMK Project"
config BT_DIS_PNP_VID config BT_DIS_PNP_VID
default 0x1D50 default 0x1D50
config BT_DIS_PNP_PID config BT_DIS_PNP_PID
default 0x615E default 0x615E
config BT_DIS_MODEL config BT_DIS_MODEL
default ZMK_KEYBOARD_NAME default ZMK_KEYBOARD_NAME
config BT_DIS_MANUF config BT_DIS_MANUF
default "ZMK Project" default "ZMK Project"
menu "HID" menu "HID"
choice ZMK_HID_REPORT_TYPE choice ZMK_HID_REPORT_TYPE
prompt "HID Report Type" prompt "HID Report Type"
config ZMK_HID_REPORT_TYPE_HKRO config ZMK_HID_REPORT_TYPE_HKRO
bool "#-Key Roll Over (HKRO) HID Report" bool "#-Key Roll Over (HKRO) HID Report"
help help
Enable # key roll over for HID report. This selection is "boot keyboard" compatible Enable # key roll over for HID report. This selection is "boot keyboard" compatible
but limits the total number of possible keys to report as held to #. but limits the total number of possible keys to report as held to #.
config ZMK_HID_REPORT_TYPE_NKRO config ZMK_HID_REPORT_TYPE_NKRO
bool "Full N-Key Roll Over (NKRO) HID Report" bool "Full N-Key Roll Over (NKRO) HID Report"
help help
Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard
from working with some BIOS/UEFI versions that only support "boot keyboard" support. from working with some BIOS/UEFI versions that only support "boot keyboard" support.
This option also prevents using some infrequently used higher range HID usages. This option also prevents using some infrequently used higher range HID usages.
endchoice endchoice
if ZMK_HID_REPORT_TYPE_HKRO if ZMK_HID_REPORT_TYPE_HKRO
config ZMK_HID_KEYBOARD_REPORT_SIZE config ZMK_HID_KEYBOARD_REPORT_SIZE
int "# Keyboard Keys Reportable" int "# Keyboard Keys Reportable"
default 6 default 6
endif endif
config ZMK_HID_CONSUMER_REPORT_SIZE config ZMK_HID_CONSUMER_REPORT_SIZE
int "# Consumer Keys Reportable" int "# Consumer Keys Reportable"
default 6 default 6
choice ZMK_HID_CONSUMER_REPORT_USAGES choice ZMK_HID_CONSUMER_REPORT_USAGES
prompt "HID Report Type" prompt "HID Report Type"
config ZMK_HID_CONSUMER_REPORT_USAGES_FULL config ZMK_HID_CONSUMER_REPORT_USAGES_FULL
bool "Full Consumer HID Usage Support" bool "Full Consumer HID Usage Support"
help help
Enable full Consumer usage ID values to be sent to hosts. Allows for less Enable full Consumer usage ID values to be sent to hosts. Allows for less
frequently used usages, but has compatibability issues with some host OSes. frequently used usages, but has compatibability issues with some host OSes.
config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC
bool "Basic Consumer HID Usage Support" bool "Basic Consumer HID Usage Support"
help help
Enable Consumer usage ID values up to "Playback Speed - Slow" to be sent to Enable Consumer usage ID values up to "Playback Speed - Slow" to be sent to
hosts. Allows for broader compatibability with more host OSes. hosts. Allows for broader compatibability with more host OSes.
endchoice endchoice
menu "Output Types" menu "Output Types"
config ZMK_USB config ZMK_USB
bool "USB" bool "USB"
select USB select USB
select USB_DEVICE_STACK select USB_DEVICE_STACK
select USB_DEVICE_HID select USB_DEVICE_HID
if ZMK_USB if ZMK_USB
config USB_NUMOF_EP_WRITE_RETRIES config USB_NUMOF_EP_WRITE_RETRIES
default 10 default 10
config USB_HID_POLL_INTERVAL_MS config USB_HID_POLL_INTERVAL_MS
default 1 default 1
#ZMK_USB #ZMK_USB
endif endif
menuconfig ZMK_BLE menuconfig ZMK_BLE
bool "BLE (HID over GATT)" bool "BLE (HID over GATT)"
select BT select BT
select BT_SMP select BT_SMP
select BT_SMP_SC_PAIR_ONLY select BT_SMP_SC_PAIR_ONLY
select BT_SMP_APP_PAIRING_ACCEPT select BT_SMP_APP_PAIRING_ACCEPT
select BT_PERIPHERAL select BT_PERIPHERAL
select BT_DIS select BT_DIS
select BT_BAS select BT_BAS
select BT_SETTINGS select BT_SETTINGS
select SETTINGS select SETTINGS
if ZMK_BLE if ZMK_BLE
config SYSTEM_WORKQUEUE_STACK_SIZE config SYSTEM_WORKQUEUE_STACK_SIZE
default 4096 if SOC_RP2040 default 4096 if SOC_RP2040
default 2048 default 2048
config ZMK_BLE_THREAD_STACK_SIZE config ZMK_BLE_THREAD_STACK_SIZE
int "BLE notify thread stack size" int "BLE notify thread stack size"
default 512 default 512
config ZMK_BLE_THREAD_PRIORITY config ZMK_BLE_THREAD_PRIORITY
int "BLE notify thread priority" int "BLE notify thread priority"
default 5 default 5
config ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE config ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE
int "Max number of keyboard HID reports to queue for sending over BLE" int "Max number of keyboard HID reports to queue for sending over BLE"
default 20 default 20
config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE
int "Max number of consumer HID reports to queue for sending over BLE" int "Max number of consumer HID reports to queue for sending over BLE"
default 5 default 5
config ZMK_BLE_CLEAR_BONDS_ON_START config ZMK_BLE_CLEAR_BONDS_ON_START
bool "Configuration that clears all bond information from the keyboard on startup." bool "Configuration that clears all bond information from the keyboard on startup."
default n default n
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others. # HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
config BT_GATT_NOTIFY_MULTIPLE config BT_GATT_NOTIFY_MULTIPLE
default n default n
config BT_GATT_AUTO_SEC_REQ config BT_GATT_AUTO_SEC_REQ
default n default n
config BT_DEVICE_APPEARANCE config BT_DEVICE_APPEARANCE
default 961 default 961
config ZMK_BLE_PASSKEY_ENTRY config ZMK_BLE_PASSKEY_ENTRY
bool "Experimental: Requiring typing passkey from host to pair BLE connection" bool "Experimental: Requiring typing passkey from host to pair BLE connection"
default n default n
config BT_PERIPHERAL_PREF_MIN_INT config BT_PERIPHERAL_PREF_MIN_INT
default 6 default 6
config BT_PERIPHERAL_PREF_MAX_INT config BT_PERIPHERAL_PREF_MAX_INT
default 12 default 12
config BT_PERIPHERAL_PREF_LATENCY config BT_PERIPHERAL_PREF_LATENCY
default 30 default 30
config BT_PERIPHERAL_PREF_TIMEOUT config BT_PERIPHERAL_PREF_TIMEOUT
default 400 default 400
#ZMK_BLE #ZMK_BLE
endif endif
@ -189,108 +189,108 @@ menu "Display/LED Options"
rsource "src/display/Kconfig" rsource "src/display/Kconfig"
menuconfig ZMK_RGB_UNDERGLOW menuconfig ZMK_RGB_UNDERGLOW
bool "RGB Adressable LED Underglow" bool "RGB Adressable LED Underglow"
select LED_STRIP select LED_STRIP
if ZMK_RGB_UNDERGLOW if ZMK_RGB_UNDERGLOW
# This default value cuts down on tons of excess .conf files, if you're using GPIO, manually disable this # This default value cuts down on tons of excess .conf files, if you're using GPIO, manually disable this
config SPI config SPI
default y default y
config ZMK_RGB_UNDERGLOW_EXT_POWER config ZMK_RGB_UNDERGLOW_EXT_POWER
bool "RGB underglow toggling also controls external power" bool "RGB underglow toggling also controls external power"
default y default y
config ZMK_RGB_UNDERGLOW_BRT_MIN config ZMK_RGB_UNDERGLOW_BRT_MIN
int "RGB underglow minimum brightness in percent" int "RGB underglow minimum brightness in percent"
range 0 100 range 0 100
default 0 default 0
config ZMK_RGB_UNDERGLOW_BRT_MAX config ZMK_RGB_UNDERGLOW_BRT_MAX
int "RGB underglow maximum brightness in percent" int "RGB underglow maximum brightness in percent"
range ZMK_RGB_UNDERGLOW_BRT_MIN 100 range ZMK_RGB_UNDERGLOW_BRT_MIN 100
default 100 default 100
config ZMK_RGB_UNDERGLOW_HUE_STEP config ZMK_RGB_UNDERGLOW_HUE_STEP
int "RGB underglow hue step in degrees" int "RGB underglow hue step in degrees"
range 0 359 range 0 359
default 10 default 10
config ZMK_RGB_UNDERGLOW_SAT_STEP config ZMK_RGB_UNDERGLOW_SAT_STEP
int "RGB underglow saturation step in percent" int "RGB underglow saturation step in percent"
range 0 100 range 0 100
default 10 default 10
config ZMK_RGB_UNDERGLOW_BRT_STEP config ZMK_RGB_UNDERGLOW_BRT_STEP
int "RGB underglow brightness step in percent" int "RGB underglow brightness step in percent"
range 0 100 range 0 100
default 10 default 10
config ZMK_RGB_UNDERGLOW_HUE_START config ZMK_RGB_UNDERGLOW_HUE_START
int "RGB underglow start hue value in degrees" int "RGB underglow start hue value in degrees"
range 0 359 range 0 359
default 0 default 0
config ZMK_RGB_UNDERGLOW_SAT_START config ZMK_RGB_UNDERGLOW_SAT_START
int "RGB underglow start saturations value in percent" int "RGB underglow start saturations value in percent"
range 0 100 range 0 100
default 100 default 100
config ZMK_RGB_UNDERGLOW_BRT_START config ZMK_RGB_UNDERGLOW_BRT_START
int "RGB underglow start brightness value in percent" int "RGB underglow start brightness value in percent"
range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX
default ZMK_RGB_UNDERGLOW_BRT_MAX default ZMK_RGB_UNDERGLOW_BRT_MAX
config ZMK_RGB_UNDERGLOW_SPD_START config ZMK_RGB_UNDERGLOW_SPD_START
int "RGB underglow start animation speed value" int "RGB underglow start animation speed value"
range 1 5 range 1 5
default 3 default 3
config ZMK_RGB_UNDERGLOW_EFF_START config ZMK_RGB_UNDERGLOW_EFF_START
int "RGB underglow start effect int value related to the effect enum list" int "RGB underglow start effect int value related to the effect enum list"
range 0 3 range 0 3
default 0 default 0
config ZMK_RGB_UNDERGLOW_ON_START config ZMK_RGB_UNDERGLOW_ON_START
bool "RGB underglow starts on by default" bool "RGB underglow starts on by default"
default y default y
config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE
bool "Turn off RGB underglow when keyboard goes into idle state" bool "Turn off RGB underglow when keyboard goes into idle state"
config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB
bool "Turn off RGB underglow when USB is disconnected" bool "Turn off RGB underglow when USB is disconnected"
depends on USB_DEVICE_STACK depends on USB_DEVICE_STACK
#ZMK_RGB_UNDERGLOW #ZMK_RGB_UNDERGLOW
endif endif
menuconfig ZMK_BACKLIGHT menuconfig ZMK_BACKLIGHT
bool "LED backlight" bool "LED backlight"
select LED select LED
if ZMK_BACKLIGHT if ZMK_BACKLIGHT
config ZMK_BACKLIGHT_BRT_STEP config ZMK_BACKLIGHT_BRT_STEP
int "Brightness step in percent" int "Brightness step in percent"
range 1 100 range 1 100
default 20 default 20
config ZMK_BACKLIGHT_BRT_START config ZMK_BACKLIGHT_BRT_START
int "Default brightness in percent" int "Default brightness in percent"
range 1 100 range 1 100
default 40 default 40
config ZMK_BACKLIGHT_ON_START config ZMK_BACKLIGHT_ON_START
bool "Default backlight state" bool "Default backlight state"
default y default y
config ZMK_BACKLIGHT_AUTO_OFF_IDLE config ZMK_BACKLIGHT_AUTO_OFF_IDLE
bool "Turn off backlight when keyboard goes into idle state" bool "Turn off backlight when keyboard goes into idle state"
config ZMK_BACKLIGHT_AUTO_OFF_USB config ZMK_BACKLIGHT_AUTO_OFF_USB
bool "Turn off backlight when USB is disconnected" bool "Turn off backlight when USB is disconnected"
#ZMK_BACKLIGHT #ZMK_BACKLIGHT
endif endif
@ -301,28 +301,28 @@ endmenu
menu "Power Management" menu "Power Management"
config ZMK_IDLE_TIMEOUT config ZMK_IDLE_TIMEOUT
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)" int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
default 30000 default 30000
config ZMK_SLEEP config ZMK_SLEEP
bool "Enable deep sleep support" bool "Enable deep sleep support"
imply USB imply USB
if ZMK_SLEEP if ZMK_SLEEP
config PM_DEVICE config PM_DEVICE
default y default y
config ZMK_IDLE_SLEEP_TIMEOUT config ZMK_IDLE_SLEEP_TIMEOUT
int "Milliseconds of inactivity before entering deep sleep" int "Milliseconds of inactivity before entering deep sleep"
default 900000 default 900000
#ZMK_SLEEP #ZMK_SLEEP
endif endif
config ZMK_EXT_POWER config ZMK_EXT_POWER
bool "Enable support to control external power output" bool "Enable support to control external power output"
default y default y
#Power Management #Power Management
endmenu endmenu
@ -330,16 +330,16 @@ endmenu
menu "Combo options" menu "Combo options"
config ZMK_COMBO_MAX_PRESSED_COMBOS config ZMK_COMBO_MAX_PRESSED_COMBOS
int "Maximum number of currently pressed combos" int "Maximum number of currently pressed combos"
default 4 default 4
config ZMK_COMBO_MAX_COMBOS_PER_KEY config ZMK_COMBO_MAX_COMBOS_PER_KEY
int "Maximum number of combos per key" int "Maximum number of combos per key"
default 5 default 5
config ZMK_COMBO_MAX_KEYS_PER_COMBO config ZMK_COMBO_MAX_KEYS_PER_COMBO
int "Maximum number of keys per combo" int "Maximum number of keys per combo"
default 4 default 4
#Combo options #Combo options
endmenu endmenu
@ -347,18 +347,18 @@ endmenu
menu "Behavior Options" menu "Behavior Options"
config ZMK_BEHAVIORS_QUEUE_SIZE 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
rsource "Kconfig.behaviors" rsource "Kconfig.behaviors"
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"
default 15 default 15
config ZMK_MACRO_DEFAULT_TAP_MS config ZMK_MACRO_DEFAULT_TAP_MS
int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros" int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros"
default 30 default 30
endmenu endmenu
@ -369,8 +369,8 @@ menu "Initialization Priorities"
if USB_DEVICE_STACK if USB_DEVICE_STACK
config ZMK_USB_INIT_PRIORITY config ZMK_USB_INIT_PRIORITY
int "USB Init Priority" int "USB Init Priority"
default 50 default 50
#USB #USB
endif endif
@ -378,8 +378,8 @@ endif
if ZMK_BLE || ZMK_SPLIT_BLE if ZMK_BLE || ZMK_SPLIT_BLE
config ZMK_BLE_INIT_PRIORITY config ZMK_BLE_INIT_PRIORITY
int "BLE Init Priority" int "BLE Init Priority"
default 50 default 50
#ZMK_BLE || ZMK_SPLIT_BLE #ZMK_BLE || ZMK_SPLIT_BLE
endif endif
@ -390,8 +390,8 @@ endmenu
menu "KSCAN Settings" menu "KSCAN Settings"
config ZMK_KSCAN_EVENT_QUEUE_SIZE config ZMK_KSCAN_EVENT_QUEUE_SIZE
int "Size of the event queue for KSCAN events to buffer events" int "Size of the event queue for KSCAN events to buffer events"
default 4 default 4
#KSCAN Settings #KSCAN Settings
endmenu endmenu
@ -399,63 +399,63 @@ endmenu
menu "Logging" menu "Logging"
config ZMK_LOGGING_MINIMAL config ZMK_LOGGING_MINIMAL
bool "Suppress all ZMK debug log messages" bool "Suppress all ZMK debug log messages"
default false default false
if !ZMK_LOGGING_MINIMAL if !ZMK_LOGGING_MINIMAL
config ZMK_LOG_LEVEL config ZMK_LOG_LEVEL
default 4 default 4
endif 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"
select LOG select LOG
select USB select USB
select USB_DEVICE_STACK select USB_DEVICE_STACK
select USB_CDC_ACM select USB_CDC_ACM
select SERIAL select SERIAL
select CONSOLE select CONSOLE
select UART_INTERRUPT_DRIVEN select UART_INTERRUPT_DRIVEN
select UART_LINE_CTRL select UART_LINE_CTRL
select UART_CONSOLE select UART_CONSOLE
select USB_UART_CONSOLE select USB_UART_CONSOLE
if ZMK_USB_LOGGING if ZMK_USB_LOGGING
choice USB_CDC_ACM_LOG_LEVEL_CHOICE choice USB_CDC_ACM_LOG_LEVEL_CHOICE
default USB_CDC_ACM_LOG_LEVEL_OFF default USB_CDC_ACM_LOG_LEVEL_OFF
endchoice endchoice
choice USB_DRIVER_LOG_LEVEL_CHOICE choice USB_DRIVER_LOG_LEVEL_CHOICE
default USB_DRIVER_LOG_LEVEL_OFF default USB_DRIVER_LOG_LEVEL_OFF
endchoice 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_RINGBUF_SIZE config USB_CDC_ACM_RINGBUF_SIZE
default 1024 default 1024
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
config ZMK_RTT_LOGGING config ZMK_RTT_LOGGING
bool "Enable RTT logging to help debug" bool "Enable RTT logging to help debug"
select LOG select LOG
select DEBUG select DEBUG
select ASSERT select ASSERT
select USE_SEGGER_RTT select USE_SEGGER_RTT
select CONSOLE select CONSOLE
select RTT_CONSOLE select RTT_CONSOLE
if ZMK_RTT_LOGGING if ZMK_RTT_LOGGING
config SEGGER_RTT_BUFFER_SIZE_UP config SEGGER_RTT_BUFFER_SIZE_UP
default 8192 default 8192
#ZMK_RTT_LOGGING #ZMK_RTT_LOGGING
endif endif
@ -463,10 +463,10 @@ endif
if ZMK_USB_LOGGING || ZMK_RTT_LOGGING if ZMK_USB_LOGGING || ZMK_RTT_LOGGING
config LOG_BUFFER_SIZE config LOG_BUFFER_SIZE
default 8192 default 8192
config LOG_PROCESS_THREAD_SLEEP_MS config LOG_PROCESS_THREAD_SLEEP_MS
default 100 default 100
#ZMK_USB_LOGGING || ZMK_RTT_LOGGING #ZMK_USB_LOGGING || ZMK_RTT_LOGGING
endif endif
@ -477,16 +477,16 @@ endmenu
if SETTINGS if SETTINGS
config ZMK_SETTINGS_SAVE_DEBOUNCE config ZMK_SETTINGS_SAVE_DEBOUNCE
int "Milliseconds to debounce settings saves" int "Milliseconds to debounce settings saves"
default 60000 default 60000
#SETTINGS #SETTINGS
endif endif
config ZMK_BATTERY_REPORT_INTERVAL config ZMK_BATTERY_REPORT_INTERVAL
depends on ZMK_BLE depends on ZMK_BLE
int "Battery level report interval in seconds" int "Battery level report interval in seconds"
default 60 default 60
#Advanced #Advanced
endmenu endmenu
@ -495,26 +495,26 @@ endmenu
endmenu endmenu
config HEAP_MEM_POOL_SIZE config HEAP_MEM_POOL_SIZE
default 8192 default 8192
config KERNEL_BIN_NAME config KERNEL_BIN_NAME
default "zmk" default "zmk"
config REBOOT config REBOOT
default y default y
config USB_DEVICE_STACK config USB_DEVICE_STACK
default y if HAS_HW_NRF_USBD default y if HAS_HW_NRF_USBD
config ZMK_WPM config ZMK_WPM
bool "Calculate WPM" bool "Calculate WPM"
default n default n
config SENSOR config SENSOR
default y default y
choice CBPRINTF_IMPLEMENTATION choice CBPRINTF_IMPLEMENTATION
default CBPRINTF_NANO default CBPRINTF_NANO
endchoice endchoice

View File

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_BDN9 config BOARD_BDN9
bool "BDN9 rev2" bool "BDN9 rev2"
depends on SOC_STM32F072XB depends on SOC_STM32F072XB

View File

@ -6,16 +6,16 @@
if BOARD_BDN9 if BOARD_BDN9
config BOARD config BOARD
default "bdn9_rev2" default "bdn9_rev2"
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "BDN9 Rev2" default "BDN9 Rev2"
config ZMK_USB config ZMK_USB
default y default y
config ZMK_RGB_UNDERGLOW config ZMK_RGB_UNDERGLOW
select SPI select SPI
select WS2812_STRIP select WS2812_STRIP
endif # BOARD_BDN9 endif # BOARD_BDN9

View File

@ -10,134 +10,134 @@
#include <dt-bindings/led/led.h> #include <dt-bindings/led/led.h>
/ { / {
model = "Keeb.io BDN9 rev2"; model = "Keeb.io BDN9 rev2";
compatible = "keebio,bdn9", "st,stm32f072"; compatible = "keebio,bdn9", "st,stm32f072";
chosen { chosen {
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan; zmk,kscan = &kscan;
zmk,underglow = &led_strip; zmk,underglow = &led_strip;
}; };
kscan: kscan { kscan: kscan {
compatible = "zmk,kscan-gpio-direct"; compatible = "zmk,kscan-gpio-direct";
label = "KSCAN"; label = "KSCAN";
input-gpios input-gpios
= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> = <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
; ;
}; };
left_encoder: encoder_left { left_encoder: encoder_left {
compatible = "alps,ec11"; compatible = "alps,ec11";
label = "LEFT_ENCODER"; label = "LEFT_ENCODER";
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>; resolution = <4>;
status = "disabled"; status = "disabled";
}; };
mid_encoder: encoder_mid { mid_encoder: encoder_mid {
compatible = "alps,ec11"; compatible = "alps,ec11";
label = "MID_ENCODER"; label = "MID_ENCODER";
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>; resolution = <4>;
status = "disabled"; status = "disabled";
}; };
right_encoder: encoder_right { right_encoder: encoder_right {
compatible = "alps,ec11"; compatible = "alps,ec11";
label = "RIGHT_ENCODER"; label = "RIGHT_ENCODER";
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>; resolution = <4>;
status = "disabled"; status = "disabled";
}; };
sensors: sensors { sensors: sensors {
compatible = "zmk,keymap-sensors"; compatible = "zmk,keymap-sensors";
status = "disabled"; status = "disabled";
sensors = <>; sensors = <>;
}; };
}; };
&spi2 { &spi2 {
status = "okay"; status = "okay";
pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>; pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>;
pinctrl-names = "default"; pinctrl-names = "default";
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 = <9>; chain-length = <9>;
spi-one-frame = <0x70>; spi-one-frame = <0x70>;
spi-zero-frame = <0x40>; spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>; color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
}; };
}; };
&clk_hsi { &clk_hsi {
status = "okay"; status = "okay";
}; };
&pll { &pll {
status = "okay"; status = "okay";
prediv = <1>; prediv = <1>;
mul = <6>; mul = <6>;
clocks = <&clk_hsi>; clocks = <&clk_hsi>;
}; };
&rcc { &rcc {
clocks = <&pll>; clocks = <&pll>;
clock-frequency = <DT_FREQ_M(48)>; clock-frequency = <DT_FREQ_M(48)>;
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <1>; apb1-prescaler = <1>;
}; };
&usb { &usb {
status = "okay"; status = "okay";
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default"; pinctrl-names = "default";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&rtc { &rtc {
status = "okay"; status = "okay";
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
/* Set 6Kb of storage at the end of the 128Kb of flash */ /* Set 6Kb of storage at the end of the 128Kb of flash */
storage_partition: partition@1e800 { storage_partition: partition@1e800 {
label = "storage"; label = "storage";
reg = <0x0001e800 0x00001800>; reg = <0x0001e800 0x00001800>;
}; };
}; };
}; };

View File

@ -9,8 +9,8 @@
/* Uncomment and keep whatever encoders are on your BDN9 /* Uncomment and keep whatever encoders are on your BDN9
&sensors { &sensors {
status = "okay"; status = "okay";
sensors = <&left_encoder &mid_encoder &right_encoder>; sensors = <&left_encoder &mid_encoder &right_encoder>;
}; };
*/ */
@ -20,19 +20,19 @@
// &right_encoder { status = "okay"; }; // &right_encoder { status = "okay"; };
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { default_layer {
bindings = < bindings = <
&kp HOME &kp K_PP &kp END &kp HOME &kp K_PP &kp END
&kp PG_UP &kp UP &kp PG_DN &kp PG_UP &kp UP &kp PG_DN
&kp LEFT &kp DOWN &kp RIGHT &kp LEFT &kp DOWN &kp RIGHT
>; >;
/* Uncomment and add necessary bindings. This examples is for one encoder /* Uncomment and add necessary bindings. This examples is for one encoder
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
*/ */
}; };
}; };
}; };

View File

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

View File

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_BLUEMICRO840_V1 config BOARD_BLUEMICRO840_V1
bool "BlueMicro840_V1" bool "BlueMicro840_V1"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -6,22 +6,22 @@
if BOARD_BLUEMICRO840_V1 if BOARD_BLUEMICRO840_V1
config BOARD config BOARD
default "bluemicro840_v1" default "bluemicro840_v1"
if USB_DEVICE_STACK if USB_DEVICE_STACK
config USB_NRFX config USB_NRFX
default y default y
endif # USB_DEVICE_STACK endif # USB_DEVICE_STACK
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_BLUEMICRO840_V1 endif # BOARD_BLUEMICRO840_V1

View File

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

View File

@ -4,36 +4,36 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default { uart0_default: uart0_default {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>; psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up; bias-pull-up;
}; };
group2 { group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>; psels = <NRF_PSEL(UART_TX, 0, 6)>;
}; };
}; };
uart0_sleep: uart0_sleep { uart0_sleep: uart0_sleep {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>, psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>; <NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable; low-power-enable;
}; };
}; };
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>, psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>; <NRF_PSEL(TWIM_SCL, 0, 20)>;
}; };
}; };
i2c0_sleep: i2c0_sleep { i2c0_sleep: i2c0_sleep {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>, psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>; <NRF_PSEL(TWIM_SCL, 0, 20)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View File

@ -10,117 +10,117 @@
#include "bluemicro840_v1-pinctrl.dtsi" #include "bluemicro840_v1-pinctrl.dtsi"
/ { / {
model = "BlueMicro840_V1"; model = "BlueMicro840_V1";
compatible = "bluemicro840,v1"; compatible = "bluemicro840,v1";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
init-delay-ms = <20>; init-delay-ms = <20>;
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 7>; io-channels = <&adc 7>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>; full-ohms = <(2000000 + 806000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twim"; compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC config BOARD_ENABLE_DCDC
bool "Enable DCDC mode" bool "Enable DCDC mode"
select SOC_DCDC_NRF52X select SOC_DCDC_NRF52X
default y default y
depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1) depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1)

View File

@ -4,9 +4,9 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_BT60_V1 config BOARD_BT60_V1
bool "bt60" bool "bt60"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_BT60_V1_HS config BOARD_BT60_V1_HS
bool "bt60 hotswap" bool "bt60 hotswap"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -4,28 +4,28 @@
if BOARD_BT60_V1_HS || BOARD_BT60_V1 if BOARD_BT60_V1_HS || BOARD_BT60_V1
config BOARD config BOARD
default "bt60" default "bt60"
if USB if USB
config USB_NRFX config USB_NRFX
default y default y
config USB_DEVICE_STACK config USB_DEVICE_STACK
default y default y
endif # USB endif # USB
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "BT60" default "BT60"
endif # BOARD_BT60 endif # BOARD_BT60

View File

@ -9,126 +9,126 @@
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
/ { / {
model = "BT60"; model = "BT60";
compatible = "polarityworks,bt60"; compatible = "polarityworks,bt60";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
}; };
sensors { sensors {
compatible = "zmk,keymap-sensors"; compatible = "zmk,keymap-sensors";
sensors = <&left_encoder>; sensors = <&left_encoder>;
}; };
left_encoder: encoder_left { left_encoder: encoder_left {
compatible = "alps,ec11"; compatible = "alps,ec11";
label = "LEFT_ENCODER"; label = "LEFT_ENCODER";
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>; resolution = <4>;
status = "okay"; status = "okay";
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>; full-ohms = <(2000000 + 806000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twi"; compatible = "nordic,nrf-twi";
sda-pin = <17>; sda-pin = <17>;
scl-pin = <20>; scl-pin = <20>;
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
tx-pin = <6>; tx-pin = <6>;
rx-pin = <8>; rx-pin = <8>;
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -9,105 +9,105 @@
/ { / {
chosen { chosen {
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &ansi_transform; zmk,matrix_transform = &ansi_transform;
}; };
ansi_transform: keymap_transform_0 { ansi_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <15>; columns = <15>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12)
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
>; >;
}; };
hhkb_transform: keymap_transform_1 { hhkb_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <15>; columns = <15>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,14) RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,14)
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
>; >;
}; };
iso_transform: keymap_transform_2 { iso_transform: keymap_transform_2 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <15>; columns = <15>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12)
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
>; >;
}; };
all_1u_transform: keymap_transform_3 { all_1u_transform: keymap_transform_3 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <15>; columns = <15>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,14) RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,14)
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
>; >;
}; };
split_transform: keymap_transform_4 { split_transform: keymap_transform_4 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <15>; columns = <15>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,14) RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,14)
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
>; >;
}; };
kscan0: kscan_0 { kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
col-gpios col-gpios
= <&gpio1 13 GPIO_ACTIVE_HIGH> = <&gpio1 13 GPIO_ACTIVE_HIGH>
, <&gpio1 10 GPIO_ACTIVE_HIGH> , <&gpio1 10 GPIO_ACTIVE_HIGH>
, <&gpio1 11 GPIO_ACTIVE_HIGH> , <&gpio1 11 GPIO_ACTIVE_HIGH>
, <&gpio1 15 GPIO_ACTIVE_HIGH> , <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH> , <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH> , <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH> , <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH> , <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH> , <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH> , <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio0 5 GPIO_ACTIVE_HIGH> , <&gpio0 5 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH> , <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio0 23 GPIO_ACTIVE_HIGH> , <&gpio0 23 GPIO_ACTIVE_HIGH>
; ;
row-gpios row-gpios
= <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
}; };
}; };

View File

@ -11,170 +11,170 @@
/ { / {
chosen { chosen {
#ifdef ANSI #ifdef ANSI
zmk,matrix_transform = &ansi_transform; zmk,matrix_transform = &ansi_transform;
#elif defined(HHKB) #elif defined(HHKB)
zmk,matrix_transform = &hhkb_transform; zmk,matrix_transform = &hhkb_transform;
#elif defined(ISO) #elif defined(ISO)
zmk,matrix_transform = &iso_transform; zmk,matrix_transform = &iso_transform;
#elif defined(ALL_1U) #elif defined(ALL_1U)
zmk,matrix_transform = &all_1u_transform; zmk,matrix_transform = &all_1u_transform;
#else #else
zmk,matrix_transform = &split_transform; zmk,matrix_transform = &split_transform;
#endif #endif
}; };
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
#ifdef ANSI #ifdef ANSI
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL &bt BT_CLR &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL &bt BT_CLR
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
raise { raise {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | // |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
// | TAB | Q | UP | E | R | T | Y | U | INS | O |PSCRN|SLCK |PSEBRK| RESET | // | TAB | Q | UP | E | R | T | Y | U | INS | O |PSCRN|SLCK |PSEBRK| RESET |
// | CAPS |LEFT |DOWN |RIGHT| F | G | H | J | K | L |HOME |PGUP | BOOTLOADER | // | CAPS |LEFT |DOWN |RIGHT| F | G | H | J | K | L |HOME |PGUP | BOOTLOADER |
// | PREV |VOLUP |VOLDN|MUTE | V | B | N | M | , | END | PGDN | NEXT | // | PREV |VOLUP |VOLDN|MUTE | V | B | N | M | , | END | PGDN | NEXT |
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | BT_CLR | // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | BT_CLR |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
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 &sys_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
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
#elif defined(HHKB) #elif defined(HHKB)
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BSPC | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BSPC |
// | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | // | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 |
// | CAPS | ALT | WIN | SPACE | WIN | ALT | CTRL | // | CAPS | ALT | WIN | SPACE | WIN | ALT | CTRL |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSLH &kp GRAVE &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSLH &kp GRAVE
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSPC &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSPC
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1
&kp LCTRL &kp LALT &kp LGUI &kp SPACE &kp RGUI &kp RALT &kp RCTRL &kp LCTRL &kp LALT &kp LGUI &kp SPACE &kp RGUI &kp RALT &kp RCTRL
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
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 &sys_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
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
#elif defined(ISO) #elif defined(ISO)
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
// | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT | // | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
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
&sys_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
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
#elif defined(ALL_1U) #elif defined(ALL_1U)
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
// | CTL | WIN | ALT | SPACE | ALT | CTRL | LEFT | DOWN | RIGHT | // | CTL | WIN | ALT | SPACE | ALT | CTRL | LEFT | DOWN | RIGHT |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &mo 1 &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &mo 1
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
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 &sys_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
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
#else #else
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP| DEL | // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP| DEL |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 |
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | // | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &kp C_MENU &kp RCTRL &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &kp C_MENU &kp RCTRL
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
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 &sys_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
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
#endif #endif
}; };
}; };

View File

@ -9,53 +9,53 @@
/ { / {
chosen { chosen {
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <15>; columns = <15>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(2,13) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(2,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
>; >;
}; };
kscan0: kscan_0 { kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
col-gpios col-gpios
= <&gpio1 11 GPIO_ACTIVE_HIGH> = <&gpio1 11 GPIO_ACTIVE_HIGH>
, <&gpio1 10 GPIO_ACTIVE_HIGH> , <&gpio1 10 GPIO_ACTIVE_HIGH>
, <&gpio1 13 GPIO_ACTIVE_HIGH> , <&gpio1 13 GPIO_ACTIVE_HIGH>
, <&gpio1 15 GPIO_ACTIVE_HIGH> , <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH> , <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH> , <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH> , <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH> , <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH> , <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH> , <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio0 5 GPIO_ACTIVE_HIGH> , <&gpio0 5 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH> , <&gpio0 12 GPIO_ACTIVE_HIGH>
; ;
row-gpios row-gpios
= <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
}; };
}; };

View File

@ -3,35 +3,35 @@
#include <dt-bindings/zmk/bt.h> #include <dt-bindings/zmk/bt.h>
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &bt BT_CLR &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &bt BT_CLR
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
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 &sys_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
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
}; };
}; };
}; };

View File

@ -4,9 +4,9 @@
# #
config BOARD_CORNEISH_ZEN_V2_LEFT config BOARD_CORNEISH_ZEN_V2_LEFT
bool "corneish zen left v2" bool "corneish zen left v2"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_CORNEISH_ZEN_V2_RIGHT config BOARD_CORNEISH_ZEN_V2_RIGHT
bool "corneish zen right v2" bool "corneish zen right v2"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -6,10 +6,10 @@
if BOARD_CORNEISH_ZEN_V2_LEFT if BOARD_CORNEISH_ZEN_V2_LEFT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "Corne-ish Zen" default "Corne-ish Zen"
config ZMK_SPLIT_ROLE_CENTRAL config ZMK_SPLIT_ROLE_CENTRAL
default y default y
endif # BOARD_CORNEISH_ZEN_V2_LEFT endif # BOARD_CORNEISH_ZEN_V2_LEFT
@ -17,65 +17,65 @@ endif # BOARD_CORNEISH_ZEN_V2_LEFT
if BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT if BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT
config BOARD config BOARD
default "corneish_zen" default "corneish_zen"
config ZMK_SPLIT config ZMK_SPLIT
default y default y
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
if USB if USB
config USB_NRFX config USB_NRFX
default y default y
config USB_DEVICE_STACK config USB_DEVICE_STACK
default y default y
endif # USB endif # USB
config ZMK_DISPLAY config ZMK_DISPLAY
select LV_USE_CONT select LV_USE_CONT
select LV_FONT_MONTSERRAT_26 select LV_FONT_MONTSERRAT_26
select LV_FONT_MONTSERRAT_20 select LV_FONT_MONTSERRAT_20
select LV_FONT_MONTSERRAT_16 select LV_FONT_MONTSERRAT_16
select LV_USE_LABEL select LV_USE_LABEL
select LV_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
endchoice endchoice
if ZMK_DISPLAY if ZMK_DISPLAY
config SPI config SPI
default y default y
config IL0323 config IL0323
default y default y
config ZMK_DISPLAY_BLANK_ON_IDLE config ZMK_DISPLAY_BLANK_ON_IDLE
default n default n
endif # ZMK_DISPLAY endif # ZMK_DISPLAY
menuconfig CUSTOM_WIDGET_BATTERY_STATUS menuconfig CUSTOM_WIDGET_BATTERY_STATUS
bool "custom battery status widget" bool "custom battery status widget"
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
bool "custom output status widget" bool "custom output status widget"
menuconfig CUSTOM_WIDGET_LAYER_STATUS menuconfig CUSTOM_WIDGET_LAYER_STATUS
bool "custom layer status widget" bool "custom layer status widget"
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
bool "custom peripheral status widget" bool "custom peripheral status widget"
endif # BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT endif # BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT

View File

@ -11,116 +11,116 @@
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
/ { / {
model = "corneish_zen_v2"; model = "corneish_zen_v2";
compatible = "corneish_zen_v2"; compatible = "corneish_zen_v2";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,display = &epd; zmk,display = &epd;
zmk,battery = &vbatt; zmk,battery = &vbatt;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <12>; columns = <12>;
rows = <4>; rows = <4>;
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>; >;
}; };
five_column_transform: keymap_transform_1 { five_column_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <10>; columns = <10>;
rows = <4>; rows = <4>;
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = < map = <
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10)
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10)
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>; >;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -45,7 +45,7 @@
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>; >;
}; };
@ -60,7 +60,7 @@
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC &kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE &kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE &kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>; >;
}; };
}; };

View File

@ -8,90 +8,90 @@
#include "corneish_zen.dtsi" #include "corneish_zen.dtsi"
/{ /{
chosen { chosen {
zephyr,display = &epd; zephyr,display = &epd;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios col-gpios
= <&gpio0 21 GPIO_ACTIVE_HIGH> = <&gpio0 21 GPIO_ACTIVE_HIGH>
, <&gpio0 23 GPIO_ACTIVE_HIGH> , <&gpio0 23 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH> , <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio0 5 GPIO_ACTIVE_HIGH> , <&gpio0 5 GPIO_ACTIVE_HIGH>
; ;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 0>; io-channels = <&adc 0>;
output-ohms = <1960000>; output-ohms = <1960000>;
full-ohms = <(1960000 + 810000)>; full-ohms = <(1960000 + 810000)>;
}; };
}; };
&pinctrl { &pinctrl {
spi0_default: spi0_default { spi0_default: spi0_default {
group1 { group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>, psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>, <NRF_PSEL(SPIM_MOSI, 0, 8)>,
<NRF_PSEL(SPIM_MISO, 0, 22)>; <NRF_PSEL(SPIM_MISO, 0, 22)>;
}; };
}; };
spi0_sleep: spi0_sleep { spi0_sleep: spi0_sleep {
group1 { group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>, psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>, <NRF_PSEL(SPIM_MOSI, 0, 8)>,
<NRF_PSEL(SPIM_MISO, 0, 22)>; <NRF_PSEL(SPIM_MISO, 0, 22)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };
&spi0 { &spi0 {
status = "okay"; status = "okay";
compatible = "nordic,nrf-spim"; compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi0_default>; pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>; pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
epd: il0323@0 { epd: il0323@0 {
compatible = "gooddisplay,il0323"; compatible = "gooddisplay,il0323";
reg = <0>; reg = <0>;
label = "DISPLAY"; label = "DISPLAY";
width = <80>; width = <80>;
height = <128>; height = <128>;
spi-max-frequency = <4000000>; spi-max-frequency = <4000000>;
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
pwr = [03 00 26 26]; pwr = [03 00 26 26];
cdi = <0xd2>; cdi = <0xd2>;
tcon = <0x22>; tcon = <0x22>;
}; };
}; };

View File

@ -8,98 +8,98 @@
#include "corneish_zen.dtsi" #include "corneish_zen.dtsi"
/{ /{
chosen { chosen {
zephyr,display = &epd; zephyr,display = &epd;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios col-gpios
= <&gpio0 19 GPIO_ACTIVE_HIGH> = <&gpio0 19 GPIO_ACTIVE_HIGH>
, <&gpio0 21 GPIO_ACTIVE_HIGH> , <&gpio0 21 GPIO_ACTIVE_HIGH>
, <&gpio0 23 GPIO_ACTIVE_HIGH> , <&gpio0 23 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH> , <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH>
; ;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 0>; io-channels = <&adc 0>;
output-ohms = <1960000>; output-ohms = <1960000>;
full-ohms = <(1960000 + 810000)>; full-ohms = <(1960000 + 810000)>;
}; };
}; };
&default_transform { &default_transform {
col-offset = <6>; col-offset = <6>;
}; };
&five_column_transform { &five_column_transform {
col-offset = <6>; col-offset = <6>;
}; };
&pinctrl { &pinctrl {
spi0_default: spi0_default { spi0_default: spi0_default {
group1 { group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>, psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
<NRF_PSEL(SPIM_MOSI, 0, 24)>, <NRF_PSEL(SPIM_MOSI, 0, 24)>,
<NRF_PSEL(SPIM_MISO, 0, 27)>; <NRF_PSEL(SPIM_MISO, 0, 27)>;
}; };
}; };
spi0_sleep: spi0_sleep { spi0_sleep: spi0_sleep {
group1 { group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>, psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
<NRF_PSEL(SPIM_MOSI, 0, 24)>, <NRF_PSEL(SPIM_MOSI, 0, 24)>,
<NRF_PSEL(SPIM_MISO, 0, 27)>; <NRF_PSEL(SPIM_MISO, 0, 27)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };
&spi0 { &spi0 {
status = "okay"; status = "okay";
compatible = "nordic,nrf-spim"; compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi0_default>; pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>; pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
epd: il0323@0 { epd: il0323@0 {
compatible = "gooddisplay,il0323"; compatible = "gooddisplay,il0323";
reg = <0>; reg = <0>;
label = "DISPLAY"; label = "DISPLAY";
width = <80>; width = <80>;
height = <128>; height = <128>;
spi-max-frequency = <4000000>; spi-max-frequency = <4000000>;
dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
pwr = [03 00 26 26]; pwr = [03 00 26 26];
//softstart = [17 17 17 17]; //softstart = [17 17 17 17];
cdi = <0xd2>; cdi = <0xd2>;
tcon = <0x22>; tcon = <0x22>;
}; };
}; };

View File

@ -2,5 +2,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_DZ60RGB_REV1 config BOARD_DZ60RGB_REV1
bool "DZ60RGB Keyboard" bool "DZ60RGB Keyboard"
depends on SOC_STM32F303XC depends on SOC_STM32F303XC

View File

@ -6,9 +6,9 @@
if BOARD_DZ60RGB_REV1 if BOARD_DZ60RGB_REV1
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "DZ60RGB Rev 1" default "DZ60RGB Rev 1"
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_DZ60RGB_REV1 endif # BOARD_DZ60RGB_REV1

View File

@ -10,84 +10,84 @@
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
/ { / {
model = "DZ60RGB, Rev 1"; model = "DZ60RGB, Rev 1";
compatible = "dz60rgb,rev1", "st,stm32f303"; compatible = "dz60rgb,rev1", "st,stm32f303";
chosen { chosen {
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <14>; columns = <14>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,13) RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,13)
>; >;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpiob 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpiob 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpiob 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpiob 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios col-gpios
= <&gpioa 6 GPIO_ACTIVE_HIGH> = <&gpioa 6 GPIO_ACTIVE_HIGH>
, <&gpioa 7 GPIO_ACTIVE_HIGH> , <&gpioa 7 GPIO_ACTIVE_HIGH>
, <&gpiob 0 GPIO_ACTIVE_HIGH> , <&gpiob 0 GPIO_ACTIVE_HIGH>
, <&gpiob 13 GPIO_ACTIVE_HIGH> , <&gpiob 13 GPIO_ACTIVE_HIGH>
, <&gpiob 15 GPIO_ACTIVE_HIGH> , <&gpiob 15 GPIO_ACTIVE_HIGH>
, <&gpioa 8 GPIO_ACTIVE_HIGH> , <&gpioa 8 GPIO_ACTIVE_HIGH>
, <&gpioa 15 GPIO_ACTIVE_HIGH> , <&gpioa 15 GPIO_ACTIVE_HIGH>
, <&gpiob 3 GPIO_ACTIVE_HIGH> , <&gpiob 3 GPIO_ACTIVE_HIGH>
, <&gpiob 4 GPIO_ACTIVE_HIGH> , <&gpiob 4 GPIO_ACTIVE_HIGH>
, <&gpiob 5 GPIO_ACTIVE_HIGH> , <&gpiob 5 GPIO_ACTIVE_HIGH>
, <&gpiob 8 GPIO_ACTIVE_HIGH> , <&gpiob 8 GPIO_ACTIVE_HIGH>
, <&gpiob 9 GPIO_ACTIVE_HIGH> , <&gpiob 9 GPIO_ACTIVE_HIGH>
, <&gpioc 13 GPIO_ACTIVE_HIGH> , <&gpioc 13 GPIO_ACTIVE_HIGH>
, <&gpioc 14 GPIO_ACTIVE_HIGH> , <&gpioc 14 GPIO_ACTIVE_HIGH>
; ;
}; };
}; };
&usb { &usb {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
/* Set 6Kb of storage at the end of the 256Kb of flash */ /* Set 6Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@3e800 { storage_partition: partition@3e800 {
label = "storage"; label = "storage";
reg = <0x0003e800 0x00001800>; reg = <0x0003e800 0x00001800>;
}; };
}; };
}; };

View File

@ -2,10 +2,10 @@
#include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/keys.h>
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
@ -13,13 +13,13 @@
// | SHIFT | Z | X | C | V | B | N | M | , | . | SHIFT(/) | ^ | DEL | // | SHIFT | Z | X | C | V | B | N | M | , | . | SHIFT(/) | ^ | DEL |
// | CTL | WIN | ALT | SPACE | ALT | MO(1) | <- | v | -> | // | CTL | WIN | ALT | SPACE | ALT | MO(1) | <- | v | -> |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH &kp UP &kp DEL &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH &kp UP &kp DEL
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp LEFT &kp DOWN &kp RIGHT &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp LEFT &kp DOWN &kp RIGHT
>; >;
}; };
}; };
}; };

View File

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_FERRIS config BOARD_FERRIS
bool "Ferris rev 0.2" bool "Ferris rev 0.2"
depends on SOC_STM32F072XB depends on SOC_STM32F072XB

View File

@ -6,15 +6,15 @@
if BOARD_FERRIS if BOARD_FERRIS
config BOARD config BOARD
default "ferris_rev02" default "ferris_rev02"
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "Ferris rev 0.2" default "Ferris rev 0.2"
config ZMK_USB config ZMK_USB
default y default y
config ZMK_KSCAN_MATRIX_POLLING config ZMK_KSCAN_MATRIX_POLLING
default y default y
endif # BOARD_FERRIS endif # BOARD_FERRIS

View File

@ -11,153 +11,153 @@
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
/ { / {
model = "Ferris rev0.2"; model = "Ferris rev0.2";
compatible = "ferris,rev02", "st,stm32f072"; compatible = "ferris,rev02", "st,stm32f072";
chosen { chosen {
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan; zmk,kscan = &kscan;
zmk,matrix_transform = &transform; zmk,matrix_transform = &transform;
/* TODO: Enable once we support the IC for underglow /* TODO: Enable once we support the IC for underglow
zmk,underglow = &led_strip; zmk,underglow = &led_strip;
*/ */
}; };
transform: transform { transform: transform {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
rows = <4>; rows = <4>;
columns = <10>; columns = <10>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,3) RC(3,4) RC(3,5) RC(3,6)
>; >;
}; };
kscan: kscan { kscan: kscan {
compatible = "zmk,kscan-composite"; compatible = "zmk,kscan-composite";
label = "KSCAN"; label = "KSCAN";
rows = <4>; rows = <4>;
columns = <10>; columns = <10>;
left { left {
kscan = <&kscan_left>; kscan = <&kscan_left>;
}; };
right { right {
kscan = <&kscan_right>; kscan = <&kscan_right>;
column-offset = <5>; column-offset = <5>;
}; };
}; };
kscan_left: kscan_left { kscan_left: kscan_left {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_LEFT"; label = "KSCAN_LEFT";
diode-direction = "col2row"; diode-direction = "col2row";
col-gpios col-gpios
= <&gpiob 8 (GPIO_ACTIVE_HIGH)> = <&gpiob 8 (GPIO_ACTIVE_HIGH)>
, <&gpiob 4 (GPIO_ACTIVE_HIGH)> , <&gpiob 4 (GPIO_ACTIVE_HIGH)>
, <&gpiob 3 (GPIO_ACTIVE_HIGH)> , <&gpiob 3 (GPIO_ACTIVE_HIGH)>
, <&gpioa 15 (GPIO_ACTIVE_HIGH)> , <&gpioa 15 (GPIO_ACTIVE_HIGH)>
, <&gpioa 14 (GPIO_ACTIVE_HIGH)> , <&gpioa 14 (GPIO_ACTIVE_HIGH)>
; ;
row-gpios row-gpios
= <&gpiob 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpiob 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpiob 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpiob 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
}; };
kscan_right: kscan_right { kscan_right: kscan_right {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_RIGHT"; label = "KSCAN_RIGHT";
diode-direction = "row2col"; diode-direction = "row2col";
col-gpios col-gpios
= <&right_io 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> = <&right_io 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&right_io 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&right_io 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&right_io 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&right_io 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&right_io 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
; ;
row-gpios row-gpios
= <&right_io 8 (GPIO_ACTIVE_LOW)> = <&right_io 8 (GPIO_ACTIVE_LOW)>
, <&right_io 9 (GPIO_ACTIVE_LOW)> , <&right_io 9 (GPIO_ACTIVE_LOW)>
, <&right_io 10 (GPIO_ACTIVE_LOW)> , <&right_io 10 (GPIO_ACTIVE_LOW)>
, <&right_io 11 (GPIO_ACTIVE_LOW)> , <&right_io 11 (GPIO_ACTIVE_LOW)>
; ;
}; };
}; };
&i2c2 { &i2c2 {
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
pinctrl-names = "default"; pinctrl-names = "default";
status = "okay"; status = "okay";
clock-frequency = <I2C_BITRATE_FAST>; clock-frequency = <I2C_BITRATE_FAST>;
right_io: mcp23017@20 { right_io: mcp23017@20 {
compatible = "microchip,mcp230xx"; compatible = "microchip,mcp230xx";
status = "okay"; status = "okay";
gpio-controller; gpio-controller;
reg = <0x20>; reg = <0x20>;
#gpio-cells = <2>; #gpio-cells = <2>;
ngpios = <16>; ngpios = <16>;
}; };
}; };
&usb { &usb {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&clk_hsi { &clk_hsi {
status = "okay"; status = "okay";
}; };
&pll { &pll {
prediv = <1>; prediv = <1>;
mul = <6>; mul = <6>;
clocks = <&clk_hsi>; clocks = <&clk_hsi>;
status = "okay"; status = "okay";
}; };
&rcc { &rcc {
clocks = <&pll>; clocks = <&pll>;
clock-frequency = <DT_FREQ_M(48)>; clock-frequency = <DT_FREQ_M(48)>;
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <1>; apb1-prescaler = <1>;
}; };
&rtc { &rtc {
status = "okay"; status = "okay";
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http: //docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions * http: //docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
/* Set 6Kb of storage at the end of the 128Kb of flash */ /* Set 6Kb of storage at the end of the 128Kb of flash */
storage_partition: partition@3e800 { storage_partition: partition@3e800 {
label = "storage"; label = "storage";
reg = <0x0001e800 0x00001800>; reg = <0x0001e800 0x00001800>;
}; };
}; };
}; };

View File

@ -1,12 +1,12 @@
config BOARD_ENABLE_DCDC config BOARD_ENABLE_DCDC
bool "Enable DCDC mode" bool "Enable DCDC mode"
select SOC_DCDC_NRF52X select SOC_DCDC_NRF52X
default y default y
depends on (BOARD_MIKOTO_520) depends on (BOARD_MIKOTO_520)
choice BOARD_MIKOTO_CHARGER_CURRENT choice BOARD_MIKOTO_CHARGER_CURRENT
prompt "Charge current to supply to attached batteries" prompt "Charge current to supply to attached batteries"
depends on (BOARD_MIKOTO_520) depends on (BOARD_MIKOTO_520)
config BOARD_MIKOTO_CHARGER_CURRENT_40MA config BOARD_MIKOTO_CHARGER_CURRENT_40MA
bool "40mA charge current, for battery capacity 40mAh or higher" bool "40mA charge current, for battery capacity 40mAh or higher"

View File

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_MIKOTO_520 config BOARD_MIKOTO_520
bool "mikoto_520" bool "mikoto_520"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -6,29 +6,29 @@
if BOARD_MIKOTO_520 if BOARD_MIKOTO_520
config BOARD config BOARD
default "mikoto" default "mikoto"
if USB if USB
config USB_NRFX config USB_NRFX
default y default y
config USB_DEVICE_STACK config USB_DEVICE_STACK
default y default y
endif # USB endif # USB
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
config PINMUX config PINMUX
default y default y
choice BOARD_MIKOTO_CHARGER_CURRENT choice BOARD_MIKOTO_CHARGER_CURRENT
default BOARD_MIKOTO_CHARGER_CURRENT_100MA default BOARD_MIKOTO_CHARGER_CURRENT_100MA

View File

@ -6,50 +6,50 @@
/ { / {
pro_micro: connector { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 4 0> /* D0 */ = <0 0 &gpio0 4 0> /* D0 */
, <1 0 &gpio0 8 0> /* D1 */ , <1 0 &gpio0 8 0> /* D1 */
, <2 0 &gpio0 17 0> /* D2 */ , <2 0 &gpio0 17 0> /* D2 */
, <3 0 &gpio0 20 0> /* D3 */ , <3 0 &gpio0 20 0> /* D3 */
, <4 0 &gpio0 22 0> /* D4/A6 */ , <4 0 &gpio0 22 0> /* D4/A6 */
, <5 0 &gpio0 24 0> /* D5 */ , <5 0 &gpio0 24 0> /* D5 */
, <6 0 &gpio1 0 0> /* D6/A7 */ , <6 0 &gpio1 0 0> /* D6/A7 */
, <7 0 &gpio1 2 0> /* D7 */ , <7 0 &gpio1 2 0> /* D7 */
, <8 0 &gpio1 4 0> /* D8/A8 */ , <8 0 &gpio1 4 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio0 9 0> /* D10/A10 */ , <10 0 &gpio0 9 0> /* D10/A10 */
, <16 0 &gpio0 10 0> /* D16 */ , <16 0 &gpio0 10 0> /* D16 */
, <14 0 &gpio1 13 0> /* D14 */ , <14 0 &gpio1 13 0> /* D14 */
, <15 0 &gpio0 2 0> /* D15 */ , <15 0 &gpio0 2 0> /* D15 */
, <18 0 &gpio0 29 0> /* D18/A0 */ , <18 0 &gpio0 29 0> /* D18/A0 */
, <19 0 &gpio0 31 0> /* D19/A1 */ , <19 0 &gpio0 31 0> /* D19/A1 */
, <20 0 &gpio0 25 0> /* D20/A2 */ , <20 0 &gpio0 25 0> /* D20/A2 */
, <21 0 &gpio0 11 0> /* D21/A3 */ , <21 0 &gpio0 11 0> /* D21/A3 */
; ;
}; };
pro_micro_a: connector_a { pro_micro_a: connector_a {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 29 0> /* D18/A0 */ = <0 0 &gpio0 29 0> /* D18/A0 */
, <1 0 &gpio0 31 0> /* D19/A1 */ , <1 0 &gpio0 31 0> /* D19/A1 */
, <2 0 &gpio0 25 0> /* D20/A2 */ , <2 0 &gpio0 25 0> /* D20/A2 */
, <3 0 &gpio0 11 0> /* D21/A3 */ , <3 0 &gpio0 11 0> /* D21/A3 */
, <6 0 &gpio0 22 0> /* D4/A6 */ , <6 0 &gpio0 22 0> /* D4/A6 */
, <7 0 &gpio1 0 0> /* D6/A7 */ , <7 0 &gpio1 0 0> /* D6/A7 */
, <8 0 &gpio1 4 0> /* D8/A8 */ , <8 0 &gpio1 4 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio0 9 0> /* D10/A10 */ , <10 0 &gpio0 9 0> /* D10/A10 */
; ;
}; };
}; };

View File

@ -4,36 +4,36 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default { uart0_default: uart0_default {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 4)>; psels = <NRF_PSEL(UART_RX, 0, 4)>;
bias-pull-up; bias-pull-up;
}; };
group2 { group2 {
psels = <NRF_PSEL(UART_TX, 0, 8)>; psels = <NRF_PSEL(UART_TX, 0, 8)>;
}; };
}; };
uart0_sleep: uart0_sleep { uart0_sleep: uart0_sleep {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 4)>, psels = <NRF_PSEL(UART_RX, 0, 4)>,
<NRF_PSEL(UART_TX, 0, 8)>; <NRF_PSEL(UART_TX, 0, 8)>;
low-power-enable; low-power-enable;
}; };
}; };
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>, psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>; <NRF_PSEL(TWIM_SCL, 0, 20)>;
}; };
}; };
i2c0_sleep: i2c0_sleep { i2c0_sleep: i2c0_sleep {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>, psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>; <NRF_PSEL(TWIM_SCL, 0, 20)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View File

@ -10,117 +10,117 @@
#include "mikoto_520-pinctrl.dtsi" #include "mikoto_520-pinctrl.dtsi"
/ { / {
model = "mikoto"; model = "mikoto";
compatible = "zhiayang,mikoto"; compatible = "zhiayang,mikoto";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
init-delay-ms = <50>; init-delay-ms = <50>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 1>; io-channels = <&adc 1>;
output-ohms = <10000000>; output-ohms = <10000000>;
full-ohms = <(10000000 + 4000000)>; full-ohms = <(10000000 + 4000000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twi"; compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
current-speed = <115200>; current-speed = <115200>;
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

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

View File

@ -2,5 +2,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_NICE60 config BOARD_NICE60
bool "nice!60" bool "nice!60"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -4,22 +4,22 @@
if BOARD_NICE60 if BOARD_NICE60
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "nice!60" default "nice!60"
if USB_DEVICE_STACK if USB_DEVICE_STACK
config USB_NRFX config USB_NRFX
default y default y
endif # USB_DEVICE_STACK endif # USB_DEVICE_STACK
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_NICE60 endif # BOARD_NICE60

View File

@ -4,9 +4,9 @@
*/ */
&pinctrl { &pinctrl {
spi3_default: spi3_default { spi3_default: spi3_default {
group1 { group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 27)>; psels = <NRF_PSEL(SPIM_MOSI, 0, 27)>;
}; };
}; };
}; };

View File

@ -13,170 +13,170 @@
#include "nice60-pinctrl.dtsi" #include "nice60-pinctrl.dtsi"
/ { / {
model = "nice!60"; model = "nice!60";
compatible = "nice,60"; compatible = "nice,60";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
zmk,underglow = &led_strip; zmk,underglow = &led_strip;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <14>; columns = <14>;
rows = <5>; rows = <5>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,13) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,9) RC(4,10) RC(4,11) RC(4,13) RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,9) RC(4,10) RC(4,11) RC(4,13)
>; >;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios col-gpios
= <&gpio1 15 GPIO_ACTIVE_HIGH> = <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH> , <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH> , <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH> , <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH> , <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH> , <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH> , <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio1 3 GPIO_ACTIVE_HIGH> , <&gpio1 3 GPIO_ACTIVE_HIGH>
, <&gpio1 7 GPIO_ACTIVE_HIGH> , <&gpio1 7 GPIO_ACTIVE_HIGH>
, <&gpio1 4 GPIO_ACTIVE_HIGH> , <&gpio1 4 GPIO_ACTIVE_HIGH>
, <&gpio1 6 GPIO_ACTIVE_HIGH> , <&gpio1 6 GPIO_ACTIVE_HIGH>
, <&gpio1 5 GPIO_ACTIVE_HIGH> , <&gpio1 5 GPIO_ACTIVE_HIGH>
, <&gpio1 1 GPIO_ACTIVE_HIGH> , <&gpio1 1 GPIO_ACTIVE_HIGH>
, <&gpio1 2 GPIO_ACTIVE_HIGH> , <&gpio1 2 GPIO_ACTIVE_HIGH>
; ;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>; full-ohms = <(2000000 + 806000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&spi3 { &spi3 {
compatible = "nordic,nrf-spim"; compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi3_default>; pinctrl-0 = <&spi3_default>;
pinctrl-names = "default"; pinctrl-names = "default";
status = "okay"; status = "okay";
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 = <12>; /* LED strip length */ chain-length = <12>; /* LED strip length */
spi-one-frame = <0x70>; spi-one-frame = <0x70>;
spi-zero-frame = <0x40>; spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>; color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
}; };
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "mbr"; label = "mbr";
reg = <0x00000000 0x00001000>; reg = <0x00000000 0x00001000>;
}; };
code_partition: partition@1000 { code_partition: partition@1000 {
label = "code_partition"; label = "code_partition";
reg = <0x00001000 0x000d3000>; reg = <0x00001000 0x000d3000>;
}; };
/* /*
* The flash starting at 0x000d4000 and ending at * The flash starting at 0x000d4000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@d4000 { storage_partition: partition@d4000 {
label = "storage"; label = "storage";
reg = <0x000d4000 0x00020000>; reg = <0x000d4000 0x00020000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -10,10 +10,10 @@
#include <dt-bindings/zmk/bt.h> #include <dt-bindings/zmk/bt.h>
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { default_layer {
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
@ -21,16 +21,16 @@
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | WIN | MO(1) | CTL | // | CTL | WIN | ALT | SPACE | ALT | WIN | MO(1) | CTL |
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
bindings = < bindings = <
&gresc &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &gresc &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &mo 1 &kp RCTRL &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &mo 1 &kp RCTRL
>; >;
}; };
rgb_layer { rgb_layer {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// | BT CLR | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | EFFECT REV | // | BT CLR | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | EFFECT REV |
// | BT 1 | | UP | | HUEUP | SATUP | BRIUP | SPDUP | | | | | | | // | BT 1 | | UP | | HUEUP | SATUP | BRIUP | SPDUP | | | | | | |
@ -38,13 +38,13 @@
// | BT 3 | | | | | | | | | | | | // | BT 3 | | | | | | | | | | | |
// | BT 4 | | | TOG RGB | PRT SCR | | | DEL | // | BT 4 | | | TOG RGB | PRT SCR | | | DEL |
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
bindings = < bindings = <
&bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR
&bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans
&bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF &bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF
&bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL &bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL
>; >;
}; };
}; };
}; };

View File

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

View File

@ -4,10 +4,10 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_NICE_NANO config BOARD_NICE_NANO
bool "nice!nano" bool "nice!nano"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_NICE_NANO_V2 config BOARD_NICE_NANO_V2
bool "nice!nano v2" bool "nice!nano v2"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -4,22 +4,22 @@
if BOARD_NICE_NANO || BOARD_NICE_NANO_V2 if BOARD_NICE_NANO || BOARD_NICE_NANO_V2
config BOARD config BOARD
default "nice_nano" default "nice_nano"
if USB_DEVICE_STACK if USB_DEVICE_STACK
config USB_NRFX config USB_NRFX
default y default y
endif # USB_DEVICE_STACK endif # USB_DEVICE_STACK
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2 endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2

View File

@ -5,50 +5,50 @@
*/ */
/ { / {
pro_micro: connector { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 8 0> /* D0 */ = <0 0 &gpio0 8 0> /* D0 */
, <1 0 &gpio0 6 0> /* D1 */ , <1 0 &gpio0 6 0> /* D1 */
, <2 0 &gpio0 17 0> /* D2 */ , <2 0 &gpio0 17 0> /* D2 */
, <3 0 &gpio0 20 0> /* D3 */ , <3 0 &gpio0 20 0> /* D3 */
, <4 0 &gpio0 22 0> /* D4/A6 */ , <4 0 &gpio0 22 0> /* D4/A6 */
, <5 0 &gpio0 24 0> /* D5 */ , <5 0 &gpio0 24 0> /* D5 */
, <6 0 &gpio1 0 0> /* D6/A7 */ , <6 0 &gpio1 0 0> /* D6/A7 */
, <7 0 &gpio0 11 0> /* D7 */ , <7 0 &gpio0 11 0> /* D7 */
, <8 0 &gpio1 4 0> /* D8/A8 */ , <8 0 &gpio1 4 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio0 9 0> /* D10/A10 */ , <10 0 &gpio0 9 0> /* D10/A10 */
, <16 0 &gpio0 10 0> /* D16 */ , <16 0 &gpio0 10 0> /* D16 */
, <14 0 &gpio1 11 0> /* D14 */ , <14 0 &gpio1 11 0> /* D14 */
, <15 0 &gpio1 13 0> /* D15 */ , <15 0 &gpio1 13 0> /* D15 */
, <18 0 &gpio1 15 0> /* D18/A0 */ , <18 0 &gpio1 15 0> /* D18/A0 */
, <19 0 &gpio0 2 0> /* D19/A1 */ , <19 0 &gpio0 2 0> /* D19/A1 */
, <20 0 &gpio0 29 0> /* D20/A2 */ , <20 0 &gpio0 29 0> /* D20/A2 */
, <21 0 &gpio0 31 0> /* D21/A3 */ , <21 0 &gpio0 31 0> /* D21/A3 */
; ;
}; };
pro_micro_a: connector_a { pro_micro_a: connector_a {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio1 15 0> /* D18/A0 */ = <0 0 &gpio1 15 0> /* D18/A0 */
, <1 0 &gpio0 2 0> /* D19/A1 */ , <1 0 &gpio0 2 0> /* D19/A1 */
, <2 0 &gpio0 29 0> /* D20/A2 */ , <2 0 &gpio0 29 0> /* D20/A2 */
, <3 0 &gpio0 31 0> /* D21/A3 */ , <3 0 &gpio0 31 0> /* D21/A3 */
, <6 0 &gpio0 22 0> /* D4/A6 */ , <6 0 &gpio0 22 0> /* D4/A6 */
, <7 0 &gpio1 0 0> /* D6/A7 */ , <7 0 &gpio1 0 0> /* D6/A7 */
, <8 0 &gpio1 4 0> /* D8/A8 */ , <8 0 &gpio1 4 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio0 9 0> /* D10/A10 */ , <10 0 &gpio0 9 0> /* D10/A10 */
; ;
}; };
}; };
pro_micro_d: &pro_micro {}; pro_micro_d: &pro_micro {};

View File

@ -4,36 +4,36 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default { uart0_default: uart0_default {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>; psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up; bias-pull-up;
}; };
group2 { group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>; psels = <NRF_PSEL(UART_TX, 0, 6)>;
}; };
}; };
uart0_sleep: uart0_sleep { uart0_sleep: uart0_sleep {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>, psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>; <NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable; low-power-enable;
}; };
}; };
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>, psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>; <NRF_PSEL(TWIM_SCL, 0, 20)>;
}; };
}; };
i2c0_sleep: i2c0_sleep { i2c0_sleep: i2c0_sleep {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>, psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>; <NRF_PSEL(TWIM_SCL, 0, 20)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View File

@ -8,21 +8,21 @@
#include "nice_nano.dtsi" #include "nice_nano.dtsi"
/ { / {
chosen { chosen {
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>; full-ohms = <(2000000 + 806000)>;
}; };
}; };

View File

@ -9,101 +9,101 @@
#include "arduino_pro_micro_pins.dtsi" #include "arduino_pro_micro_pins.dtsi"
/ { / {
model = "nice!nano"; model = "nice!nano";
compatible = "nice,nano"; compatible = "nice,nano";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twi"; compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
current-speed = <115200>; current-speed = <115200>;
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -8,19 +8,19 @@
#include "nice_nano.dtsi" #include "nice_nano.dtsi"
/ { / {
chosen { chosen {
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
init-delay-ms = <50>; init-delay-ms = <50>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-nrf-vddh"; compatible = "zmk,battery-nrf-vddh";
label = "BATTERY"; label = "BATTERY";
}; };
}; };

View File

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

View File

@ -4,6 +4,6 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_NRF52840_M2 config BOARD_NRF52840_M2
bool "nrf52480_m2" bool "nrf52480_m2"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -4,22 +4,22 @@
if BOARD_NRF52840_M2 if BOARD_NRF52840_M2
config BOARD config BOARD
default "nrf52480_m2" default "nrf52480_m2"
if USB_DEVICE_STACK if USB_DEVICE_STACK
config USB_NRFX config USB_NRFX
default y default y
endif # USB_DEVICE_STACK endif # USB_DEVICE_STACK
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_NRF52840_M2 endif # BOARD_NRF52840_M2

View File

@ -8,105 +8,105 @@
#include <nordic/nrf52840_qiaa.dtsi> #include <nordic/nrf52840_qiaa.dtsi>
/ { / {
model = "Makerdiary nRF52840 M.2 module"; model = "Makerdiary nRF52840 M.2 module";
compatible = "makerdiary,nrf52840_m2"; compatible = "makerdiary,nrf52840_m2";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
red_led: led_0 { red_led: led_0 {
gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
label = "Red LED"; label = "Red LED";
}; };
green_led: led_1 { green_led: led_1 {
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
label = "Green LED"; label = "Green LED";
}; };
blue_led: led_2 { blue_led: led_2 {
gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 0>; io-channels = <&adc 0>;
output-ohms = <1000000>; output-ohms = <1000000>;
full-ohms = <(1000000 + 1000000)>; full-ohms = <(1000000 + 1000000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&usbd { &usbd {
compatible = "nordic,nrf-usbd"; compatible = "nordic,nrf-usbd";
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

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

View File

@ -4,17 +4,17 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_NRFMICRO_11 config BOARD_NRFMICRO_11
bool "nrfmicro_11" bool "nrfmicro_11"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_NRFMICRO_11_FLIPPED config BOARD_NRFMICRO_11_FLIPPED
bool "nrfmicro_11_flipped" bool "nrfmicro_11_flipped"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_NRFMICRO_13 config BOARD_NRFMICRO_13
bool "nrfmicro_13" bool "nrfmicro_13"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_NRFMICRO_13_52833 config BOARD_NRFMICRO_13_52833
bool "nrfmicro_13_52833" bool "nrfmicro_13_52833"
depends on SOC_NRF52833_QIAA depends on SOC_NRF52833_QIAA

View File

@ -6,31 +6,31 @@
if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833
config BOARD config BOARD
default "nrfmicro" default "nrfmicro"
if USB_DEVICE_STACK if USB_DEVICE_STACK
config USB_NRFX config USB_NRFX
default y default y
endif # USB_DEVICE_STACK endif # USB_DEVICE_STACK
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
config PINMUX config PINMUX
default y default y
if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833
config BOARD_NRFMICRO_CHARGER config BOARD_NRFMICRO_CHARGER
default y default y
endif # BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 endif # BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833

View File

@ -6,50 +6,50 @@
/ { / {
pro_micro: connector { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 8 0> /* D0 */ = <0 0 &gpio0 8 0> /* D0 */
, <1 0 &gpio0 6 0> /* D1 */ , <1 0 &gpio0 6 0> /* D1 */
, <2 0 &gpio0 15 0> /* D2 */ , <2 0 &gpio0 15 0> /* D2 */
, <3 0 &gpio0 17 0> /* D3 */ , <3 0 &gpio0 17 0> /* D3 */
, <4 0 &gpio0 20 0> /* D4/A6 */ , <4 0 &gpio0 20 0> /* D4/A6 */
, <5 0 &gpio0 13 0> /* D5 */ , <5 0 &gpio0 13 0> /* D5 */
, <6 0 &gpio0 24 0> /* D6/A7 */ , <6 0 &gpio0 24 0> /* D6/A7 */
, <7 0 &gpio0 9 0> /* D7 */ , <7 0 &gpio0 9 0> /* D7 */
, <8 0 &gpio0 10 0> /* D8/A8 */ , <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */ , <10 0 &gpio1 11 0> /* D10/A10 */
, <16 0 &gpio0 28 0> /* D16 */ , <16 0 &gpio0 28 0> /* D16 */
, <14 0 &gpio0 3 0> /* D14 */ , <14 0 &gpio0 3 0> /* D14 */
, <15 0 &gpio1 13 0> /* D15 */ , <15 0 &gpio1 13 0> /* D15 */
, <18 0 &gpio0 2 0> /* D18/A0 */ , <18 0 &gpio0 2 0> /* D18/A0 */
, <19 0 &gpio0 29 0> /* D19/A1 */ , <19 0 &gpio0 29 0> /* D19/A1 */
, <20 0 &gpio0 31 0> /* D20/A2 */ , <20 0 &gpio0 31 0> /* D20/A2 */
, <21 0 &gpio0 30 0> /* D21/A3 */ , <21 0 &gpio0 30 0> /* D21/A3 */
; ;
}; };
pro_micro_a: connector_a { pro_micro_a: connector_a {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 2 0> /* D18/A0 */ = <0 0 &gpio0 2 0> /* D18/A0 */
, <1 0 &gpio0 29 0> /* D19/A1 */ , <1 0 &gpio0 29 0> /* D19/A1 */
, <2 0 &gpio0 31 0> /* D20/A2 */ , <2 0 &gpio0 31 0> /* D20/A2 */
, <3 0 &gpio0 30 0> /* D21/A3 */ , <3 0 &gpio0 30 0> /* D21/A3 */
, <6 0 &gpio0 20 0> /* D4/A6 */ , <6 0 &gpio0 20 0> /* D4/A6 */
, <7 0 &gpio0 24 0> /* D6/A7 */ , <7 0 &gpio0 24 0> /* D6/A7 */
, <8 0 &gpio0 10 0> /* D8/A8 */ , <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */ , <10 0 &gpio1 11 0> /* D10/A10 */
; ;
}; };
}; };

View File

@ -6,50 +6,50 @@
/ { / {
pro_micro: connector { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 8 0> /* D0 */ = <0 0 &gpio0 8 0> /* D0 */
, <1 0 &gpio0 6 0> /* D1 */ , <1 0 &gpio0 6 0> /* D1 */
, <2 0 &gpio0 15 0> /* D2 */ , <2 0 &gpio0 15 0> /* D2 */
, <3 0 &gpio0 17 0> /* D3 */ , <3 0 &gpio0 17 0> /* D3 */
, <4 0 &gpio0 20 0> /* D4/A6 */ , <4 0 &gpio0 20 0> /* D4/A6 */
, <5 0 &gpio0 13 0> /* D5 */ , <5 0 &gpio0 13 0> /* D5 */
, <6 0 &gpio0 24 0> /* D6/A7 */ , <6 0 &gpio0 24 0> /* D6/A7 */
, <7 0 &gpio0 9 0> /* D7 */ , <7 0 &gpio0 9 0> /* D7 */
, <8 0 &gpio0 10 0> /* D8/A8 */ , <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 4 0> /* D10/A10 */ , <10 0 &gpio1 4 0> /* D10/A10 */
, <16 0 &gpio0 28 0> /* D16 */ , <16 0 &gpio0 28 0> /* D16 */
, <14 0 &gpio0 3 0> /* D14 */ , <14 0 &gpio0 3 0> /* D14 */
, <15 0 &gpio1 5 0> /* D15 */ , <15 0 &gpio1 5 0> /* D15 */
, <18 0 &gpio0 2 0> /* D18/A0 */ , <18 0 &gpio0 2 0> /* D18/A0 */
, <19 0 &gpio0 29 0> /* D19/A1 */ , <19 0 &gpio0 29 0> /* D19/A1 */
, <20 0 &gpio0 31 0> /* D20/A2 */ , <20 0 &gpio0 31 0> /* D20/A2 */
, <21 0 &gpio0 30 0> /* D21/A3 */ , <21 0 &gpio0 30 0> /* D21/A3 */
; ;
}; };
pro_micro_a: connector_a { pro_micro_a: connector_a {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 2 0> /* D18/A0 */ = <0 0 &gpio0 2 0> /* D18/A0 */
, <1 0 &gpio0 29 0> /* D19/A1 */ , <1 0 &gpio0 29 0> /* D19/A1 */
, <2 0 &gpio0 31 0> /* D20/A2 */ , <2 0 &gpio0 31 0> /* D20/A2 */
, <3 0 &gpio0 30 0> /* D21/A3 */ , <3 0 &gpio0 30 0> /* D21/A3 */
, <6 0 &gpio0 20 0> /* D4/A6 */ , <6 0 &gpio0 20 0> /* D4/A6 */
, <7 0 &gpio0 24 0> /* D6/A7 */ , <7 0 &gpio0 24 0> /* D6/A7 */
, <8 0 &gpio0 10 0> /* D8/A8 */ , <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */ , <10 0 &gpio1 11 0> /* D10/A10 */
; ;
}; };
}; };

View File

@ -5,50 +5,50 @@
*/ */
/ { / {
pro_micro: connector { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 8 0> /* D0 */ = <0 0 &gpio0 8 0> /* D0 */
, <1 0 &gpio0 6 0> /* D1 */ , <1 0 &gpio0 6 0> /* D1 */
, <2 0 &gpio0 30 0> /* D2 */ , <2 0 &gpio0 30 0> /* D2 */
, <3 0 &gpio0 31 0> /* D3 */ , <3 0 &gpio0 31 0> /* D3 */
, <4 0 &gpio0 29 0> /* D4/A6 */ , <4 0 &gpio0 29 0> /* D4/A6 */
, <5 0 &gpio0 2 0> /* D5 */ , <5 0 &gpio0 2 0> /* D5 */
, <6 0 &gpio1 13 0> /* D6/A7 */ , <6 0 &gpio1 13 0> /* D6/A7 */
, <7 0 &gpio0 3 0> /* D7 */ , <7 0 &gpio0 3 0> /* D7 */
, <8 0 &gpio0 28 0> /* D8/A8 */ , <8 0 &gpio0 28 0> /* D8/A8 */
, <9 0 &gpio1 11 0> /* D9/A9 */ , <9 0 &gpio1 11 0> /* D9/A9 */
, <10 0 &gpio1 6 0> /* D10/A10 */ , <10 0 &gpio1 6 0> /* D10/A10 */
, <16 0 &gpio0 10 0> /* D16 */ , <16 0 &gpio0 10 0> /* D16 */
, <14 0 &gpio0 9 0> /* D14 */ , <14 0 &gpio0 9 0> /* D14 */
, <15 0 &gpio0 24 0> /* D15 */ , <15 0 &gpio0 24 0> /* D15 */
, <18 0 &gpio0 13 0> /* D18/A0 */ , <18 0 &gpio0 13 0> /* D18/A0 */
, <19 0 &gpio0 20 0> /* D19/A1 */ , <19 0 &gpio0 20 0> /* D19/A1 */
, <20 0 &gpio0 17 0> /* D20/A2 */ , <20 0 &gpio0 17 0> /* D20/A2 */
, <21 0 &gpio0 15 0> /* D21/A3 */ , <21 0 &gpio0 15 0> /* D21/A3 */
; ;
}; };
pro_micro_a: connector_a { pro_micro_a: connector_a {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 13 0> /* D18/A0 */ = <0 0 &gpio0 13 0> /* D18/A0 */
, <1 0 &gpio0 20 0> /* D19/A1 */ , <1 0 &gpio0 20 0> /* D19/A1 */
, <2 0 &gpio0 17 0> /* D20/A2 */ , <2 0 &gpio0 17 0> /* D20/A2 */
, <3 0 &gpio0 15 0> /* D21/A3 */ , <3 0 &gpio0 15 0> /* D21/A3 */
, <6 0 &gpio0 29 0> /* D4/A6 */ , <6 0 &gpio0 29 0> /* D4/A6 */
, <7 0 &gpio1 13 0> /* D6/A7 */ , <7 0 &gpio1 13 0> /* D6/A7 */
, <8 0 &gpio0 28 0> /* D8/A8 */ , <8 0 &gpio0 28 0> /* D8/A8 */
, <9 0 &gpio1 11 0> /* D9/A9 */ , <9 0 &gpio1 11 0> /* D9/A9 */
, <10 0 &gpio1 6 0> /* D10/A10 */ , <10 0 &gpio1 6 0> /* D10/A10 */
; ;
}; };
}; };
pro_micro_d: &pro_micro {}; pro_micro_d: &pro_micro {};

View File

@ -4,36 +4,36 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default { uart0_default: uart0_default {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>; psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up; bias-pull-up;
}; };
group2 { group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>; psels = <NRF_PSEL(UART_TX, 0, 6)>;
}; };
}; };
uart0_sleep: uart0_sleep { uart0_sleep: uart0_sleep {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>, psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>; <NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable; low-power-enable;
}; };
}; };
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 30)>, psels = <NRF_PSEL(TWIM_SDA, 0, 30)>,
<NRF_PSEL(TWIM_SCL, 0, 31)>; <NRF_PSEL(TWIM_SCL, 0, 31)>;
}; };
}; };
i2c0_sleep: i2c0_sleep { i2c0_sleep: i2c0_sleep {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 30)>, psels = <NRF_PSEL(TWIM_SDA, 0, 30)>,
<NRF_PSEL(TWIM_SCL, 0, 31)>; <NRF_PSEL(TWIM_SCL, 0, 31)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View File

@ -4,36 +4,36 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default { uart0_default: uart0_default {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>; psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up; bias-pull-up;
}; };
group2 { group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>; psels = <NRF_PSEL(UART_TX, 0, 6)>;
}; };
}; };
uart0_sleep: uart0_sleep { uart0_sleep: uart0_sleep {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>, psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>; <NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable; low-power-enable;
}; };
}; };
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 17)>; <NRF_PSEL(TWIM_SCL, 0, 17)>;
}; };
}; };
i2c0_sleep: i2c0_sleep { i2c0_sleep: i2c0_sleep {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 17)>; <NRF_PSEL(TWIM_SCL, 0, 17)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View File

@ -10,102 +10,102 @@
#include "nrfmicro-pinctrl.dtsi" #include "nrfmicro-pinctrl.dtsi"
/ { / {
model = "nrfmicro"; model = "nrfmicro";
compatible = "joric,nrfmicro"; compatible = "joric,nrfmicro";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
}; };
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twim"; compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -10,102 +10,102 @@
#include "nrfmicro-flipped-pinctrl.dtsi" #include "nrfmicro-flipped-pinctrl.dtsi"
/ { / {
model = "nrfmicro"; model = "nrfmicro";
compatible = "joric,nrfmicro"; compatible = "joric,nrfmicro";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
}; };
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twim"; compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -10,115 +10,115 @@
#include "nrfmicro-pinctrl.dtsi" #include "nrfmicro-pinctrl.dtsi"
/ { / {
model = "nrfmicro"; model = "nrfmicro";
compatible = "joric,nrfmicro"; compatible = "joric,nrfmicro";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 820000)>; full-ohms = <(2000000 + 820000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twim"; compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -10,115 +10,115 @@
#include "nrfmicro-pinctrl.dtsi" #include "nrfmicro-pinctrl.dtsi"
/ { / {
model = "nrfmicro"; model = "nrfmicro";
compatible = "joric,nrfmicro"; compatible = "joric,nrfmicro";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 820000)>; full-ohms = <(2000000 + 820000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twim"; compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x00046000>; reg = <0x00026000 0x00046000>;
}; };
/* /*
* The flash starting at 0x0006c000 and ending at * The flash starting at 0x0006c000 and ending at
* 0x00073fff is reserved for use by the application. * 0x00073fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@6c000 { storage_partition: partition@6c000 {
label = "storage"; label = "storage";
reg = <0x0006c000 0x00008000>; reg = <0x0006c000 0x00008000>;
}; };
boot_partition: partition@74000 { boot_partition: partition@74000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x00074000 0x0000c000>; reg = <0x00074000 0x0000c000>;
}; };
}; };
}; };

View File

@ -4,53 +4,53 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default { uart0_default: uart0_default {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>; psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up; bias-pull-up;
}; };
group2 { group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>; psels = <NRF_PSEL(UART_TX, 0, 6)>;
}; };
}; };
uart0_sleep: uart0_sleep { uart0_sleep: uart0_sleep {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>, psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>; <NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable; low-power-enable;
}; };
}; };
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 13)>; <NRF_PSEL(TWIM_SCL, 0, 13)>;
}; };
}; };
i2c0_sleep: i2c0_sleep { i2c0_sleep: i2c0_sleep {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 13)>; <NRF_PSEL(TWIM_SCL, 0, 13)>;
low-power-enable; low-power-enable;
}; };
}; };
spi1_default: spi1_default { spi1_default: spi1_default {
group1 { group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 40)>, psels = <NRF_PSEL(SPIM_SCK, 0, 40)>,
<NRF_PSEL(SPIM_MOSI, 0, 11)>, <NRF_PSEL(SPIM_MOSI, 0, 11)>,
<NRF_PSEL(SPIM_MISO, 1, 26)>; <NRF_PSEL(SPIM_MISO, 1, 26)>;
}; };
}; };
spi1_sleep: spi1_sleep { spi1_sleep: spi1_sleep {
group1 { group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 40)>, psels = <NRF_PSEL(SPIM_SCK, 0, 40)>,
<NRF_PSEL(SPIM_MOSI, 0, 11)>, <NRF_PSEL(SPIM_MOSI, 0, 11)>,
<NRF_PSEL(SPIM_MISO, 1, 26)>; <NRF_PSEL(SPIM_MISO, 1, 26)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View File

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_PLANCK_REV6 config BOARD_PLANCK_REV6
bool "Planck V6 Keyboard" bool "Planck V6 Keyboard"
depends on SOC_STM32F303XC depends on SOC_STM32F303XC

View File

@ -6,10 +6,10 @@
if BOARD_PLANCK_REV6 if BOARD_PLANCK_REV6
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "Planck V6" default "Planck V6"
config ZMK_USB config ZMK_USB
default y default y
config ZMK_KSCAN_MATRIX_POLLING config ZMK_KSCAN_MATRIX_POLLING
default y default y

View File

@ -10,123 +10,123 @@
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
/ { / {
model = "Plack PCD, rev6"; model = "Plack PCD, rev6";
compatible = "planck,rev6", "st,stm32f303"; compatible = "planck,rev6", "st,stm32f303";
chosen { chosen {
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &layout_grid_transform; zmk,matrix_transform = &layout_grid_transform;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpiob 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpiob 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioc 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioc 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioc 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioc 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios col-gpios
= <&gpiob 11 GPIO_ACTIVE_HIGH> = <&gpiob 11 GPIO_ACTIVE_HIGH>
, <&gpiob 10 GPIO_ACTIVE_HIGH> , <&gpiob 10 GPIO_ACTIVE_HIGH>
, <&gpiob 2 GPIO_ACTIVE_HIGH> , <&gpiob 2 GPIO_ACTIVE_HIGH>
, <&gpiob 1 GPIO_ACTIVE_HIGH> , <&gpiob 1 GPIO_ACTIVE_HIGH>
, <&gpioa 7 GPIO_ACTIVE_HIGH> , <&gpioa 7 GPIO_ACTIVE_HIGH>
, <&gpiob 0 GPIO_ACTIVE_HIGH> , <&gpiob 0 GPIO_ACTIVE_HIGH>
; ;
}; };
layout_grid_transform: layout_grid_transform:
keymap_transform_0 { keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <6>; columns = <6>;
rows = <8>; rows = <8>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,5) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,5) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
>; >;
}; };
layout_mit_transform: layout_mit_transform:
keymap_transform_1 { keymap_transform_1 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <6>; columns = <6>;
rows = <8>; rows = <8>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
>; >;
}; };
layout_2x2u_transform: layout_2x2u_transform:
keymap_transform_2 { keymap_transform_2 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <6>; columns = <6>;
rows = <8>; rows = <8>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,5) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,5) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
>; >;
}; };
}; };
&usb { &usb {
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default"; pinctrl-names = "default";
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&clk_hse { &clk_hse {
status = "okay"; status = "okay";
clock-frequency = <DT_FREQ_M(8)>; clock-frequency = <DT_FREQ_M(8)>;
}; };
&pll { &pll {
prediv = <1>; prediv = <1>;
mul = <9>; mul = <9>;
clocks = <&clk_hse>; clocks = <&clk_hse>;
status = "okay"; status = "okay";
}; };
&rcc { &rcc {
clocks = <&pll>; clocks = <&pll>;
clock-frequency = <DT_FREQ_M(72)>; clock-frequency = <DT_FREQ_M(72)>;
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <2>; apb1-prescaler = <2>;
apb2-prescaler = <1>; apb2-prescaler = <1>;
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
/* Set 6Kb of storage at the end of the 256Kb of flash */ /* Set 6Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@3e800 { storage_partition: partition@3e800 {
label = "storage"; label = "storage";
reg = <0x0003e800 0x00001800>; reg = <0x0003e800 0x00001800>;
}; };
}; };
}; };

View File

@ -8,39 +8,39 @@
#include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/keys.h>
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { default_layer {
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | // | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC |
// | ESC | A | S | D | F | G | H | J | K | L | ; | ' | // | ESC | A | S | D | F | G | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET | // | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET |
// | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW | // | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW |
bindings = < bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RET &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RET
&trans &kp LCTL &kp LALT &kp LGUI &mo 1 &trans &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &kp LCTL &kp LALT &kp LGUI &mo 1 &trans &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT
>; >;
}; };
lower { lower {
bindings = < bindings = <
&kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL &kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans
&trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP &trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
>; >;
}; };
raise { raise {
bindings = < bindings = <
&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
&sys_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,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_PREONIC_REV3 config BOARD_PREONIC_REV3
bool "Preonic V3 Keyboard" bool "Preonic V3 Keyboard"
depends on SOC_STM32F303XC depends on SOC_STM32F303XC

View File

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_QMK_PROTON_C config BOARD_QMK_PROTON_C
bool "QMK Proton-C" bool "QMK Proton-C"
depends on SOC_STM32F303XC depends on SOC_STM32F303XC

View File

@ -6,9 +6,9 @@
if BOARD_QMK_PROTON_C if BOARD_QMK_PROTON_C
config BOARD config BOARD
default "proton_c" default "proton_c"
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_QMK_PROTON_C endif # BOARD_QMK_PROTON_C

View File

@ -5,50 +5,50 @@
*/ */
/ { / {
pro_micro: connector { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpioa 10 0> /* D0 */ = <0 0 &gpioa 10 0> /* D0 */
, <1 0 &gpioa 9 0> /* D1 */ , <1 0 &gpioa 9 0> /* D1 */
, <2 0 &gpiob 7 0> /* D2 */ , <2 0 &gpiob 7 0> /* D2 */
, <3 0 &gpiob 6 0> /* D3 */ , <3 0 &gpiob 6 0> /* D3 */
, <4 0 &gpiob 5 0> /* D4/A6 */ , <4 0 &gpiob 5 0> /* D4/A6 */
, <5 0 &gpiob 4 0> /* D5 */ , <5 0 &gpiob 4 0> /* D5 */
, <6 0 &gpiob 3 0> /* D6/A7 */ , <6 0 &gpiob 3 0> /* D6/A7 */
, <7 0 &gpiob 2 0> /* D7 */ , <7 0 &gpiob 2 0> /* D7 */
, <8 0 &gpiob 1 0> /* D8/A8 */ , <8 0 &gpiob 1 0> /* D8/A8 */
, <9 0 &gpiob 0 0> /* D9/A9 */ , <9 0 &gpiob 0 0> /* D9/A9 */
, <10 0 &gpiob 9 0> /* D10/A10 */ , <10 0 &gpiob 9 0> /* D10/A10 */
, <16 0 &gpiob 15 0> /* D16 */ , <16 0 &gpiob 15 0> /* D16 */
, <14 0 &gpiob 14 0> /* D14 */ , <14 0 &gpiob 14 0> /* D14 */
, <15 0 &gpiob 13 0> /* D15 */ , <15 0 &gpiob 13 0> /* D15 */
, <18 0 &gpiob 8 0> /* D18/A0 */ , <18 0 &gpiob 8 0> /* D18/A0 */
, <19 0 &gpioa 0 0> /* D19/A1 */ , <19 0 &gpioa 0 0> /* D19/A1 */
, <20 0 &gpioa 1 0> /* D20/A2 */ , <20 0 &gpioa 1 0> /* D20/A2 */
, <21 0 &gpioa 2 0> /* D21/A3 */ , <21 0 &gpioa 2 0> /* D21/A3 */
; ;
}; };
pro_micro_a: connector_a { pro_micro_a: connector_a {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpiob 8 0> /* D18/A0 */ = <0 0 &gpiob 8 0> /* D18/A0 */
, <1 0 &gpioa 0 0> /* D19/A1 */ , <1 0 &gpioa 0 0> /* D19/A1 */
, <2 0 &gpioa 1 0> /* D20/A2 */ , <2 0 &gpioa 1 0> /* D20/A2 */
, <3 0 &gpioa 2 0> /* D21/A3 */ , <3 0 &gpioa 2 0> /* D21/A3 */
, <6 0 &gpiob 5 0> /* D4/A6 */ , <6 0 &gpiob 5 0> /* D4/A6 */
, <7 0 &gpiob 3 0> /* D6/A7 */ , <7 0 &gpiob 3 0> /* D6/A7 */
, <8 0 &gpiob 1 0> /* D8/A8 */ , <8 0 &gpiob 1 0> /* D8/A8 */
, <9 0 &gpiob 0 0> /* D9/A9 */ , <9 0 &gpiob 0 0> /* D9/A9 */
, <10 0 &gpiob 9 0> /* D10/A10 */ , <10 0 &gpiob 9 0> /* D10/A10 */
; ;
}; };
}; };
pro_micro_d: &pro_micro {}; pro_micro_d: &pro_micro {};

View File

@ -10,91 +10,91 @@
#include "arduino_pro_micro_pins.dtsi" #include "arduino_pro_micro_pins.dtsi"
/ { / {
model = "QMK Proton C"; model = "QMK Proton C";
compatible = "qmk,proton_c", "st,stm32f303"; compatible = "qmk,proton_c", "st,stm32f303";
chosen { chosen {
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart0; zephyr,console = &cdc_acm_uart0;
}; };
aliases { aliases {
led0 = &led; led0 = &led;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
led: led_0 { led: led_0 {
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
label = "User LED"; label = "User LED";
}; };
}; };
}; };
&usart1 { &usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
pinctrl-names = "default"; pinctrl-names = "default";
}; };
&spi2 { &spi2 {
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
pinctrl-names = "default"; pinctrl-names = "default";
}; };
&i2c1 { &i2c1 {
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
pinctrl-names = "default"; pinctrl-names = "default";
}; };
&clk_hse { &clk_hse {
status = "okay"; status = "okay";
clock-frequency = <DT_FREQ_M(8)>; clock-frequency = <DT_FREQ_M(8)>;
}; };
&pll { &pll {
prediv = <1>; prediv = <1>;
mul = <9>; mul = <9>;
clocks = <&clk_hse>; clocks = <&clk_hse>;
status = "okay"; status = "okay";
}; };
&rcc { &rcc {
clocks = <&pll>; clocks = <&pll>;
clock-frequency = <DT_FREQ_M(72)>; clock-frequency = <DT_FREQ_M(72)>;
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <2>; apb1-prescaler = <2>;
apb2-prescaler = <1>; apb2-prescaler = <1>;
}; };
&usb { &usb {
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default"; pinctrl-names = "default";
status = "okay"; status = "okay";
cdc_acm_uart0: cdc_acm_uart0 { cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&rtc { &rtc {
status = "okay"; status = "okay";
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
/* Set 6Kb of storage at the end of the 256Kb of flash */ /* Set 6Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@3e800 { storage_partition: partition@3e800 {
label = "storage"; label = "storage";
reg = <0x0003e800 0x00001800>; reg = <0x0003e800 0x00001800>;
}; };
}; };
}; };

View File

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_PUCHI_BLE_v1 config BOARD_PUCHI_BLE_v1
bool "puchi_ble_v1" bool "puchi_ble_v1"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -4,25 +4,25 @@
if BOARD_PUCHI_BLE_v1 if BOARD_PUCHI_BLE_v1
config BOARD config BOARD
default "puchi_ble" default "puchi_ble"
if USB_DEVICE_STACK if USB_DEVICE_STACK
config USB_NRFX config USB_NRFX
default y default y
endif # USB_DEVICE_STACK endif # USB_DEVICE_STACK
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
config PINMUX config PINMUX
default y default y
endif # BOARD_PUCHI_BLE_v1 endif # BOARD_PUCHI_BLE_v1

View File

@ -6,50 +6,50 @@
/ { / {
pro_micro: connector { pro_micro: connector {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 8 0> /* D0 */ = <0 0 &gpio0 8 0> /* D0 */
, <1 0 &gpio0 6 0> /* D1 */ , <1 0 &gpio0 6 0> /* D1 */
, <2 0 &gpio0 15 0> /* D2 */ , <2 0 &gpio0 15 0> /* D2 */
, <3 0 &gpio0 17 0> /* D3 */ , <3 0 &gpio0 17 0> /* D3 */
, <4 0 &gpio0 20 0> /* D4/A6 */ , <4 0 &gpio0 20 0> /* D4/A6 */
, <5 0 &gpio0 13 0> /* D5 */ , <5 0 &gpio0 13 0> /* D5 */
, <6 0 &gpio0 24 0> /* D6/A7 */ , <6 0 &gpio0 24 0> /* D6/A7 */
, <7 0 &gpio0 9 0> /* D7 */ , <7 0 &gpio0 9 0> /* D7 */
, <8 0 &gpio0 10 0> /* D8/A8 */ , <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */ , <10 0 &gpio1 11 0> /* D10/A10 */
, <16 0 &gpio0 28 0> /* D16 */ , <16 0 &gpio0 28 0> /* D16 */
, <14 0 &gpio0 3 0> /* D14 */ , <14 0 &gpio0 3 0> /* D14 */
, <15 0 &gpio1 13 0> /* D15 */ , <15 0 &gpio1 13 0> /* D15 */
, <18 0 &gpio0 2 0> /* D18/A0 */ , <18 0 &gpio0 2 0> /* D18/A0 */
, <19 0 &gpio0 29 0> /* D19/A1 */ , <19 0 &gpio0 29 0> /* D19/A1 */
, <20 0 &gpio0 31 0> /* D20/A2 */ , <20 0 &gpio0 31 0> /* D20/A2 */
, <21 0 &gpio0 30 0> /* D21/A3 */ , <21 0 &gpio0 30 0> /* D21/A3 */
; ;
}; };
pro_micro_a: connector_a { pro_micro_a: connector_a {
compatible = "arduino-pro-micro"; compatible = "arduino-pro-micro";
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>; gpio-map-pass-thru = <0 0x3f>;
gpio-map gpio-map
= <0 0 &gpio0 2 0> /* D18/A0 */ = <0 0 &gpio0 2 0> /* D18/A0 */
, <1 0 &gpio0 29 0> /* D19/A1 */ , <1 0 &gpio0 29 0> /* D19/A1 */
, <2 0 &gpio0 31 0> /* D20/A2 */ , <2 0 &gpio0 31 0> /* D20/A2 */
, <3 0 &gpio0 30 0> /* D21/A3 */ , <3 0 &gpio0 30 0> /* D21/A3 */
, <6 0 &gpio0 20 0> /* D4/A6 */ , <6 0 &gpio0 20 0> /* D4/A6 */
, <7 0 &gpio0 24 0> /* D6/A7 */ , <7 0 &gpio0 24 0> /* D6/A7 */
, <8 0 &gpio0 10 0> /* D8/A8 */ , <8 0 &gpio0 10 0> /* D8/A8 */
, <9 0 &gpio1 6 0> /* D9/A9 */ , <9 0 &gpio1 6 0> /* D9/A9 */
, <10 0 &gpio1 11 0> /* D10/A10 */ , <10 0 &gpio1 11 0> /* D10/A10 */
; ;
}; };
}; };

View File

@ -4,36 +4,36 @@
*/ */
&pinctrl { &pinctrl {
uart0_default: uart0_default { uart0_default: uart0_default {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>; psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up; bias-pull-up;
}; };
group2 { group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>; psels = <NRF_PSEL(UART_TX, 0, 6)>;
}; };
}; };
uart0_sleep: uart0_sleep { uart0_sleep: uart0_sleep {
group1 { group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>, psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>; <NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable; low-power-enable;
}; };
}; };
i2c0_default: i2c0_default { i2c0_default: i2c0_default {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 17)>; <NRF_PSEL(TWIM_SCL, 0, 17)>;
}; };
}; };
i2c0_sleep: i2c0_sleep { i2c0_sleep: i2c0_sleep {
group1 { group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>, psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 17)>; <NRF_PSEL(TWIM_SCL, 0, 17)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View File

@ -10,115 +10,115 @@
#include "puchi_ble_v1-pinctrl.dtsi" #include "puchi_ble_v1-pinctrl.dtsi"
/ { / {
model = "puchi_ble"; model = "puchi_ble";
compatible = "puchi_ble"; compatible = "puchi_ble";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 820000)>; full-ohms = <(2000000 + 820000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&i2c0 { &i2c0 {
compatible = "nordic,nrf-twi"; compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>; pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
compatible = "nordic,nrf-uarte"; compatible = "nordic,nrf-uarte";
pinctrl-0 = <&uart0_default>; pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -2,5 +2,5 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_S40NC config BOARD_S40NC
bool "S40NC" bool "S40NC"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View File

@ -4,25 +4,25 @@
if BOARD_S40NC if BOARD_S40NC
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "S40NC" default "S40NC"
if USB if USB
config USB_NRFX config USB_NRFX
default y default y
config USB_DEVICE_STACK config USB_DEVICE_STACK
default y default y
endif # USB endif # USB
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_S40NC endif # BOARD_S40NC

View File

@ -9,137 +9,137 @@
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
/ { / {
model = "S40NC"; model = "S40NC";
compatible = "s40nc"; compatible = "s40nc";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <12>; columns = <12>;
rows = <4>; rows = <4>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,11) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,11)
RC(2,0) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,0) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,4) RC(3,6) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,0) RC(3,1) RC(3,2) RC(3,4) RC(3,6) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
>; >;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios col-gpios
= <&gpio1 2 GPIO_ACTIVE_HIGH> = <&gpio1 2 GPIO_ACTIVE_HIGH>
, <&gpio1 1 GPIO_ACTIVE_HIGH> , <&gpio1 1 GPIO_ACTIVE_HIGH>
, <&gpio1 3 GPIO_ACTIVE_HIGH> , <&gpio1 3 GPIO_ACTIVE_HIGH>
, <&gpio1 0 GPIO_ACTIVE_HIGH> , <&gpio1 0 GPIO_ACTIVE_HIGH>
, <&gpio0 22 GPIO_ACTIVE_HIGH> , <&gpio0 22 GPIO_ACTIVE_HIGH>
, <&gpio1 15 GPIO_ACTIVE_HIGH> , <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH> , <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH> , <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH> , <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH> , <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH> , <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH> , <&gpio0 31 GPIO_ACTIVE_HIGH>
; ;
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <2000000>; output-ohms = <2000000>;
full-ohms = <(2000000 + 820000)>; full-ohms = <(2000000 + 820000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "mbr"; label = "mbr";
reg = <0x00000000 0x00001000>; reg = <0x00000000 0x00001000>;
}; };
code_partition: partition@1000 { code_partition: partition@1000 {
label = "code_partition"; label = "code_partition";
reg = <0x00001000 0x000d3000>; reg = <0x00001000 0x000d3000>;
}; };
/* /*
* The flash starting at 0x000d4000 and ending at * The flash starting at 0x000d4000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@d4000 { storage_partition: partition@d4000 {
label = "storage"; label = "storage";
reg = <0x000d4000 0x00020000>; reg = <0x000d4000 0x00020000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };

View File

@ -15,44 +15,44 @@
#define CONTROL 3 #define CONTROL 3
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { default_layer {
bindings = < bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&mo LOWER &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp ENTER &mo LOWER &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp ENTER
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp FSLH &kp UP &kp RSHFT &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp FSLH &kp UP &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &lt LOWER SPACE &lt CONTROL SPACE &lt RAISE SPACE &kp LEFT &kp DOWN &kp RIGHT &kp LCTRL &kp LGUI &kp LALT &lt LOWER SPACE &lt CONTROL SPACE &lt RAISE SPACE &kp LEFT &kp DOWN &kp RIGHT
>; >;
}; };
lower_layer { lower_layer {
bindings = < bindings = <
&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 PSCRN &kp MINUS &kp EQUAL &trans &trans &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp APOS &kp PSCRN &kp MINUS &kp EQUAL &trans &trans &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp APOS
&trans &trans &trans &trans &trans &trans &trans &kp COMMA &kp DOT &kp PG_UP &kp BSLH &trans &trans &trans &trans &trans &trans &trans &kp COMMA &kp DOT &kp PG_UP &kp BSLH
&trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END &trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END
>; >;
}; };
raise_layer { raise_layer {
bindings = < bindings = <
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &trans &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &trans
&kp PSCRN &kp UNDER &kp PLUS &trans &trans &trans &trans &kp LBRC &kp RBRC &kp COLON &kp DQT &kp PSCRN &kp UNDER &kp PLUS &trans &trans &trans &trans &kp LBRC &kp RBRC &kp COLON &kp DQT
&trans &trans &trans &trans &trans &trans &trans &kp LT &kp GT &kp PG_UP &kp PIPE &trans &trans &trans &trans &trans &trans &trans &kp LT &kp GT &kp PG_UP &kp PIPE
&trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END &trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END
>; >;
}; };
control_layer { control_layer {
bindings = < bindings = <
&bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp 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 &sys_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

@ -3,16 +3,16 @@
#include <dt-bindings/zmk/kscan_mock.h> #include <dt-bindings/zmk/kscan_mock.h>
/ { / {
chosen { chosen {
zmk,kscan = &kscan; zmk,kscan = &kscan;
}; };
kscan: kscan { kscan: kscan {
compatible = "zmk,kscan-mock"; compatible = "zmk,kscan-mock";
label = "KSCAN_MOCK"; label = "KSCAN_MOCK";
rows = <2>; rows = <2>;
columns = <2>; columns = <2>;
exit-after; exit-after;
}; };
}; };

View File

@ -3,16 +3,16 @@
#include <dt-bindings/zmk/kscan_mock.h> #include <dt-bindings/zmk/kscan_mock.h>
/ { / {
chosen { chosen {
zmk,kscan = &kscan; zmk,kscan = &kscan;
}; };
kscan: kscan { kscan: kscan {
compatible = "zmk,kscan-mock"; compatible = "zmk,kscan-mock";
label = "KSCAN_MOCK"; label = "KSCAN_MOCK";
rows = <2>; rows = <2>;
columns = <2>; columns = <2>;
exit-after; exit-after;
}; };
}; };

View File

@ -5,15 +5,15 @@
*/ */
/ { / {
chosen { chosen {
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
}; };
}; };
&usb0 { &usb0 {
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };

View File

@ -6,29 +6,29 @@
/ { / {
chosen { chosen {
zephyr,console = &cdc_acm_uart; zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 7>; io-channels = <&adc 7>;
power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
output-ohms = <510000>; output-ohms = <510000>;
full-ohms = <(1000000 + 510000)>; full-ohms = <(1000000 + 510000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&usbd { &usbd {
cdc_acm_uart: cdc_acm_uart { cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart"; compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0"; label = "CDC_ACM_0";
}; };
}; };

View File

@ -2,13 +2,13 @@
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "cradios" default "cradios"
# Unable to use interrupts as the same pin number is used # Unable to use interrupts as the same pin number is used
# across A & B controllers, and STM32F303CCT6 can't enable # across A & B controllers, and STM32F303CCT6 can't enable
# interrutps for multiple controllers for the same "line" # interrutps for multiple controllers for the same "line"
# for the external interrupts. # for the external interrupts.
config ZMK_KSCAN_GPIO_POLLING config ZMK_KSCAN_GPIO_POLLING
default y default y

View File

@ -2,4 +2,4 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config SHIELD_CRADIOS config SHIELD_CRADIOS
def_bool $(shields_list_contains,cradios) def_bool $(shields_list_contains,cradios)

View File

@ -4,16 +4,16 @@
if SHIELD_A_DUX_LEFT if SHIELD_A_DUX_LEFT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "A. Dux" default "A. Dux"
config ZMK_SPLIT_ROLE_CENTRAL config ZMK_SPLIT_ROLE_CENTRAL
default y default y
endif endif
if SHIELD_A_DUX_LEFT || SHIELD_A_DUX_RIGHT if SHIELD_A_DUX_LEFT || SHIELD_A_DUX_RIGHT
config ZMK_SPLIT config ZMK_SPLIT
default y default y
endif endif

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config SHIELD_A_DUX_LEFT config SHIELD_A_DUX_LEFT
def_bool $(shields_list_contains,a_dux_left) def_bool $(shields_list_contains,a_dux_left)
config SHIELD_A_DUX_RIGHT config SHIELD_A_DUX_RIGHT
def_bool $(shields_list_contains,a_dux_right) def_bool $(shields_list_contains,a_dux_right)

View File

@ -8,45 +8,45 @@
/ { / {
chosen { chosen {
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform"; compatible = "zmk,matrix-transform";
columns = <34>; columns = <34>;
rows = <1>; rows = <1>;
map = < map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17)
RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22)
RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27)
RC(0,15) RC(0,16) RC(0,33) RC(0,32) RC(0,15) RC(0,16) RC(0,33) RC(0,32)
>; >;
}; };
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-direct"; compatible = "zmk,kscan-gpio-direct";
label = "KSCAN"; label = "KSCAN";
input-gpios = input-gpios =
<&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
; ;
}; };
}; };

View File

@ -9,18 +9,18 @@
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
// This is a sample keymap intended to be replaced with your own // This is a sample keymap intended to be replaced with your own
base_layer { base_layer {
bindings = < bindings = <
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH
&kp TAB &kp BSPC &kp SPACE &kp ENTER &kp TAB &kp BSPC &kp SPACE &kp ENTER
>; >;
}; };
}; };
}; };

View File

@ -7,5 +7,5 @@
#include "a_dux.dtsi" #include "a_dux.dtsi"
&default_transform { &default_transform {
col-offset = <17>; col-offset = <17>;
}; };

View File

@ -4,16 +4,16 @@
if SHIELD_BFO9000_LEFT if SHIELD_BFO9000_LEFT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "BFO-9000" default "BFO-9000"
config ZMK_SPLIT_ROLE_CENTRAL config ZMK_SPLIT_ROLE_CENTRAL
default y default y
endif endif
if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT
config ZMK_SPLIT config ZMK_SPLIT
default y default y
endif endif

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