removed old stepper code leftovers
This commit is contained in:
@@ -6,17 +6,6 @@
|
||||
|
||||
rotenc0 = &as5600;
|
||||
stepper0 = &stepper0;
|
||||
servo0 = &pwm_servo0;
|
||||
};
|
||||
|
||||
pwmleds: pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
status = "okay";
|
||||
|
||||
pwm_servo0: pwm_servo0 {
|
||||
pwms = <&pwm4 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
||||
label = "servo 0";
|
||||
};
|
||||
};
|
||||
|
||||
stepper0: tmc2209_motor {
|
||||
@@ -34,13 +23,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
status = "okay";
|
||||
current-speed = <460800>;
|
||||
pinctrl-0 = <&uart4_tx_pa0 &uart4_rx_pd0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
cdc_acm_uart0: cdc_acm_uart0 {
|
||||
@@ -71,17 +53,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&timers4 {
|
||||
status = "okay";
|
||||
st,prescaler = <119>;
|
||||
|
||||
pwm4: pwm {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&tim4_ch3_pb8>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c2_scl_pf1 &i2c2_sda_pf0>;
|
||||
|
||||
@@ -19,18 +19,16 @@ bool verify_are_devices_available(void) {
|
||||
devices_ready = false;
|
||||
}
|
||||
|
||||
if (!pwm_is_ready_dt(&servo0)) {
|
||||
printk("Servo0 not ready\n");
|
||||
devices_ready = false;
|
||||
}
|
||||
if (!device_is_ready(counter5)) {
|
||||
printk("Counter 5 not ready\n");
|
||||
devices_ready = false;
|
||||
}
|
||||
|
||||
if (!device_is_ready(rotenc0)) {
|
||||
printk("Rotory encoder 0 not ready\n");
|
||||
devices_ready = false;
|
||||
}
|
||||
|
||||
if (!device_is_ready(stepper0)) {
|
||||
printk("Stepper 0 not ready\n");
|
||||
devices_ready = false;
|
||||
|
||||
@@ -6,12 +6,10 @@
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#include <zephyr/drivers/pwm.h>
|
||||
#include <zephyr/drivers/stepper.h>
|
||||
#else
|
||||
#include <device.h>
|
||||
#include <devicetree.h>
|
||||
#include <drivers/pwm.h>
|
||||
#endif
|
||||
|
||||
static const struct gpio_dt_spec led0 = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
|
||||
@@ -20,7 +18,6 @@ static const struct gpio_dt_spec led2 = GPIO_DT_SPEC_GET(DT_ALIAS(led2), gpios);
|
||||
|
||||
static const struct device *rotenc0 = DEVICE_DT_GET(DT_ALIAS(rotenc0));
|
||||
static const struct device *stepper0 = DEVICE_DT_GET(DT_ALIAS(stepper0));
|
||||
static const struct pwm_dt_spec servo0 = PWM_DT_SPEC_GET(DT_ALIAS(servo0));
|
||||
static const struct device *counter5 = DEVICE_DT_GET(DT_NODELABEL(counter5));
|
||||
|
||||
bool verify_are_devices_available(void);
|
||||
Reference in New Issue
Block a user