Created
September 1, 2021 14:06
-
-
Save petejohanson/fb01112d09cdd05776f9b9838859b6ea 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