-
Notifications
You must be signed in to change notification settings - Fork 7.3k
drivers: stepper: unify msx-gpios #88798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b3d88eb
to
177de4d
Compare
177de4d
to
26b2f12
Compare
currently there are two different ways how microstepping gpios are handled in step/dir drivers. This PR aims to unify the two different approaches. Signed-off-by: Jilay Pandya <[email protected]>
26b2f12
to
a056bb4
Compare
#define STEP_DIR_STEPPER_DT_INST_COMMON_CONFIG_INIT(inst) \ | ||
STEP_DIR_STEPPER_DT_COMMON_CONFIG_INIT(DT_DRV_INST(inst)) | ||
#define STEP_DIR_STEPPER_DT_INST_COMMON_CONFIG_INIT(inst, msx_gpio_array) \ | ||
STEP_DIR_STEPPER_DT_COMMON_CONFIG_INIT(DT_DRV_INST(inst), msx_gpio_array) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not read the property in here? Currently there is again potential for giving the property different names since the driver does the property checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the *msx-pins cannot be scalar initialized here, or? The pointer has to be initialized to an already existing array.
@@ -150,7 +152,7 @@ int step_dir_stepper_common_move_by(const struct device *dev, const int32_t micr | |||
* @return 0 on success, or a negative error code on failure. | |||
*/ | |||
int step_dir_stepper_common_set_microstep_interval(const struct device *dev, | |||
const uint64_t microstep_interval_ns); | |||
const uint64_t microstep_interval_ns); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated formatting :^)
currently there are two different ways how microstepping gpios are handled in step/dir drivers. This PR aims to unify the two different approaches.
This resolves the issue: #88066