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

cpu/stm32: Fix ifdefs in periph_gpio_ll #20530

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

Enoch247
Copy link
Contributor

@Enoch247 Enoch247 commented Apr 2, 2024

Contribution description

From the commit msgs:

   cpu/stm32/gpio_ll: make style consistent

   This block of code inconsistently made use of else-if statments. The
   patch makes the use consistent. The change also makes the code a bit
   simpler to read.
    cpu/stm32/gpio_ll: fix ifdef
    
    APB12 is never defined as a macro. It is an element in the bus_t enum.
    Therefore, the test to check if it is defined will always fail.
    
    APB12 is not a real bus. It is the second register of the APB1 bus. I am
    not aware of any STM32 family where the ABP2 bus is implmented (ie
    RCC_APB2ENR_SYSCFGEN is defined) and devices attached to said bus are
    enabled via the APB1 second register. For this reason, the fix is to
    simply remove the check.

Testing procedure

I ensured I did not break the build by doing make -C tests/periph/gpio_ll/ BOARD=nucleo-f767zi. I did not actually run the test, as am not very familiar with the actual driver.

Issues/PRs references

none known

APB12 is never defined as a macro. It is an element in the bus_t enum.
Therefore, the test to check if it is defined will always fail.

APB12 is not a real bus. It is the second register of the APB1 bus. I am
not aware of any STM32 family where the ABP2 bus is implmented (ie
RCC_APB2ENR_SYSCFGEN is defined) and devices attached to said bus are
enabled via the APB1 second register. For this reason, the fix is to
simply remove the check.
This block of code inconsistently made use of else-if statments. The
patch makes the use consistent. The change also makes the code a bit
simpler to read.
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: cpu Area: CPU/MCU ports labels Apr 2, 2024
@Enoch247 Enoch247 changed the title Fix stm32 gpio ll Fix stm32 gpio_ll Apr 2, 2024
@Enoch247 Enoch247 changed the title Fix stm32 gpio_ll Fix stm32 gpio_ll ifdefs Apr 2, 2024
@benpicco benpicco requested a review from maribu April 2, 2024 16:13
@maribu maribu changed the title Fix stm32 gpio_ll ifdefs cpu/stm32: Fix ifdefs in periph_gpio_ll Apr 2, 2024
@maribu maribu enabled auto-merge April 2, 2024 19:45
@maribu
Copy link
Member

maribu commented Apr 2, 2024

Thx for the fix! ❤️

@kfessel kfessel added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 4, 2024
@riot-ci
Copy link

riot-ci commented Apr 4, 2024

Murdock results

✔️ PASSED

aef5dfe cpu/stm32/gpio_ll: make style consistent

Success Failures Total Runtime
10026 0 10027 10m:08s

Artifacts

@maribu maribu added this pull request to the merge queue Apr 4, 2024
Merged via the queue into RIOT-OS:master with commit 6ecbbe4 Apr 4, 2024
30 checks passed
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants