-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Fix/check valid pins #2910
Closed
Closed
Fix/check valid pins #2910
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8b02f58
minor edit
pljakobs 67ac057
fixed coding style
pljakobs 9329a2e
improved checking for max channel number and made sure PWM_CHANNEL_NU…
pljakobs 8dc5c2c
improved checking for max channel number and made sure PWM_CHANNEL_NU…
pljakobs 98994e3
fixed coding style
pljakobs 89ec329
clean up
pljakobs 7e54adc
removed unnecessary conditional #defines
pljakobs f49281f
re-orderd things in pwm.h
pljakobs f3d920b
fixed coding style. again
pljakobs c012764
Fix pwm.h, minimal patch
mikee47 99d0970
Merge branch 'develop' into fix/maxPWMChannels
pljakobs 4110000
added asserts for allowable pins
pljakobs ef5f105
Revert "added asserts for allowable pins"
pljakobs 91602b3
added asserts for allowable pins
pljakobs 35bc1ab
assert now only checks against SOC_GPIO_VALID_OUTPUT_GPIO_MASK
pljakobs dcf13ae
coding style
pljakobs 2914833
coding style
pljakobs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If you look at
ledc_channel_config
you'll see that this exact check is already providedLEDC_ARG_CHECK(GPIO_IS_VALID_OUTPUT_GPIO(gpio_num), "gpio_num");
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.
sigh. I came from observing the bug that I described above (my current setting, as used on the 8266, uses the two flash pins). First, I started with asserts that would have tripped on using those, but then thought that this is the wrong place to do this.
I'm now adding a list of allowable pins per SoC to the configuration (that would be a great use case for defaults for arrays with objects in ConfigDB, btw).
This assert just seemed to be the minimal sensible thing to do. I should have assumed that someone was already sensible enough to add it.
I'll close the pr then.
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, I've seen designs for the esp8266 which doesn't use flash at all but boots over SDIO so can't even assume they'll never be used!