Skip to content

Reduce dependencies of pins.c#1753

Open
martinling wants to merge 12 commits into
greatscottgadgets:mainfrom
martinling:reduce-pins-setup
Open

Reduce dependencies of pins.c#1753
martinling wants to merge 12 commits into
greatscottgadgets:mainfrom
martinling:reduce-pins-setup

Conversation

@martinling
Copy link
Copy Markdown
Member

Moves various driver-specific code out of pins.c and into the setup and shutdown functions of the relevant drivers, so that it's possible to build pins.c without depending on all the drivers.

@martinling martinling force-pushed the reduce-pins-setup branch 6 times, most recently from 53edbf2 to 5939e4d Compare May 18, 2026 16:27
@martinling martinling force-pushed the reduce-pins-setup branch from 5939e4d to d9db4af Compare May 18, 2026 16:37
@martinling martinling force-pushed the reduce-pins-setup branch from d9db4af to fd4439d Compare May 18, 2026 17:25
@martinling martinling force-pushed the reduce-pins-setup branch from fd4439d to 64df22d Compare May 18, 2026 17:31
@martinling martinling marked this pull request as ready for review May 18, 2026 17:40
@mossmann mossmann requested a review from antoinevg May 18, 2026 18:49
Comment thread firmware/common/max283x.c
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably meant to go into max283x_setup()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants