Skip to content

GPIOx cleanup and improvement #717

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

Merged
merged 17 commits into from
May 30, 2022
Merged

Conversation

larchuto
Copy link
Contributor

@larchuto larchuto commented Apr 9, 2022

  • STM32WL family does not depend on gpio_v2_common directly anymore
  • Make it clear that STM32G0 depends on the same file as STM32L0
  • Single matching pattern for GPIOx.LCKR.LCK[0-15] and GPIOx.BRR.BR[0-15]
  • Apply GPIOx.BRR patch to STM32G0 and STM32L0 and STM32L5

@github-actions
Copy link

github-actions bot commented Apr 9, 2022

Memory map comparison

@github-actions
Copy link

github-actions bot commented Apr 9, 2022

Memory map comparison

@larchuto larchuto changed the title GPIOx cleanup and improvement WIP: GPIOx cleanup and improvement Apr 12, 2022
@github-actions
Copy link

Memory map comparison

@burrbull
Copy link
Member

Please, rebase your branch on master.

@github-actions
Copy link

Memory map comparison

@github-actions
Copy link

Memory map comparison

@github-actions
Copy link

Memory map comparison

@larchuto
Copy link
Contributor Author

larchuto commented Apr 21, 2022

New modifications :

  • STM32WL is handled in a single file (removing gpio_wl_with_brr.yaml)
  • Separation of gpio peripheral styles into 3 dedicated folders: v1, v2 and v3. v1 correspond to the F1 style and v3 to the G0, L0 and L5 style (it is basically the same as v2 but ST changed some names).
  • gpio_go_l0 and gpio_l5 now share some code. This as the effect of slightly modifying the GPIOx.MODER.MODE* fields (removing the "(reset state)" mention, which carries information already given in the resetValue field).

@larchuto larchuto changed the title WIP: GPIOx cleanup and improvement GPIOx cleanup and improvement Apr 21, 2022
@larchuto
Copy link
Contributor Author

It may be better to put the v1,v2,v3 stuff into a separate PR ?

@larchuto
Copy link
Contributor Author

@adamgreig or @newAM, would you possibly have some spare time to review this ?

larchuto added 7 commits May 27, 2022 15:47
gpio_wl_with_brr.yaml is removed and its content is moved into
gpio_wl.yaml
This allows to do some factorisation between STM32G0 and L0 on one side
and STM32L5 on the other.

Note: v3 is basically the same as v2 but ST seems to have decided to
change some names starting from STM32L0.
@larchuto larchuto force-pushed the dev/gpio_cleanup branch from 8549c41 to 2500848 Compare May 27, 2022 13:53
@github-actions
Copy link

Memory map comparison

@larchuto
Copy link
Contributor Author

I just rebased it on top of master and resolved conflicts.

newAM
newAM previously approved these changes May 28, 2022
Copy link
Member

@newAM newAM left a comment

Choose a reason for hiding this comment

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

Thanks for the pull-request!

This looks good to me; I will wait for another person to review because there are a lot of changes here.

change is done to:
- GPIOx.BRR.BRx match patterns
- GPIOx.LCKR.LCKx match patterns
@github-actions
Copy link

Memory map comparison

Copy link
Member

@newAM newAM left a comment

Choose a reason for hiding this comment

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

Checked the generated output, overall much less code; 10107 insertions(+), 16189 deletions(-); lots more variants alias each other. That's really great because GPIOs take the longest to compile because they have the largest volume of code.

bors r+

@bors
Copy link
Contributor

bors bot commented May 30, 2022

Build succeeded:

@bors bors bot merged commit 1d4a1c5 into stm32-rs:master May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants