wip: stepper

This commit is contained in:
2025-11-26 15:12:10 +01:00
parent e364ae83ec
commit 0ff1ab4b88
5 changed files with 83 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
#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>
@@ -17,6 +18,8 @@ static const struct gpio_dt_spec led0 = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
static const struct gpio_dt_spec led1 = GPIO_DT_SPEC_GET(DT_ALIAS(led1), gpios);
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));