|
Zephyr API Documentation 4.4.0-rc1
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.
Data Structures | |
| struct | stepper_driver_api |
| Driver Operations Stepper Hardware Driver driver operations More... | |
Macros | |
| #define | MICRO_STEP_RES_INDEX(res) |
| Macro to calculate the index of the microstep resolution. | |
| #define | VALID_MICRO_STEP_RES(res) |
Typedefs | |
| typedef void(* | stepper_event_cb_t) (const struct device *dev, const enum stepper_event event, void *user_data) |
| Callback function for stepper driver events. | |
| typedef int(* | stepper_enable_t) (const struct device *dev) |
| Callback API to enable the stepper hardware driver. | |
| typedef int(* | stepper_disable_t) (const struct device *dev) |
| Callback API to disable the stepper hardware driver. | |
| typedef int(* | stepper_set_micro_step_res_t) (const struct device *dev, const enum stepper_micro_step_resolution resolution) |
| Callback API to set the stepper micro-step resolution. | |
| typedef int(* | stepper_get_micro_step_res_t) (const struct device *dev, enum stepper_micro_step_resolution *resolution) |
| Callback API to get the stepper micro-step resolution. | |
| typedef int(* | stepper_set_event_cb_t) (const struct device *dev, stepper_event_cb_t callback, void *user_data) |
| Callback API to set the event callback function. | |
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.