@@ -150,7 +150,8 @@ static int z_stepper_motion_control_move_to(const struct device *dev, int32_t mi
150150 return z_stepper_motion_control_move_by (dev , steps_to_move );
151151}
152152
153- static int z_stepper_motion_control_run (const struct device * dev , const enum stepper_direction direction )
153+ static int z_stepper_motion_control_run (const struct device * dev ,
154+ const enum stepper_direction direction )
154155{
155156 const struct stepper_motion_control_config * config = dev -> config ;
156157 struct stepper_motion_control_data * data = dev -> data ;
@@ -186,7 +187,8 @@ static int z_stepper_motion_control_stop(const struct device *dev)
186187 return 0 ;
187188}
188189
189- static int z_stepper_motion_control_set_reference_position (const struct device * dev , int32_t position )
190+ static int z_stepper_motion_control_set_reference_position (const struct device * dev ,
191+ int32_t position )
190192{
191193 struct stepper_motion_control_data * data = dev -> data ;
192194
@@ -207,7 +209,7 @@ static int z_stepper_motion_control_get_actual_position(const struct device *dev
207209}
208210
209211static int z_stepper_motion_control_set_step_interval (const struct device * dev ,
210- uint64_t microstep_interval_ns )
212+ uint64_t microstep_interval_ns )
211213{
212214 const struct stepper_motion_control_config * config = dev -> config ;
213215 struct stepper_motion_control_data * data = dev -> data ;
@@ -289,7 +291,8 @@ static void velocity_mode_task(const struct device *dev)
289291 }
290292}
291293
292- static int z_stepper_motion_control_set_mode (const struct device * dev , enum stepper_motion_control_mode mode )
294+ static int z_stepper_motion_control_set_mode (const struct device * dev ,
295+ enum stepper_motion_control_mode mode )
293296{
294297 if (mode == STEPPER_MOTION_CONTROL_MODE_RAMP ) {
295298 return - ENOTSUP ;
@@ -298,8 +301,8 @@ static int z_stepper_motion_control_set_mode(const struct device *dev, enum step
298301}
299302
300303static int z_stepper_motion_control_set_event_callback (const struct device * dev ,
301- stepper_motion_control_event_callback_t cb ,
302- void * user_data )
304+ stepper_motion_control_event_callback_t cb ,
305+ void * user_data )
303306{
304307 struct stepper_motion_control_data * data = dev -> data ;
305308
@@ -346,7 +349,8 @@ static int stepper_motion_control_init(const struct device *dev)
346349 }
347350#ifdef CONFIG_ZEPHYR_STEPPER_MOTION_CONTROL_GENERATE_ISR_SAFE_EVENTS
348351
349- k_msgq_init (& data -> event_msgq , data -> event_msgq_buffer , sizeof (enum stepper_motion_control_event ),
352+ k_msgq_init (& data -> event_msgq , data -> event_msgq_buffer ,
353+ sizeof (enum stepper_motion_control_event ),
350354 CONFIG_ZEPHYR_STEPPER_MOTION_CONTROL_EVENT_QUEUE_LEN );
351355 k_work_init (& data -> event_callback_work , stepper_work_event_handler );
352356#endif /* CONFIG_ZEPHYR_STEPPER_MOTION_CONTROL_GENERATE_ISR_SAFE_EVENTS */
@@ -368,21 +372,22 @@ static DEVICE_API(stepper_motion_control, stepper_motion_control_api) = {
368372 .set_event_callback = z_stepper_motion_control_set_event_callback ,
369373};
370374
371- #define STEPPER_MOTION_CONTROL_DEFINE (inst ) \
372- static const struct stepper_motion_control_config stepper_motion_control_config_##inst = { \
375+ #define STEPPER_MOTION_CONTROL_DEFINE (inst ) \
376+ static const struct stepper_motion_control_config stepper_motion_control_config_##inst = { \
373377 .stepper = DEVICE_DT_GET(DT_INST_CHILD(inst, stepper)), \
374378 .timing_config.counter = \
375379 DEVICE_DT_GET_OR_NULL(DT_PHANDLE(DT_DRV_INST(inst), counter)), \
376380 .timing_source = COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, counter), \
377381 (&step_counter_timing_source_api), (&step_work_timing_source_api)), \
378382 }; \
379- struct stepper_motion_control_data stepper_motion_control_data_##inst = { \
383+ struct stepper_motion_control_data stepper_motion_control_data_##inst = { \
380384 .timing_data.microstep_interval_ns = DT_INST_PROP(inst, step_tick_ns), \
381385 .timing_data.motion_control_dev = DEVICE_DT_GET(DT_DRV_INST(inst)), \
382386 .timing_data.stepper_handle_timing_signal_cb = stepper_handle_timing_signal, \
383387 }; \
384- DEVICE_DT_INST_DEFINE(inst, stepper_motion_control_init, NULL, &stepper_motion_control_data_##inst, \
385- &stepper_motion_control_config_##inst, POST_KERNEL, \
388+ DEVICE_DT_INST_DEFINE(inst, stepper_motion_control_init, NULL, \
389+ &stepper_motion_control_data_##inst, \
390+ &stepper_motion_control_config_##inst, POST_KERNEL, \
386391 CONFIG_STEPPER_CONTROL_INIT_PRIORITY, &stepper_motion_control_api);
387392
388393DT_INST_FOREACH_STATUS_OKAY (STEPPER_MOTION_CONTROL_DEFINE )
0 commit comments