pub struct ExternalMemoryAttributes { /* private fields */ }Expand description
External memory attributes information
Represents the properties and characteristics of external memory devices that can be configured and used by the bootloader. This includes information such as memory size, addressing, and block/sector organization.
Implementations§
Source§impl ExternalMemoryAttributes
impl ExternalMemoryAttributes
Sourcepub fn parse(data: &[u32]) -> Self
pub fn parse(data: &[u32]) -> Self
Parses external memory attributes from u32 array
Takes an array of u32 values where the first value contains flags indicating which properties are present, followed by the actual property values in a specific order. The presence of each property is determined by the corresponding flag bit in the first value.
§Arguments
data- Array of u32 values containing flags and property values
§Returns
A new ExternalMemoryAttributes instance with parsed properties
§Data Format
-data[0]: Property flags (combination of ext_mem_prop_tags constants)
-data[1]: Start address (if ext_mem_prop_tags::START_ADDRESS flag is set)
-data[2]: Size in kilobytes (if ext_mem_prop_tags::SIZE_IN_KBYTES flag is set)
-data[3]: Page size in bytes (if ext_mem_prop_tags::PAGE_SIZE flag is set)
-data[4]: Sector size in bytes (if ext_mem_prop_tags::SECTOR_SIZE flag is set)
-data[5]: Block size in bytes (if ext_mem_prop_tags::BLOCK_SIZE flag is set)
Trait Implementations§
Source§impl Clone for ExternalMemoryAttributes
impl Clone for ExternalMemoryAttributes
Source§fn clone(&self) -> ExternalMemoryAttributes
fn clone(&self) -> ExternalMemoryAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more