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

HAL: add PIO configuration API #18

Closed
wants to merge 49 commits into from
Closed

Conversation

tmplt
Copy link
Member

@tmplt tmplt commented May 31, 2022

This PR starts the work on a PIO configuration API, heavily inspired by the API available in the atsamd crate.


This PR depends on #16.

tmplt and others added 30 commits April 22, 2022 13:34
More features will be added in future commits that require explicit
configuration. Moved to build.rs to remove noise from HAL
implementation.
device-selected is a meta-feature that is not described in §2.
This change supports the theoretical case of non-constant VDDIO (for
E70/S70). An enum is also a much stronger association, rather than an
environmental variable (feature).
That is, so the crate does not build if only device-selected is
enabled.
From my interpretation there there is only one single internal
oscillator (not counting the slow clocks) which can be overridden by a
single external oscillator, only that there are two switches that must
be flipped to use the external.
"pmc" is shorter than "periph", and make it clear what peripheral that
is being configured, if we in the future must configure more of them.
Changes made in 465f7d7 incorrectly assumed that there was only one
way to configure the main crystal oscillator.
The datasheet documents two methods of selecting a clock for HCLK/MCK:
one for PLLs and one for the slow and main clock.
We will be utilizing this information later down the line, for example
when configuring peripheral baud rates.
@tmplt
Copy link
Member Author

tmplt commented Sep 9, 2022

Branch is now deprecated. Closing. Refer to #24.

@tmplt tmplt closed this Sep 9, 2022
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.

3 participants