Skip to content

[gpio, stm32, boards] Pack GPIO pin config into uint32_t for reduced data size#27

Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:optimize-gpio-pincfg
Apr 7, 2026
Merged

[gpio, stm32, boards] Pack GPIO pin config into uint32_t for reduced data size#27
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:optimize-gpio-pincfg

Conversation

@AlexLanzano
Copy link
Copy Markdown
Member

No description provided.

@AlexLanzano AlexLanzano self-assigned this Apr 6, 2026
Copilot AI review requested due to automatic review settings April 6, 2026 20:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR reduces GPIO configuration data size by replacing per-pin struct configs with a packed uint32_t representation and updates STM32 GPIO drivers, boards, and tests accordingly.

Changes:

  • Replaced whal_Stm32wbGpio_PinCfg struct/enums with a packed uint32_t plus pack/unpack macros.
  • Updated STM32WB GPIO driver to consume packed pin configs and program registers from extracted fields.
  • Migrated multiple board pin tables (WB/H5/F4/C0) and updated unit tests to use the new packed format.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
wolfHAL/gpio/stm32wb_gpio.h Introduces packed pin config type and pack/unpack macros, replacing struct-based config.
wolfHAL/gpio/stm32h5_gpio.h Re-exports the STM32WB pack macro for STM32H5 configs.
wolfHAL/gpio/stm32f4_gpio.h Re-exports the STM32WB pack macro for STM32F4 configs.
wolfHAL/gpio/stm32c0_gpio.h Re-exports the STM32WB pack macro for STM32C0 configs.
tests/gpio/test_stm32wb_gpio.c Updates duplicate-pin test to use field extractors on packed configs.
src/gpio/stm32wb_gpio.c Updates GPIO init and IO paths to decode packed configs and program registers.
boards/stm32wb55xx_nucleo/board.c Migrates board pin table initializers to the pack macro.
boards/stm32h563zi_nucleo/board.c Migrates board pin table initializers to the pack macro (including Ethernet pins).
boards/stm32f411_blackpill/board.c Migrates board pin table initializers to the pack macro.
boards/stm32c031_nucleo/board.c Migrates board pin table initializers to the pack macro.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlexLanzano AlexLanzano merged commit 3779228 into wolfSSL:main Apr 7, 2026
30 of 32 checks passed
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