From 9633ff1d7a6a30b3d446a3dc8f20c676c7fec119 Mon Sep 17 00:00:00 2001 From: nokkvinetti <82093782+nokkvinetti@users.noreply.github.com> Date: Thu, 8 Oct 2026 13:11:56 +0000 Subject: [PATCH] =?UTF-8?q?ger=C3=B0i=20overlay=20vantar=20bara=20a=C3=B0?= =?UTF-8?q?=20breyta=20x=20=C3=AD=20pinnana=20sem=20vi=C3=B0=20veljum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zephyr/boards/nucleo_l432kc.overlay | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/Project_4_Distributed_Control/Part_1_Porting_controller_to_Zephyr/zephyr/boards/nucleo_l432kc.overlay b/Project_4_Distributed_Control/Part_1_Porting_controller_to_Zephyr/zephyr/boards/nucleo_l432kc.overlay index 54d75d8..3c85ab2 100644 --- a/Project_4_Distributed_Control/Part_1_Porting_controller_to_Zephyr/zephyr/boards/nucleo_l432kc.overlay +++ b/Project_4_Distributed_Control/Part_1_Porting_controller_to_Zephyr/zephyr/boards/nucleo_l432kc.overlay @@ -4,7 +4,16 @@ / { aliases { sw1 = &user_button; - pwm-led0 = &pwm_led_0; + + encoder-c1 = &encoder_c1; + encoder-c2 = &encoder_c2; + + motor-ain1 = &motor_ain1; + motor-ain2 = &motor_ain2; + + motor-flt = &motor_flt; + + status-led = &led0; }; buttons { @@ -16,11 +25,32 @@ }; }; - pwmleds { - compatible = "pwm-leds"; + encoders { + encoder_c1: c1 { + gpios = <&gpioX X GPIO_ACTIVE_HIGH>; + label = "Encoder C1"; + }; - pwm_led_0: pwm_led_0 { + encoder_c2: c2 { + gpios = <&gpioX X GPIO_ACTIVE_HIGH>; + label = "Encoder C2"; + }; + }; + + motor { + motor_ain1: ain1 { pwms = <&pwm1 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "Motor AIN1"; + }; + + motor_ain2: ain2 { + pwms = <&pwm2 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "Motor AIN2"; + }; + + motor_flt: flt { + gpios = <&gpioX X GPIO_ACTIVE_LOW>; + label = "Motor FLT"; }; }; };