Reduce dependencies of pins.c#1753
Open
martinling wants to merge 12 commits into
Open
Conversation
53edbf2 to
5939e4d
Compare
5939e4d to
d9db4af
Compare
d9db4af to
fd4439d
Compare
fd4439d to
64df22d
Compare
antoinevg
requested changes
May 20, 2026
Comment on lines
+63
to
+75
| const platform_gpio_t* gpio = platform_gpio(); | ||
|
|
||
| ssp_config_max283x.gpio_select = gpio->max283x_select; | ||
| #ifdef IS_NOT_PRALINE | ||
| if (IS_NOT_PRALINE) { | ||
| ssp_config_max283x.data_bits = SSP_DATA_16BITS; | ||
| } | ||
| #endif | ||
| #ifdef IS_PRALINE | ||
| if (IS_PRALINE) { | ||
| ssp_config_max283x.data_bits = SSP_DATA_9BITS; // send 2 words | ||
| } | ||
| #endif |
Member
There was a problem hiding this comment.
This was probably meant to go into max283x_setup()?
Member
Author
There was a problem hiding this comment.
You would think so, but I tried that, and things break if it's put there.
Presumably because something is calling ssp1_set_mode_max283x before max283x_setup gets run.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Moves various driver-specific code out of
pins.cand into thesetupandshutdownfunctions of the relevant drivers, so that it's possible to buildpins.cwithout depending on all the drivers.