#[repr(C)]
pub struct spi_flash_encryption_t { pub flash_encryption_enable: Option<unsafe extern "C" fn()>, pub flash_encryption_disable: Option<unsafe extern "C" fn()>, pub flash_encryption_data_prepare: Option<unsafe extern "C" fn(address: u32, buffer: *const u32, size: u32)>, pub flash_encryption_done: Option<unsafe extern "C" fn()>, pub flash_encryption_destroy: Option<unsafe extern "C" fn()>, pub flash_encryption_check: Option<unsafe extern "C" fn(address: u32, length: u32) -> bool>, }
Expand description

Structure for flash encryption operations.

Fields

flash_encryption_enable: Option<unsafe extern "C" fn()>

@brief Enable the flash encryption

flash_encryption_disable: Option<unsafe extern "C" fn()>

@brief Disable the flash encryption

flash_encryption_data_prepare: Option<unsafe extern "C" fn(address: u32, buffer: *const u32, size: u32)>

Prepare flash encryption before operation.

@param address The destination address in flash for the write operation. @param buffer Data for programming @param size Size to program.

@note address and buffer must be 8-word aligned.

flash_encryption_done: Option<unsafe extern "C" fn()>

@brief flash data encryption operation is done.

flash_encryption_destroy: Option<unsafe extern "C" fn()>

Destroy encrypted result

flash_encryption_check: Option<unsafe extern "C" fn(address: u32, length: u32) -> bool>

Check if is qualified to encrypt the buffer

@param address the address of written flash partition. @param length Buffer size.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.