Skip to content

drivers/periph/spi: add doc about multiple SPI buses#22185

Merged
crasbe merged 3 commits into
RIOT-OS:masterfrom
crasbe:pr/spi_doc
Apr 16, 2026
Merged

drivers/periph/spi: add doc about multiple SPI buses#22185
crasbe merged 3 commits into
RIOT-OS:masterfrom
crasbe:pr/spi_doc

Conversation

@crasbe

@crasbe crasbe commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Contribution description

As discussed in the Weekly, the documentation of the SPI peripheral could be extended.

Also, in the last RIOT seminar at TUHH the question came up what SPI_DEV even is, this is not really addressed here yet.

Perhaps replicate this for I2C and UART?

Testing procedure

Read the doc.

Issues/PRs references

None.

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

@crasbe
crasbe requested a review from carl-tud April 10, 2026 13:53
@crasbe crasbe added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels Apr 10, 2026
@crasbe
crasbe requested a review from MrKevinWeiss as a code owner April 10, 2026 13:53
@github-actions github-actions Bot added the Area: drivers Area: Device drivers label Apr 10, 2026
@riot-ci

riot-ci commented Apr 10, 2026

Copy link
Copy Markdown

Murdock results

✔️ PASSED

be59d09 doc/guides/creating_app: add info about custom periph_conf.h

Success Failures Total Runtime
1 0 1 01m:12s

Artifacts

@mguetschow mguetschow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Should we add a hint as to how people are expected to change those (i.e., custom board or custom periph_conf.h)?

Perhaps replicate this for I2C and UART?

Yes, please!

Comment thread drivers/include/periph/spi.h Outdated
* # Dealing with Multiple SPI Buses
*
* Many advanced microcontrollers feature multiple SPI buses and some devices,
* such as the Nordic Semiconductor nRF52 family even allow arbitrary pin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* such as the Nordic Semiconductor nRF52 family even allow arbitrary pin
* such as the Nordic Semiconductor nRF52 family, even allow arbitrary pin

maybe also add a reference/link to it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure where to link to in this case, but also in the past I've been told in reviews to avoid overly specific pieces of information in documentation. So I'd probably keep the level of details at this level 🤔

Comment thread drivers/include/periph/spi.h Outdated
Comment thread drivers/include/periph/spi.h Outdated
@crasbe

crasbe commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! Should we add a hint as to how people are expected to change those (i.e., custom board or custom periph_conf.h)?

Perhaps the board porting guide world be a good place for additional information, not sure where to put information for a user.

I don't really want to edit every periph_conf.h file to add a hint.

Perhaps replicate this for I2C and UART?

Yes, please!

In follow up PRs though :)

@crasbe

crasbe commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! Should we add a hint as to how people are expected to change those (i.e., custom board or custom periph_conf.h)?

Perhaps the board porting guide world be a good place for additional information, not sure where to put information for a user.

So I just tested it and you can put a custom periph_conf.h in your application's base directory that is chosen instead of the board's periph_conf.h. AFAIK this is not documented anywhere yet, but the https://doc.riot-os.org/c_tutorials/create_project/ or https://doc.riot-os.org/advanced_tutorials/creating_application/ guide would probably be the best place for it. Then I can add a half sentence to the end that already points to the periph_conf.h and refer to the appropriate chapter in the guide.

@github-actions github-actions Bot added the Area: doc Area: Documentation label Apr 13, 2026
Comment thread drivers/include/periph/spi.h Outdated
@crasbe crasbe added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 14, 2026
@AnnsAnns

Copy link
Copy Markdown
Member

Wanna wait for @mguetschow approval?

@crasbe

crasbe commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

Applied the same fix as in #22192.

@crasbe

crasbe commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

Wanna wait for @mguetschow approval?

I was hoping for some feedback from @carl-tud, who raised the issue and perhaps from @miri64 to check if I documented the periph_conf.h feature correctly. She pointed to that feature existing. 😅

The merge queue won't drain today anyway, so we can also just wait one more day for Mikolai :)

@crasbe
crasbe added this pull request to the merge queue Apr 16, 2026
Merged via the queue into RIOT-OS:master with commit 49d83e9 Apr 16, 2026
26 checks passed
@crasbe
crasbe deleted the pr/spi_doc branch April 22, 2026 11:57
@MrKevinWeiss MrKevinWeiss added this to the Release 2026.07 milestone Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants