-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
drivers: stepper: refactor enable(dev,flag) to enable & disable #87491
base: main
Are you sure you want to change the base?
drivers: stepper: refactor enable(dev,flag) to enable & disable #87491
Conversation
f0e2120
to
fa4891c
Compare
5621e31
to
683fd66
Compare
@@ -708,6 +726,7 @@ static int tmc50xx_stepper_init(const struct device *dev) | |||
#define TMC50XX_STEPPER_API_DEFINE(child) \ | |||
static DEVICE_API(stepper, tmc50xx_stepper_api_##child) = { \ |
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.
Just noticed this - why is there an instance of the api per stepper? Shouldn't there only be one?
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.
This particular driver can support two steppers.
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.
Yeah but the api is the same for both. If you'd have two bme sensors on your board you end up with only one api
instance in your binary - I feel like the same applies here, unlese I miss something
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.
That's 100% correct, thanks :) Have rectified it :)
683fd66
to
a1eacec
Compare
a1eacec
to
245721d
Compare
refactoring enable function into enable and disable increasing readability and increasing coherence with other stepper apis in terms of nomenclature Signed-off-by: Jilay Pandya <[email protected]>
- Add migration guide entry for enable->enable/disable function - Add stepper_disable to stepper.rst Signed-off-by: Jilay Pandya <[email protected]>
245721d
to
25f401a
Compare
refactoring enable function into enable and disable increasing readability and increasing coherence with other stepper apis in terms of nomenclature
#87229