Lines Matching full:stepper
11 #include <zephyr/drivers/stepper.h>
12 #include <zephyr/drivers/stepper/stepper_trinamic.h>
38 const struct device *stepper; member
155 const struct tmc5041_stepper_config *stepper_config = stepper_data->stepper->config; in stallguard_work_handler()
157 err = stallguard_enable(stepper_data->stepper, true); in stallguard_work_handler()
187 const struct tmc5041_stepper_config *stepper_config = stepper_data->stepper->config; in rampstat_work_handler()
197 LOG_ERR("%s: Failed to read DRVSTATUS register", stepper_data->stepper->name); in rampstat_work_handler()
202 LOG_INF("%s: Stall detected", stepper_data->stepper->name); in rampstat_work_handler()
207 LOG_ERR("%s: Failed to stop motor", stepper_data->stepper->name); in rampstat_work_handler()
217 LOG_ERR("%s: Failed to read RAMPSTAT register", stepper_data->stepper->name); in rampstat_work_handler()
227 LOG_DBG("RAMPSTAT %s:Left end-stop detected", stepper_data->stepper->name); in rampstat_work_handler()
228 execute_callback(stepper_data->stepper, in rampstat_work_handler()
233 LOG_DBG("RAMPSTAT %s:Right end-stop detected", stepper_data->stepper->name); in rampstat_work_handler()
234 execute_callback(stepper_data->stepper, in rampstat_work_handler()
239 LOG_DBG("RAMPSTAT %s:Position reached", stepper_data->stepper->name); in rampstat_work_handler()
240 execute_callback(stepper_data->stepper, STEPPER_EVENT_STEPS_COMPLETED); in rampstat_work_handler()
244 LOG_DBG("RAMPSTAT %s:Stall detected", stepper_data->stepper->name); in rampstat_work_handler()
245 stallguard_enable(stepper_data->stepper, false); in rampstat_work_handler()
246 execute_callback(stepper_data->stepper, STEPPER_EVENT_STALL_DETECTED); in rampstat_work_handler()
263 LOG_DBG("Stepper motor controller %s %s", dev->name, enable ? "enabled" : "disabled"); in tmc5041_stepper_enable()
300 LOG_DBG("Stepper motor controller %s is moving: %d", dev->name, *is_moving); in tmc5041_stepper_is_moving()
330 LOG_DBG("Stepper motor controller %s moved to %d by steps: %d", dev->name, target_position, in tmc5041_stepper_move_by()
390 LOG_DBG("Stepper motor controller %s set micro step resolution to 0x%x", dev->name, in tmc5041_stepper_set_micro_step_res()
409 LOG_DBG("Stepper motor controller %s get micro step resolution: %d", dev->name, *res); in tmc5041_stepper_get_micro_step_res()
428 LOG_DBG("Stepper motor controller %s set actual position to %d", dev->name, position); in tmc5041_stepper_set_reference_position()
447 LOG_DBG("Stepper motor controller %s set target position to %d", dev->name, micro_steps); in tmc5041_stepper_move_to()
483 LOG_DBG("Stepper motor controller %s run with velocity %d", dev->name, velocity); in tmc5041_stepper_run()
545 LOG_DBG("Stepper motor controller %s set ramp", dev->name); in tmc5041_stepper_set_ramp()
607 LOG_DBG("TMC5041 stepper motor controller %s initialized", dev->name); in tmc5041_init()
644 LOG_DBG("Controller: %s, Stepper: %s", stepper_config->controller->name, dev->name); in tmc5041_stepper_init()
720 .stepper = DEVICE_DT_GET(child),};
723 static DEVICE_API(stepper, tmc5041_stepper_api_##child) = { \