drivers: stepper: Fix stepper callbacks when using work_q
Fix issue where stepper callbacks were not being called when using work_q. This was due to the steps being counted down before the work_q was rescheduled. Signed-off-by: Josselin Bunt <josselin@sensible.health>
This commit is contained in:
parent
96325ad3e1
commit
902824db1f
@ -145,11 +145,11 @@ static void position_mode_task(const struct device *dev)
|
||||
(void)step_dir_stepper_perform_step(dev);
|
||||
}
|
||||
|
||||
update_remaining_steps(dev->data);
|
||||
|
||||
if (config->timing_source->needs_reschedule(dev) && data->step_count != 0) {
|
||||
(void)config->timing_source->start(dev);
|
||||
}
|
||||
|
||||
update_remaining_steps(dev->data);
|
||||
}
|
||||
|
||||
static void velocity_mode_task(const struct device *dev)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user