PropertyTag

Enum PropertyTag 

Source
#[repr(u8)]
pub enum PropertyTag {
Show 38 variants CurrentVersion(Version), AvailablePeripherals(Box<[PeripheryTag]>), FlashStartAddress(u32), FlashSize(u32), FlashSectorSize(u32), FlashBlockCount(u32), AvailableCommands(Box<[CommandTagDiscriminants]>), CRCCheckStatus(StatusCode), LastError(u32), VerifyWrites(bool), MaxPacketSize(u32), ReservedRegions(ReservedRegions), ValidateRegions(bool), RAMStartAddress(u32), RAMSize(u32), SystemDeviceId(u32), FlashSecurityState(FlashSecurityState), UniqueDeviceId(DeviceId), FlashFacSupport(bool), FlashAccessSegmentSize(u32), FlashAccessSegmentCount(u32), FlashReadMargin(FlashReadMargin), QSPIInitStatus(StatusCode), TargetVersion(Version), ExternalMemoryAttributes(ExternalMemoryAttributes), ReliableUpdateStatus(StatusCode), FlashPageSize(u32), IrqNotifierPin(IrqNotifierPin), PFRKeystoreUpdateOpt(PfrKeystoreUpdateOpt), ByteWriteTimeoutMs(u32), FuseLockedStatus = 31, BootStatusRegister(u32), FirmwareVersion(u32), FuseProgramVoltage(FuseProgramVoltage), VerifyErase(bool), SHEFlashPartition(SHEFlashPartition), SHEBootMode(SHEBootMode), LifeCycleState(LifeCycleState),
}
Expand description

Enumeration of bootloader property tags.

These properties can be queried from the bootloader to get information about the device capabilities, memory layout, and current status.

Variants§

§

CurrentVersion(Version)

Current version of the bootloader

§

AvailablePeripherals(Box<[PeripheryTag]>)

List of available peripheral interfaces

§

FlashStartAddress(u32)

Start address of the internal flash memory

§Note

The length includes the “0x” part.

§

FlashSize(u32)

Size of the internal flash memory

§

FlashSectorSize(u32)

Size of a single flash sector

§

FlashBlockCount(u32)

Number of flash blocks

§

AvailableCommands(Box<[CommandTagDiscriminants]>)

List of available bootloader commands

§

CRCCheckStatus(StatusCode)

Status of the last CRC check operation

§

LastError(u32)

Value of the last error that occurred

§

VerifyWrites(bool)

Whether write operations are verified after completion

§

MaxPacketSize(u32)

Maximum packet size for data transfer

§

ReservedRegions(ReservedRegions)

Memory regions reserved by the bootloader

§

ValidateRegions(bool)

Regions that should be validated

§

RAMStartAddress(u32)

Start address of the internal RAM memory

§

RAMSize(u32)

Size of the internal RAM memory

§

SystemDeviceId(u32)

System device identification number

§

FlashSecurityState(FlashSecurityState)

Current security state of the flash memory

§

UniqueDeviceId(DeviceId)

Unique device identification bytes

§

FlashFacSupport(bool)

Flash factory support information

§

FlashAccessSegmentSize(u32)

Size of flash access segments

§

FlashAccessSegmentCount(u32)

Number of flash access segments

§

FlashReadMargin(FlashReadMargin)

Flash read margin setting

§

QSPIInitStatus(StatusCode)

QuadSPI initialization status

§

TargetVersion(Version)

Target version information

§

ExternalMemoryAttributes(ExternalMemoryAttributes)

Attributes of external memory devices

§

ReliableUpdateStatus(StatusCode)

Status of reliable update feature

§

FlashPageSize(u32)

Size of a single flash page

§

IrqNotifierPin(IrqNotifierPin)

IRQ notifier pin configuration

§

PFRKeystoreUpdateOpt(PfrKeystoreUpdateOpt)

PFR keystore update option

§

ByteWriteTimeoutMs(u32)

Timeout for byte write operations in milliseconds

§

FuseLockedStatus = 31

Status of fuse locked state

§

BootStatusRegister(u32)

Boot status register value

§

FirmwareVersion(u32)

Firmware version information

§

FuseProgramVoltage(FuseProgramVoltage)

Fuse program voltage setting

§

VerifyErase(bool)

Whether erase operations are verified after completion

§

SHEFlashPartition(SHEFlashPartition)

Secure Hardware Extension flash partition information

§

SHEBootMode(SHEBootMode)

Secure Hardware Extension boot mode information

§

LifeCycleState(LifeCycleState)

Current life cycle state of the device

Implementations§

Source§

impl PropertyTag

Source

pub fn from_code(tag: PropertyTagDiscriminants, data: &[u32]) -> PropertyTag

Create a PropertyTag from a discriminant and data array.

Parses the raw data according to the property type and creates the appropriate PropertyTag variant.

§Arguments
  • tag - Property tag discriminant identifying the property type
  • data - Raw data array containing the property value
§Returns

Parsed PropertyTag variant

§Panics

When parsing PropertyTag::CRCCheckStatus, if the status returned by the board is invalid.

Trait Implementations§

Source§

impl Clone for PropertyTag

Source§

fn clone(&self) -> PropertyTag

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PropertyTag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for PropertyTag

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'_enum> From<&'_enum PropertyTag> for PropertyTagDiscriminants

Source§

fn from(val: &'_enum PropertyTag) -> PropertyTagDiscriminants

Converts to this type from the input type.
Source§

impl From<PropertyTag> for PropertyTagDiscriminants

Source§

fn from(val: PropertyTag) -> PropertyTagDiscriminants

Converts to this type from the input type.
Source§

impl IntoDiscriminant for PropertyTag

Source§

type Discriminant = PropertyTagDiscriminants

Enum listing the same variants as this enum but without any data fields
Source§

fn discriminant(&self) -> Self::Discriminant

Source§

impl ToAddress for PropertyTag

Source§

fn code(&self) -> u8

Extract the numeric code from a tagged enum. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.