Skip to content

fwk/io: Add optional write() to fwk_io_adapter for efficient string output

Mahmoud Elsabbagh requested to merge io-adapter-puts-support into main

Extend the fwk_io_adapter interface with a new optional write() function pointer, enabling stream adapters to handle strings more efficiently than repeated putch() calls.

If the write() callback is implemented, fwk_io_write() uses it for output. Otherwise, it falls back to fwk_io_putch() to preserve existing behavior.

This change improves performance opportunities for adapters using buffered writes, DMA, or burst modes, while maintaining compatibility with current stream adapters.

Signed-off-by: Mahmoud Elsabbagh mahmoud.elsabbagh@arm.com

Merge request reports

Loading