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

Move pin API to dedicated module #214

Merged
merged 3 commits into from
Feb 26, 2020
Merged

Move pin API to dedicated module #214

merged 3 commits into from
Feb 26, 2020

Conversation

hannobraun
Copy link
Member

This doesn't leave the API in a perfect state, but it's a clear improvement. I'm planning some more improvements to improve RTFM compatibility, and maybe I'll move more stuff around while I'm doing that.

Pins don't can't really be assigned to a single peripheral, like many
other concepts in this HAL. GPIO, SWM, and IOCON all do things related
to them.

Some time ago, I decided to move them to the `swm` module, for lack of a
better idea. I believe this wasn't a good decision. They belong in their
own module. In my opinion, this is the least confusing.

There might be more things we can do to improve things, but I think this
is already a good first step.
This means the name `Peripherals` no longer fully fits, but it's
definitely a better place for it than within the SWM peripheral.
Copy link
Member

@david-sawatzke david-sawatzke left a comment

Choose a reason for hiding this comment

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

Mostly skimmed this, but seems like a good idea to me

@hannobraun hannobraun merged commit 8d0c46d into lpc-rs:master Feb 26, 2020
@hannobraun hannobraun deleted the pins branch February 26, 2020 10:01
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