|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
Main header file for stepper hardware driver API. 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.
Macros | |
| #define | MICRO_STEP_RES_INDEX(res) |
| Macro to calculate the index of the microstep resolution. | |
| #define | VALID_MICRO_STEP_RES(res) |
Enumerations | |
| enum | stepper_micro_step_resolution { STEPPER_MICRO_STEP_1 = 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_event { STEPPER_EVENT_STALL_DETECTED = 0 , STEPPER_EVENT_FAULT_DETECTED = 1 } |
| Stepper Hardware Driver Events. More... | |
Functions | |
| int | stepper_enable (const struct device *dev) |
| Enable stepper hardware driver. | |
| int | stepper_disable (const struct device *dev) |
| Disable stepper hardware driver. | |
| int | stepper_set_micro_step_res (const struct device *dev, enum stepper_micro_step_resolution res) |
| Set the micro-step resolution in stepper hardware driver. | |
| int | stepper_get_micro_step_res (const struct device *dev, enum stepper_micro_step_resolution *res) |
| Get the micro-step resolution in stepper hardware driver. | |
| int | stepper_set_event_cb (const struct device *dev, stepper_event_cb_t callback, void *user_data) |
| Set the callback function to be called when a stepper_event occurs. | |
Main header file for stepper hardware driver API.