Renamed fault event to be more in line with other events and added it to
the stepper shell.
Makes the event callback trigger function of the step-dir implementation
non-static so that step-dir stepper drivers can use it to trigger events
themself.
Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
refactoring enable function into enable and disable increasing readability
and increasing coherence with other stepper apis in terms of
nomenclature
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Add stop function to stepper shell. align the function order to match
the one in __subsystem stepper_driver_api struct
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Drop few redundant device_is_ready for functions that are only used as
argument to shell_device_filter, as shell_device_filter checks for that
alrady.
Suggested-by: Yishai Jaffe <yishai1999@gmail.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change the stepper API to instead of changing the stepper speed based on
the velocity in microsteps per second to use the delay in usec between
successive steps. Also remove the velocity from the `stepper_run` function
as typical API usage is enable -> set step interval -> run.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Use the shell_device_filter utils method and leverage the new api classing
to only suggest stepper devices via tab-complete within the shell.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Use shell_device_get_binding() instead of device_get_binding() so that
we get the device based on its name and in addition by its label.
Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
This commit refactos set_actual_position to set_reference_position.
stepper_set_reference_position is more apt in regards to what this func
actually does
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit fixes incorrect c prototype and defintion of
stepper_set_callback to stepper_set_event_callback
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit does the following:
1. tests set_callback and user_data
2. fixes the api as well as the drivers by passing user_data
back to the set callback
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit deprecates passing of async signal in functions such as move
and set_target_position. As per the new API, the async signal has to be
set via set_async_signal.
If RAMPSTAT_POLL is activated then enable_constant_velocity_mode would be
able to raise signals like END_STOP_DETECTED & SENSORLESS_STALL_DETECTED.
This commit also adjusts shell script in order to test these signals.
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Fixes:
/__w/zephyr/zephyr/include/zephyr/drivers/stepper.h:429:16: error:
'direction' may be used uninitialized [-Werror=maybe-uninitialized]
found with:
west build -p -b esp32s3_touch_lcd_1_28/esp32s3/appcpu -T
tests/drivers/stepper/shell/drivers.stepper.shell
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add shell commands to enable/disable, move, set velocity, configure
micro-step resolution, and display stepper motor status. Includes an
`info` command to output all relevant data with graceful handling of
unsupported features.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>