-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: shields: add tester_nrf52840dk shield
Adds similar shield as seen with XIAO, ProMicro to the nRF52840-DK. Signed-off-by: Helmut Lord <[email protected]>
- Loading branch information
Showing
5 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
if SHIELD_TESTER_NRF52840DK | ||
|
||
config ZMK_KEYBOARD_NAME | ||
default "ZMK Tester" | ||
|
||
config ZMK_BLE | ||
def_bool n | ||
|
||
config SETTINGS | ||
def_bool n | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config SHIELD_TESTER_NRF52840DK | ||
def_bool $(shields_list_contains,tester_nrf52840dk) |
33 changes: 33 additions & 0 deletions
33
app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
|
||
#define PIN_MACRO(name, pin) \ | ||
/ { \ | ||
macros { \ | ||
name: name { \ | ||
compatible = "zmk,behavior-macro"; \ | ||
wait-ms = <5>; \ | ||
tap-ms = <5>; \ | ||
#binding-cells = <0>; \ | ||
bindings = <&kp P &kp I &kp N &kp SPACE>, pin, <&kp ENTER>; \ | ||
}; \ | ||
}; \ | ||
}; | ||
|
||
PIN_MACRO(pin0, <&kp N0>) | ||
PIN_MACRO(pin1, <&kp N1>) | ||
PIN_MACRO(pin2, <&kp N2>) | ||
PIN_MACRO(pin3, <&kp N3>) | ||
|
||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = <&pin0 | ||
&pin1 | ||
&pin2 | ||
&pin3>; | ||
}; | ||
}; | ||
}; |
27 changes: 27 additions & 0 deletions
27
app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <dt-bindings/zmk/matrix_transform.h> | ||
|
||
/ { | ||
chosen { | ||
zmk,kscan = &kscan0; | ||
zmk,matrix-transform = &transform0; | ||
}; | ||
|
||
kscan0: kscan { | ||
compatible = "zmk,kscan-gpio-direct"; | ||
wakeup-source; | ||
debounce-press-ms = <10>; | ||
debounce-release-ms = <10>; | ||
input-gpios | ||
= <&gpio0 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> | ||
, <&gpio0 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> | ||
, <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> | ||
, <&gpio0 25 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; | ||
}; | ||
|
||
transform0: keymap_transform { | ||
compatible = "zmk,matrix-transform"; | ||
columns = <4>; | ||
rows = <1>; | ||
map = <RC(0,0) RC(0,1) RC(0,2) RC(0,3)>; | ||
}; | ||
}; |
6 changes: 6 additions & 0 deletions
6
app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.zmk.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
file_format: "1" | ||
id: tester_nrf52840dk | ||
name: TesternRF52840DK | ||
type: shield | ||
url: https://zmk.dev/docs/troubleshooting/hardware-issues | ||
requires: [nrf52840dk_nrf52840] |