zephyr::raw

Function flash_write

Source
pub unsafe extern "C" fn flash_write(
    dev: *const device,
    offset: i32,
    data: *const c_void,
    len: usize,
) -> i32
Expand description

@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. Write size and offset must be multiples of the minimum write block size supported by the driver.

Any necessary write protection management is performed by the driver write implementation itself.

@param dev : flash device @param offset : starting offset for the write @param data : data to write @param len : Number of bytes to write

@return 0 on success, negative errno code on fail.