zephyr/samples/sensor/qdec/boards/nrf54h20dk_nrf54h20_cpuapp....

44 lines
646 B
Plaintext

/*
* Copyright 2024 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/
/ {
aliases {
qdec0 = &qdec130;
qenca = &phase_a;
qencb = &phase_b;
};
encoder-emulate {
compatible = "gpio-leds";
phase_a: phase_a {
gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
};
phase_b: phase_b {
gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
};
};
};
&pinctrl {
qdec_pinctrl: qdec_pinctrl {
group1 {
psels = <NRF_PSEL(QDEC_A, 2, 8)>,
<NRF_PSEL(QDEC_B, 2, 10)>;
};
};
};
&gpio2 {
status = "okay";
};
&qdec130 {
status = "okay";
pinctrl-0 = <&qdec_pinctrl>;
pinctrl-names = "default";
steps = <120>;
led-pre = <500>;
};