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

Extract inner modules of gpio module into their own files #1397

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

jessebraham
Copy link
Member

Our GPIO driver is getting quite large and complex, and each of these modules have sufficient complexity to warrant their own files, IMO, so I have extracted the modules.

There is one breaking change here, in that I changed the lp_gpio module to lp_io. This was done for two reasons: to be consistent with the peripheral name (LP_IO) and to be consistent with the rtc_io module in the same driver. I can revert this change if needed.

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

Although I'm pretty new with the peripheral, changes LGTM and the renaming also makes sense to me. Just left 2 minors docstrings suggestions that you can ignore if you want.

esp-hal/src/gpio/lp_io.rs Outdated Show resolved Hide resolved
esp-hal/src/gpio/lp_io.rs Show resolved Hide resolved
@jessebraham
Copy link
Member Author

Good eye @SergioGasquez, thanks! Doc comment has been added.

I just realized there are a number of public items in the gpio module which still required doc comments as well; I am happy to take care of these too, but in the interest of getting this merged (also I have some other stuff on the go) I will probably break my new rule and do this in a separate PR 😬

Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

LGTM - I guess the amount of code in each module justifies having them separate

Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@MabezDev MabezDev enabled auto-merge April 5, 2024 10:22
@MabezDev MabezDev added this pull request to the merge queue Apr 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 5, 2024
@MabezDev MabezDev added this pull request to the merge queue Apr 5, 2024
Merged via the queue into esp-rs:main with commit fd9f789 Apr 5, 2024
21 checks passed
@jessebraham jessebraham deleted the refactor/gpio branch April 5, 2024 13:31
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.

5 participants