Bætti við interrupt (pin D2) til að skoða encoder lestur, umb fyrir Part 1 í verkefni

This commit is contained in:
2026-10-14 16:02:44 +00:00
parent 1250860efe
commit b90b84d94c
4 changed files with 31 additions and 8 deletions
+10 -1
View File
@@ -11,6 +11,7 @@
motor-flt = &motor_flt;
motor-slp = &motor_slp;
fault-test-button = &fault_test_button;
encoder-isr-probe = &encoder_isr_probe;
};
buttons {
@@ -36,7 +37,7 @@
label = "Fault test button";
};
};
motor_gpio_outputs {
compatible = "gpio-leds";
@@ -49,6 +50,11 @@
gpios = <&gpioa 1 GPIO_ACTIVE_HIGH>; /* A1, PA1 */
label = "Motor sleep";
};
encoder_isr_probe: encoder_isr_probe {
gpios = <&gpioa 12 GPIO_ACTIVE_HIGH>; /* D2, PA12 */
label = "Encoder ISR probe";
};
};
motor_pwm_outputs {
@@ -59,6 +65,9 @@
label = "Motor BIN1 PWM";
};
};
zephyr,user {
encoder-isr-probe-gpios = <&gpioa 12 GPIO_ACTIVE_HIGH>; /* D2, PA12 */
};
};
&timers1 {