Skip to content

[spi, flash, rng, eth, block] Change data buffer parameters from uint8_t* to void*#24

Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:void-pointer
Mar 31, 2026
Merged

[spi, flash, rng, eth, block] Change data buffer parameters from uint8_t* to void*#24
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:void-pointer

Conversation

@AlexLanzano
Copy link
Copy Markdown
Member

No description provided.

@AlexLanzano AlexLanzano self-assigned this Mar 31, 2026
Copilot AI review requested due to automatic review settings March 31, 2026 04:12
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

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.

@AlexLanzano AlexLanzano merged commit dccc647 into wolfSSL:main Mar 31, 2026
14 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