Zephyr API 3.6.99
|
Public API for Stepper Driver. More...
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <errno.h>
#include <zephyr/syscalls/stepper.h>
Go to the source code of this file.
Enumerations | |
enum | micro_step_resolution { STEPPER_FULL_STEP = 1 , STEPPER_MICRO_STEP_2 = 2 , STEPPER_MICRO_STEP_4 = 4 , STEPPER_MICRO_STEP_8 = 8 , STEPPER_MICRO_STEP_16 = 16 , STEPPER_MICRO_STEP_32 = 32 , STEPPER_MICRO_STEP_64 = 64 , STEPPER_MICRO_STEP_128 = 128 , STEPPER_MICRO_STEP_256 = 256 } |
Stepper Motor micro step resolution options. More... | |
enum | stepper_direction { STEPPER_DIRECTION_POSITIVE = 0 , STEPPER_DIRECTION_NEGATIVE } |
Stepper Motor direction options. More... | |
enum | stepper_run_mode { STEPPER_HOLD_MODE = 0 , STEPPER_POSITION_MODE , STEPPER_VELOCITY_MODE } |
Stepper Motor run mode options. More... | |
enum | stepper_signal_result { STEPPER_SIGNAL_STEPS_COMPLETED = 0 } |
Stepper Motor signal results. More... | |
Functions | |
int | stepper_enable (const struct device *dev, const bool enable) |
Enable or Disable Motor Controller. | |
int | stepper_move (const struct device *dev, int32_t micro_steps, struct k_poll_signal *async) |
Set the micro_steps to be moved from the current position i.e. | |
int | stepper_set_max_velocity (const struct device *dev, uint32_t micro_steps_per_second) |
Set the target velocity to be reached by the motor. | |
int | stepper_set_micro_step_res (const struct device *dev, enum micro_step_resolution resolution) |
Set the microstep resolution in stepper motor controller. | |
int | stepper_get_micro_step_res (const struct device *dev, enum micro_step_resolution *resolution) |
Get the microstep resolution in stepper motor controller. | |
int | stepper_set_actual_position (const struct device *dev, int32_t value) |
Set the actual a.k.a reference position of the stepper. | |
int | stepper_get_actual_position (const struct device *dev, int32_t *value) |
Get the actual a.k.a reference position of the stepper. | |
int | stepper_set_target_position (const struct device *dev, int32_t value, struct k_poll_signal *async) |
Set the absolute target position of the stepper. | |
int | stepper_is_moving (const struct device *dev, bool *is_moving) |
Check if the stepper motor is currently moving. | |
int | stepper_enable_constant_velocity_mode (const struct device *dev, enum stepper_direction direction, uint32_t value) |
Enable constant velocity mode for the stepper with a given velocity. | |
Public API for Stepper Driver.