[gpio, stm32, boards] Pack GPIO pin config into uint32_t for reduced data size#27
Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom Apr 7, 2026
Merged
Conversation
There was a problem hiding this comment.
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_PinCfgstruct/enums with a packeduint32_tplus 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.
486a13a to
9df6970
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.