pub struct FirmwareWriter(/* private fields */);
Expand description
FirmwareWriter allows writing blocks to an already erased flash.
Implementations§
Source§impl FirmwareWriter
impl FirmwareWriter
Sourcepub async fn write_block<F: AsyncNorFlash>(
&mut self,
offset: usize,
data: &[u8],
flash: &mut F,
block_size: usize,
) -> Result<(), F::Error>
pub async fn write_block<F: AsyncNorFlash>( &mut self, offset: usize, data: &[u8], flash: &mut F, block_size: usize, ) -> Result<(), F::Error>
Write data to a flash page.
The buffer must follow alignment requirements of the target flash and a multiple of page size big.
§Safety
Failing to meet alignment and size requirements may result in a panic.
Sourcepub fn write_block_blocking<F: NorFlash>(
&mut self,
offset: usize,
data: &[u8],
flash: &mut F,
block_size: usize,
) -> Result<(), F::Error>
pub fn write_block_blocking<F: NorFlash>( &mut self, offset: usize, data: &[u8], flash: &mut F, block_size: usize, ) -> Result<(), F::Error>
Write data to a flash page.
The buffer must follow alignment requirements of the target flash and a multiple of page size big.
§Safety
Failing to meet alignment and size requirements may result in a panic.
Auto Trait Implementations§
impl Freeze for FirmwareWriter
impl RefUnwindSafe for FirmwareWriter
impl Send for FirmwareWriter
impl Sync for FirmwareWriter
impl Unpin for FirmwareWriter
impl UnwindSafe for FirmwareWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more