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 <fabianblatz@gmail.com>
This commit is contained in:
parent
3a8db2715f
commit
9e6366a01e
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ struct step_dir_stepper_common_config {
|
|||
{ \
|
||||
.step_pin = GPIO_DT_SPEC_GET(node_id, step_gpios), \
|
||||
.dir_pin = GPIO_DT_SPEC_GET(node_id, dir_gpios), \
|
||||
.dual_edge = DT_PROP(node_id, dual_edge_step), \
|
||||
.dual_edge = DT_PROP_OR(node_id, dual_edge_step, false), \
|
||||
.counter = DEVICE_DT_GET_OR_NULL(DT_PHANDLE(node_id, counter)), \
|
||||
.timing_source = COND_CODE_1(DT_NODE_HAS_PROP(node_id, counter), \
|
||||
(&step_counter_timing_source_api), \
|
||||
|
|
|
|||
Loading…
Reference in a new issue