Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include/drivers/flash: document on the unrestricted alignment of reads #23628

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions include/drivers/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ __subsystem struct flash_driver_api {
/**
* @brief Read data from flash
*
* Most of flash drivers support unaligned flash access, but some have
* restrictions on the read offset or/and the read size. Please refer to
* the driver implementation to get details on the read alignment requirement.
* All flash drivers support reads without alignment restrictions on
* the read offset, the read size, or the destination address.
*
* @param dev : flash dev
* @param offset : Offset (byte aligned) to read
Expand All @@ -121,6 +120,10 @@ static inline int z_impl_flash_read(struct device *dev, off_t offset, void *data
/**
* @brief Write buffer into flash memory.
*
* All flash drivers support a source buffer located either in RAM or
* SoC flash, without alignment restrictions on the source address, or
* write size or offset.
*
* Prior to the invocation of this API, the flash_write_protection_set needs
* to be called first to disable the write protection.
*
Expand Down