Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Stepper Motion Controller Driver Backend API

Data Structures

struct  stepper_ctrl_driver_api
  Driver Operations Stepper Motion Controller driver operations More...

Typedefs

typedef int(* stepper_ctrl_set_reference_position_t) (const struct device *dev, const int32_t value)
 Set the reference position of the stepper motion controller.
typedef int(* stepper_ctrl_get_actual_position_t) (const struct device *dev, int32_t *value)
 Get the actual a.k.a reference position of the stepper motion controller.
typedef int(* stepper_ctrl_set_event_cb_t) (const struct device *dev, stepper_ctrl_event_callback_t callback, void *user_data)
 Set the callback function to be called when a stepper motion controller event occurs.
typedef int(* stepper_ctrl_set_microstep_interval_t) (const struct device *dev, const uint64_t microstep_interval_ns)
 Set the time interval between steps in nanoseconds.
typedef int(* stepper_ctrl_configure_ramp_t) (const struct device *dev, const struct stepper_ctrl_ramp *ramp)
 Configure the ramp parameters for the stepper motion controller.
typedef int(* stepper_ctrl_move_by_t) (const struct device *dev, const int32_t micro_steps)
 Move the stepper relatively by a given number of micro-steps.
typedef int(* stepper_ctrl_move_to_t) (const struct device *dev, const int32_t micro_steps)
 Move the stepper to an absolute position in micro-steps.
typedef int(* stepper_ctrl_run_t) (const struct device *dev, const enum stepper_ctrl_direction direction)
 Run the stepper with a given step interval in a given direction.
typedef int(* stepper_ctrl_stop_t) (const struct device *dev)
 Stop the stepper.
typedef int(* stepper_ctrl_is_moving_t) (const struct device *dev, bool *is_moving)
 Is the target position fo the stepper reached.

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a Stepper Motion Controller driver.

Typedef Documentation

◆ stepper_ctrl_configure_ramp_t

typedef int(* stepper_ctrl_configure_ramp_t) (const struct device *dev, const struct stepper_ctrl_ramp *ramp)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Configure the ramp parameters for the stepper motion controller.

See also
stepper_ctrl_configure_ramp() for details.

◆ stepper_ctrl_get_actual_position_t

typedef int(* stepper_ctrl_get_actual_position_t) (const struct device *dev, int32_t *value)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Get the actual a.k.a reference position of the stepper motion controller.

See also
stepper_ctrl_get_actual_position() for details.

◆ stepper_ctrl_is_moving_t

typedef int(* stepper_ctrl_is_moving_t) (const struct device *dev, bool *is_moving)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Is the target position fo the stepper reached.

See also
stepper_ctrl_is_moving() for details.

◆ stepper_ctrl_move_by_t

typedef int(* stepper_ctrl_move_by_t) (const struct device *dev, const int32_t micro_steps)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Move the stepper relatively by a given number of micro-steps.

See also
stepper_ctrl_move_by() for details.

◆ stepper_ctrl_move_to_t

typedef int(* stepper_ctrl_move_to_t) (const struct device *dev, const int32_t micro_steps)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Move the stepper to an absolute position in micro-steps.

See also
stepper_ctrl_move_to() for details.

◆ stepper_ctrl_run_t

typedef int(* stepper_ctrl_run_t) (const struct device *dev, const enum stepper_ctrl_direction direction)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Run the stepper with a given step interval in a given direction.

See also
stepper_ctrl_run() for details.

◆ stepper_ctrl_set_event_cb_t

typedef int(* stepper_ctrl_set_event_cb_t) (const struct device *dev, stepper_ctrl_event_callback_t callback, void *user_data)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Set the callback function to be called when a stepper motion controller event occurs.

See also
stepper_ctrl_set_event_cb() for details.

◆ stepper_ctrl_set_microstep_interval_t

typedef int(* stepper_ctrl_set_microstep_interval_t) (const struct device *dev, const uint64_t microstep_interval_ns)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Set the time interval between steps in nanoseconds.

See also
stepper_ctrl_set_microstep_interval() for details.

◆ stepper_ctrl_set_reference_position_t

typedef int(* stepper_ctrl_set_reference_position_t) (const struct device *dev, const int32_t value)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Set the reference position of the stepper motion controller.

See also
stepper_ctrl_set_reference_position() for details.

◆ stepper_ctrl_stop_t

typedef int(* stepper_ctrl_stop_t) (const struct device *dev)

#include <zephyr/drivers/stepper/stepper_ctrl.h>

Stop the stepper.

See also
stepper_ctrl_stop() for details.