42 lines
691 B
Plaintext
42 lines
691 B
Plaintext
/*
|
|
* Copyright 2023 Nordic Semiconductor ASA
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/ {
|
|
aliases {
|
|
qdec0 = &qdec1;
|
|
qenca = &phase_a;
|
|
qencb = &phase_b;
|
|
};
|
|
|
|
encoder-emulate {
|
|
compatible = "gpio-leds";
|
|
phase_a: phase_a {
|
|
/* Arduino A1 */
|
|
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
phase_b: phase_b {
|
|
/* Arduino A3 */
|
|
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&pinctrl {
|
|
qdec_pinctrl: qdec_pinctrl {
|
|
group1 {
|
|
psels = <NRF_PSEL(QDEC_A, 0, 4)>, /* Ardiuno A0 */
|
|
<NRF_PSEL(QDEC_B, 0, 6)>; /* Arduino A2 */
|
|
};
|
|
};
|
|
};
|
|
|
|
&qdec1 {
|
|
status = "okay";
|
|
pinctrl-0 = <&qdec_pinctrl>;
|
|
pinctrl-names = "default";
|
|
steps = < 120 >;
|
|
led-pre = < 500 >;
|
|
};
|