forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slicemk: serial split: setup Raytac MDBT50-DB-33 for development
- Loading branch information
1 parent
cd9c580
commit 1fe242a
Showing
6 changed files
with
112 additions
and
8 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
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
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
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
80 changes: 80 additions & 0 deletions
80
app/boards/shields/slicemk_ergodox/slicemk_ergodox_uart.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,80 @@ | ||
#include <dt-bindings/led/led.h> | ||
|
||
#include <dt-bindings/zmk/matrix_transform.h> | ||
|
||
/ { | ||
chosen { | ||
zmk,kscan = &kscan0; | ||
zmk,matrix_transform = &default_transform; | ||
|
||
zmk,split-serial = &uart0; | ||
zmk,underglow = &led_strip; | ||
}; | ||
|
||
// TODO TODO TODO placeholder button, currently just an unused pin. probably | ||
// abstract to &button or something as the actual pin would differ from | ||
// board to board. maybe p0.15 since that's used on raytac dongle | ||
kscan0: kscan { | ||
compatible = "zmk,kscan-gpio-direct"; | ||
label = "KSCAN"; | ||
input-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; | ||
}; | ||
|
||
default_transform: keymap_transform_0 { | ||
compatible = "zmk,matrix-transform"; | ||
columns = <15>; | ||
rows = <7>; | ||
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(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,14) | ||
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,14) | ||
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,13) RC(3,14) | ||
RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) | ||
RC(5,7) RC(5,6) RC(5,9) RC(5,8) | ||
RC(5,5) RC(5,4) RC(5,3) RC(5,12) RC(5,11) RC(5,10) | ||
RC(5,2) RC(5,13) | ||
>; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
psels = <NRF_PSEL(UART_TX, 1, 9)>; | ||
}; | ||
group2 { | ||
psels = <NRF_PSEL(UART_RX, 0, 11)>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
|
||
spi3_default: spi3_default { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_MOSI, 0, 5)>; | ||
}; | ||
}; | ||
}; | ||
|
||
&uart0 { | ||
status = "okay"; | ||
current-speed = <115200>; | ||
pinctrl-0 = <&uart0_default>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
// Define LED strip. | ||
&spi3 { | ||
status = "okay"; | ||
pinctrl-0 = <&spi3_default>; | ||
pinctrl-names = "default"; | ||
led_strip: ws2812@0 { | ||
compatible = "worldsemi,ws2812-spi"; | ||
reg = <0>; | ||
spi-max-frequency = <4000000>; | ||
chain-length = <256>; | ||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>; | ||
spi-one-frame = <0x70>; | ||
spi-zero-frame = <0x40>; | ||
}; | ||
}; |
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