Skip to content

start referencing examples in embassy-stm32 #4257

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

robamu
Copy link
Contributor

@robamu robamu commented May 27, 2025

I think some references in the docs itself to the examples would be extremely useful. This is a first attempt for embassy-stm32. There are a lot of examples, so I always used STM32F4 for now, which seems to contain the most examples.

@lulf
Copy link
Member

lulf commented May 27, 2025

This is the sort of stuff that gets out of date very quickly though. Also it's referencing the main branch, which won't be accurate/up to date compared to the released crate.

@robamu
Copy link
Contributor Author

robamu commented May 27, 2025

Hmm, introducing a link to a tag would introduce overhead to update the links on every release though..
As it is right now, users could at least click on the link, and select the appropriate tag for a specific version.

I definitely agree that that can get out of date quickly. If some link checker was able to verify that the link does not point to 404, the links becoming invalid could be avoided through tooling.

@robamu
Copy link
Contributor Author

robamu commented May 27, 2025

Alternatives:

  1. Centralize documentation by peripheral module inside examples/README.md (maybe some other tool can check the links more easily) and only refer to that document. I think markdown can also reference local files/paths..
  2. Write a little tool which parses for these links inside all source files and replaces the tag of the links with the current stable version of the HAL library

It is a bit of work, but I find the examples to be extremely useful, and I think quickly finding the relevant examples for a given peripheral module is worth a lot from a documentation standpoint.

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