Skip to content
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

Platform support for Raspberry Pi Pico #233

Merged
merged 17 commits into from
Jul 26, 2023
Merged

Platform support for Raspberry Pi Pico #233

merged 17 commits into from
Jul 26, 2023

Conversation

gundralaa
Copy link
Collaborator

@gundralaa gundralaa commented Jun 8, 2023

platform support for raspberry pi pico

  • clock primitives
  • critical sections for unthreaded
  • threaded runtime

some notes

  • this platform support is an experiment in implementing a threaded runtime without a threading library

Copy link
Contributor

@edwardalee edwardalee left a comment

Choose a reason for hiding this comment

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

This looks like a really good start. Minor comments added.

Comment on lines 50 to 52
/**
* Initialize the LF clock. Must be called before using other clock-related APIs.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these function comments should appear only in the .h file unless they are somehow different for this implementation.

*
* Ideally, the underlying platform clock should be monotonic. However, the
* core lib tries to enforce monotonicity at higher level APIs (see tag.h).
* TODO: might want to use the RTC
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be an ordinary comment in the function body? It refers to the implementation, not the interface.

* Lock a mutex.
*
* @return 0 on success, platform-specific error number otherwise.
* TODO: should this block?
Copy link
Contributor

Choose a reason for hiding this comment

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

Acquiring a mutex always needs to block.

@lhstrh lhstrh merged commit 815d303 into main Jul 26, 2023
@lhstrh lhstrh changed the title pico lf Platform support for Raspberry Pi Pico Aug 28, 2023
@lhstrh lhstrh added the feature New feature label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants