-
-
Save YCF/a1d5bf971c1a39b839d34e2dc49b2fda to your computer and use it in GitHub Desktop.
Zephyr level shifter GPIO abstraction
This file contains hidden or 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
/dts-v1/ | |
/ { | |
shifter: 74hc595a@0 { | |
compatible = "ti,xx74hc595a"; | |
a-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; | |
b-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; | |
c-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; | |
} | |
kscan: kscan0 { | |
compatible = "zmk,kscan-gpio-matrix"; | |
diode-direction = "col2row"; | |
col-gpios = | |
<&shifter 0 GPIO_ACTIVE_HIGH>, | |
<&shifter 1 GPIO_ACTIVE_HIGH>, | |
<&shifter 2 GPIO_ACTIVE_HIGH>, | |
<&shifter 3 GPIO_ACTIVE_HIGH>, | |
<&shifter 4 GPIO_ACTIVE_HIGH> | |
; | |
row-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH GPIO_PULL_DOWN>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment