[spi, flash, rng, eth, block] Change data buffer parameters from uint8_t* to void*#24
Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom Mar 31, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the wolfHAL driver interfaces to accept generic data buffers (void* / const void*) instead of byte-specific (uint8_t*) pointers across SPI, Flash, RNG, Ethernet, and Block devices, aligning the public APIs and concrete driver implementations.
Changes:
- Updated driver vtables and public APIs to use
void*/const void*for data buffers (SPI SendRecv, Flash Read/Write, RNG Generate, Eth Send/Recv, Block Read/Write). - Updated platform drivers and bus-device drivers to cast
void*buffers to byte pointers internally. - Updated core dispatch tests to match the new driver function signatures.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfHAL/spi/stm32wb_spi.h | Updates STM32WB SPI SendRecv buffer params to void*. |
| wolfHAL/spi/stm32h5_spi.h | Updates STM32H5 SPI SendRecv buffer params to void*. |
| wolfHAL/spi/stm32f4_spi.h | Updates STM32F4 SPI SendRecv buffer params to void*. |
| wolfHAL/spi/spi.h | Updates SPI vtable + public API to void* buffers. |
| wolfHAL/rng/stm32wb_rng.h | Updates STM32WB RNG Generate output buffer to void*. |
| wolfHAL/rng/stm32h5_rng.h | Updates STM32H5 RNG Generate output buffer to void*. |
| wolfHAL/rng/rng.h | Updates RNG vtable + public API to void* buffers. |
| wolfHAL/flash/stm32wb_flash.h | Updates STM32WB flash Read/Write buffers to void*. |
| wolfHAL/flash/stm32h5_flash.h | Updates STM32H5 flash Read/Write buffers to void*. |
| wolfHAL/flash/stm32f4_flash.h | Updates STM32F4 flash Read/Write buffers to void*. |
| wolfHAL/flash/stm32c0_flash.h | Updates STM32C0 flash Read/Write buffers to void*. |
| wolfHAL/flash/spi_nor.h | Updates SPI NOR read/write APIs to void* buffers. |
| wolfHAL/flash/pic32cz_flash.h | Updates PIC32CZ flash Read/Write buffers to void*. |
| wolfHAL/flash/flash.h | Updates Flash vtable + public API to void* buffers. |
| wolfHAL/eth/stm32h5_eth.h | Updates STM32H5 Ethernet Send/Recv buffers to void*. |
| wolfHAL/eth/eth.h | Updates Ethernet vtable + public API to void* buffers. |
| wolfHAL/block/sdhc_spi.h | Updates SDHC-SPI block Read/Write buffers to void*. |
| wolfHAL/block/block.h | Updates Block vtable + public API to void* buffers. |
| tests/core/test_dispatch.c | Updates mock drivers to match new void* signatures. |
| src/spi/stm32wb_spi.c | Casts void* buffers to byte pointers inside STM32WB SPI driver. |
| src/spi/stm32h5_spi.c | Casts void* buffers to byte pointers inside STM32H5 SPI driver. |
| src/spi/stm32f4_spi.c | Casts void* buffers to byte pointers inside STM32F4 SPI driver. |
| src/spi/spi.c | Updates SPI wrapper API signature to void* buffers. |
| src/rng/stm32wb_rng.c | Casts RNG output buffer from void* to uint8_t*. |
| src/rng/stm32h5_rng.c | Casts RNG output buffer from void* to uint8_t*. |
| src/rng/rng.c | Updates RNG wrapper API signature to void* buffer. |
| src/flash/stm32wb_flash.c | Updates STM32WB flash Read/Write signatures; uses casts for buffer access. |
| src/flash/stm32h5_flash.c | Updates STM32H5 flash Read/Write signatures; uses casts for buffer access. |
| src/flash/stm32f4_flash.c | Updates STM32F4 flash Read/Write signatures; uses casts for buffer access. |
| src/flash/stm32c0_flash.c | Updates STM32C0 flash Read/Write signatures; uses casts for buffer access. |
| src/flash/spi_nor.c | Updates SPI NOR read/write implementations to accept void* buffers. |
| src/flash/pic32cz_flash.c | Updates PIC32CZ flash Read/Write implementations to accept void* buffers. |
| src/flash/flash.c | Updates Flash wrapper API signatures to void* buffers. |
| src/eth/stm32h5_eth.c | Casts Ethernet frame buffers from/to void* in STM32H5 driver. |
| src/eth/eth.c | Updates Ethernet wrapper API signatures to void* buffers. |
| src/block/sdhc_spi.c | Casts block I/O buffers from/to void* in SDHC-SPI driver. |
| src/block/block.c | Updates Block wrapper API signatures to void* buffers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ec0cdf3 to
6b4786e
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.