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 definitions to hw.h header file #107

Merged
merged 1 commit into from Jul 7, 2023

Conversation

jballoffet
Copy link
Member

@jballoffet jballoffet commented Jul 7, 2023

🎉 New feature

Related: #87

Summary

This PR moves all the pin definitions into a header file called hw.h. This helps to decouple the software logic from the hardware connections, thus making it easier to reassign pins if needed (further changes are still required to ensure nothing breaks when pins are reassigned).

This PR also moves the encoder GPIO initialization into a new init function within said module.

This is the first of several PRs that will improve the code structure.

Test it

N/A.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if it affects the public API)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Javier Balloffet <javier.balloffet@gmail.com>
Copy link
Collaborator

@francocipollone francocipollone left a comment

Choose a reason for hiding this comment

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

LGTM!

@jballoffet
Copy link
Member Author

LGTM!

Thanks @francocipollone!

@jballoffet jballoffet merged commit 09dbf66 into humble Jul 7, 2023
3 checks passed
@jballoffet jballoffet deleted the jballoffet/add-hw-header-file branch July 7, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants