drivers: stepper: adi: tmc2209 allow instantiation of tmc2209 without msx
The current implementation of tmc2209 driver does not allow instantiation of the driver without configuring msx pins. Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit is contained in:
parent
a1ad0ad6c6
commit
5a2c6bf66c
1 changed files with 2 additions and 3 deletions
|
|
@ -172,10 +172,9 @@ static DEVICE_API(stepper, tmc22xx_stepper_api) = {
|
|||
static const struct tmc22xx_config tmc22xx_config_##inst = { \
|
||||
.common = STEP_DIR_STEPPER_DT_INST_COMMON_CONFIG_INIT(inst), \
|
||||
.enable_pin = GPIO_DT_SPEC_INST_GET(inst, enable_gpios), \
|
||||
.msx_pins = DT_INST_NODE_HAS_PROP(inst, msx_gpios) \
|
||||
? tmc22xx_stepper_msx_pins_##inst \
|
||||
: NULL, \
|
||||
.msx_resolutions = msx_table, \
|
||||
IF_ENABLED(DT_INST_NODE_HAS_PROP(inst, msx_gpios), \
|
||||
(.msx_pins = tmc22xx_stepper_msx_pins_##inst)) \
|
||||
}; \
|
||||
static struct tmc22xx_data tmc22xx_data_##inst = { \
|
||||
.common = STEP_DIR_STEPPER_DT_INST_COMMON_DATA_INIT(inst), \
|
||||
|
|
|
|||
Loading…
Reference in a new issue