-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
[BUG] Static Assert shouldn't be used ON STM32 when verifying for PWM pin #15858
Comments
LinoBarreca
changed the title
[BUG] Static Assert shouldn't be used ON STM32
[BUG] Static Assert shouldn't be used ON STM32 when verifying for PWM pin
Nov 9, 2019
this was found here |
This was referenced Nov 9, 2019
Can we close this one? |
Close the issue? yes. 'cause it's a duplicate of this #15362 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
On STM32 Platform every PIN can be "PWM" because they are handled through a timer if they are defined in the variant.
The macro
PWM_PIN
expands todigitalPinHasPWM(P)
(which is correct)Problem here is that you can't check it at compile time, (with a static assert)
Steps to Reproduce
Marlin/src/HAL/HAL_STM32/../../inc/SanityCheck.h:1854:5: error: non-constant condition for static assertion static_assert(PWM_PIN(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);
Expected behavior: compile fine
Actual behavior:
Additional Information
this shouldn't be a static assert on STM32.
The text was updated successfully, but these errors were encountered: