-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: pwm: fix compilation with CONFIG_PWM_CAPTURE=n #31267
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: pwm: fix compilation with CONFIG_PWM_CAPTURE=n #31267
Conversation
Fix compilation with pwm.h with CONFIG_PWM_CAPTURE=n. Signed-off-by: Henrik Brix Andersen <[email protected]>
|
This fixes warnings like the following, as seen in https://buildkite.com/zephyr/zephyr/builds/17735#7b50a655-5ca5-486e-aa97-a598aae24df4: Not sure why this wasn't caught in CI on #26025. |
| * @retval -EIO if IO error occurred while configuring | ||
| * @retval -EBUSY if PWM capture is already in progress | ||
| */ | ||
| static inline int pwm_pin_configure_capture(const struct device *dev, |
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.
But doesn't this remove the anchor to which the documentation attaches, so it won't be documented?
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.
I think if the prototype removes static inline it might work. I'm testing it in #31265 as well; see https://github.com/zephyrproject-rtos/zephyr/compare/e3d115573a9389e965c660693b9b0ce07cfc3301..57e3821567f4fe685a5b865269254007198d2db2
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.
@pabigot No, the documentation build still gets the correct result. I already tried several permutations of inline, static, __unused etc. without any luck.
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.
Ah: that's because you have CONFIG_PWM_CAPTURE in the doxygen predefines. OK.
Fix compilation with pwm.h with CONFIG_PWM_CAPTURE=n.
Signed-off-by: Henrik Brix Andersen [email protected]