Setti inn allar skrár frá Project 3 og bætti við overlay í samræmi við controlloerinn og pin out.

This commit is contained in:
2026-10-08 13:11:39 +00:00
parent 9194d71f10
commit 53091f68df
29 changed files with 1645 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/pwm/pwm.h>
/ {
aliases {
encoder-c1 = &encoder_c1;
encoder-c2 = &encoder_c2;
motor-bin1-pwm = &motor_bin1_pwm;
motor-bin2 = &motor_bin2;
motor-flt = &motor_flt;
motor-slp = &motor_slp;
};
encoder_c1: encoder_c1 {
gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; /* D4, PB7 */
};
encoder_c2: encoder_c2 {
gpios = <&gpiob 6 GPIO_ACTIVE_HIGH>; /* D5, PB6 */
};
motor_bin1_pwm: motor_bin1_pwm {
pwms = <&pwm1 1 PWM_USEC(50) 0>; /* D9, PA8; 20 kHz */
};
motor_bin2: motor_bin2 {
gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>; /* D6, PB1 */
};
motor_flt: motor_flt {
gpios = <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* A0, PA0 */
};
motor_slp: motor_slp {
gpios = <&gpioa 1 GPIO_ACTIVE_HIGH>; /* A1, PA1 */
};
};
&timers1 {
status = "okay";
st,prescaler = <79>;
pwm1: pwm {
status = "okay";
pinctrl-0 = <&tim1_ch1_pa8>;
pinctrl-names = "default";
};
};