Skip to content

Commit 5918ddc

Browse files
jilaypandyakartben
authored andcommitted
drivers: stepper: update documentation about enable/disable
Disabling the stepper shall not cancel any active movements. stepper_stop() shall be used after disabling the stepper in order to explicitly cancel stepper movements. Signed-off-by: Jilay Pandya <[email protected]>
1 parent 6244e93 commit 5918ddc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/zephyr/drivers/stepper.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ __subsystem struct stepper_driver_api {
237237
/**
238238
* @brief Enable stepper driver
239239
*
240-
* @details Enabling the driver will energize the coils, however not set the stepper in motion.
240+
* @details Enabling the driver shall switch on the power stage and energize the coils.
241241
*
242242
* @param dev pointer to the stepper driver instance
243243
*
@@ -256,7 +256,9 @@ static inline int z_impl_stepper_enable(const struct device *dev)
256256
/**
257257
* @brief Disable stepper driver
258258
*
259-
* @details Disabling the driver shall cancel all active movements and de-energize the coils.
259+
* @details Disabling the driver shall switch off the power stage and de-energize the coils.
260+
* Disabling the stepper does not implicitly stop the stepper. If the motor shall not move after
261+
* re-enabling the stepper than consider calling stepper_stop() before.
260262
*
261263
* @param dev pointer to the stepper driver instance
262264
*
@@ -477,7 +479,7 @@ static inline int z_impl_stepper_move_to(const struct device *dev, const int32_t
477479
* @brief Run the stepper with a given step interval in a given direction
478480
*
479481
* @details The stepper shall be set into motion and run continuously until
480-
* stalled or stopped using some other command, for instance, stepper_enable(false). This
482+
* stalled or stopped using some other command, for instance, stepper_stop(). This
481483
* function is non-blocking.
482484
*
483485
* @param dev pointer to the stepper driver instance

0 commit comments

Comments
 (0)