Skip to content

Commit 9e6366a

Browse files
faxe1008kartben
authored andcommitted
drivers: stepper: step_dir: Add fallback for dual-edge-step
Adds a fallback for the dual-edge-step property in the step dir common code. Without this drivers using the common code would have to declare the dual-edge-step property so it can default to false when not set, even if the IC does not support adjusting it. Signed-off-by: Fabian Blatz <[email protected]>
1 parent 3a8db27 commit 9e6366a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/stepper/step_dir/step_dir_stepper_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct step_dir_stepper_common_config {
4545
{ \
4646
.step_pin = GPIO_DT_SPEC_GET(node_id, step_gpios), \
4747
.dir_pin = GPIO_DT_SPEC_GET(node_id, dir_gpios), \
48-
.dual_edge = DT_PROP(node_id, dual_edge_step), \
48+
.dual_edge = DT_PROP_OR(node_id, dual_edge_step, false), \
4949
.counter = DEVICE_DT_GET_OR_NULL(DT_PHANDLE(node_id, counter)), \
5050
.timing_source = COND_CODE_1(DT_NODE_HAS_PROP(node_id, counter), \
5151
(&step_counter_timing_source_api), \

0 commit comments

Comments
 (0)