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"; }; }; };