Skip to content

Commit

Permalink
keymap test gpio 48
Browse files Browse the repository at this point in the history
  • Loading branch information
willelind committed Sep 19, 2024
1 parent 7b3c8f9 commit 735c153
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 30 deletions.
20 changes: 20 additions & 0 deletions boards/shields/keyboy/keyboy.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
#include "elpekenin/behaviors.dtsi"
#include <locale/keys_sv.h>

&gpio_595 {
compatible = "zmk,gpio-595";
status = "okay";
gpio-controller;
spi-max-frequency = <5000000>;
reg = <1 0 1>; // This matches your shifter1 configuration
#gpio-cells = <2>;
ngpios = <24>;
};

#define GPIO_595_SET_LOW(name, gpio_pin) \
&gpio_595 { \
pinctrl-0 = <&pinctrl_##name>; \
pinctrl-names = "default"; \
gpio-pin = <gpio_pin>; \
gpio-value = <0>; \
}

GPIO_595_SET_LOW(shifter1, 21);

/ {
//macros {
// e_gpio: e_gpio {
Expand Down
61 changes: 31 additions & 30 deletions boards/shields/keyboy/keyboy.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,37 @@
zmk,matrix-transform = &default_transform;
};

gpios {
compatible = "gpio-leds";
green: green {
gpios
= <&shifter1 0 GPIO_ACTIVE_HIGH>
, <&shifter1 1 GPIO_ACTIVE_HIGH>
, <&shifter1 2 GPIO_ACTIVE_HIGH>
, <&shifter1 3 GPIO_ACTIVE_HIGH>
, <&shifter1 4 GPIO_ACTIVE_HIGH>
, <&shifter1 5 GPIO_ACTIVE_HIGH>
, <&shifter1 6 GPIO_ACTIVE_HIGH>
, <&shifter1 7 GPIO_ACTIVE_HIGH>
, <&shifter1 8 GPIO_ACTIVE_HIGH>
, <&shifter1 9 GPIO_ACTIVE_HIGH>
, <&shifter1 10 GPIO_ACTIVE_HIGH>
, <&shifter1 11 GPIO_ACTIVE_HIGH>
, <&shifter1 12 GPIO_ACTIVE_HIGH>
, <&shifter1 13 GPIO_ACTIVE_HIGH>
, <&shifter1 14 GPIO_ACTIVE_HIGH>
, <&shifter1 15 GPIO_ACTIVE_HIGH>
, <&shifter1 16 GPIO_ACTIVE_HIGH>
, <&shifter1 17 GPIO_ACTIVE_HIGH>
, <&shifter1 18 GPIO_ACTIVE_HIGH>
, <&shifter1 19 GPIO_ACTIVE_HIGH>
, <&shifter1 20 GPIO_ACTIVE_HIGH>
, <&shifter1 21 GPIO_ACTIVE_LOW>
, <&shifter1 22 GPIO_ACTIVE_HIGH>
;
};
};
//gpios {
// compatible = "gpio-leds";
// green: green {
// gpios
// = <&shifter1 0 GPIO_ACTIVE_HIGH>
// , <&shifter1 1 GPIO_ACTIVE_HIGH>
// , <&shifter1 2 GPIO_ACTIVE_HIGH>
// , <&shifter1 3 GPIO_ACTIVE_HIGH>
// , <&shifter1 4 GPIO_ACTIVE_HIGH>
// , <&shifter1 5 GPIO_ACTIVE_HIGH>
// , <&shifter1 6 GPIO_ACTIVE_HIGH>
// , <&shifter1 7 GPIO_ACTIVE_HIGH>
// , <&shifter1 8 GPIO_ACTIVE_HIGH>
// , <&shifter1 9 GPIO_ACTIVE_HIGH>
// , <&shifter1 10 GPIO_ACTIVE_HIGH>
// , <&shifter1 11 GPIO_ACTIVE_HIGH>
// , <&shifter1 12 GPIO_ACTIVE_HIGH>
// , <&shifter1 13 GPIO_ACTIVE_HIGH>
// , <&shifter1 14 GPIO_ACTIVE_HIGH>
// , <&shifter1 15 GPIO_ACTIVE_HIGH>
// , <&shifter1 16 GPIO_ACTIVE_HIGH>
// , <&shifter1 17 GPIO_ACTIVE_HIGH>
// , <&shifter1 18 GPIO_ACTIVE_HIGH>
// , <&shifter1 19 GPIO_ACTIVE_HIGH>
// , <&shifter1 20 GPIO_ACTIVE_HIGH>
// , <&shifter1 21 GPIO_ACTIVE_LOW>
// , <&shifter1 22 GPIO_ACTIVE_HIGH>
// ;
// };
//};

default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <12>;
Expand Down

0 comments on commit 735c153

Please sign in to comment.