Struct lpc55::protected_flash::CustomerSettings
source · [−]pub struct CustomerSettings<CustomerData = RawCustomerData, VendorUsage = RawVendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,{
pub header: Header,
pub customer_version: MonotonicCounter,
pub secure_firmware_version: MonotonicCounter,
pub nonsecure_firmware_version: MonotonicCounter,
pub image_key_revocation_id: MonotonicCounter,
pub vendor_usage: VendorUsage,
pub rot_keys_status: RotKeysStatus,
pub enable_fault_analysis_mode: bool,
pub factory_prog_in_progress: FactorySettingsProgInProgress,
pub prince_ivs: [PrinceIvCode; 3],
pub customer_data: CustomerData,
pub seal: bool,
/* private fields */
}
Expand description
See CustomerSettingsArea
documentation for how this part of the configuration is
used and updated by the ROM bootloader.
Fields
header: Header
customer_version: MonotonicCounter
monotonic counter
secure_firmware_version: MonotonicCounter
monotonic counter
nonsecure_firmware_version: MonotonicCounter
monotonic counter
image_key_revocation_id: MonotonicCounter
vendor_usage: VendorUsage
rot_keys_status: RotKeysStatus
enable_fault_analysis_mode: bool
factory_prog_in_progress: FactorySettingsProgInProgress
prince_ivs: [PrinceIvCode; 3]
customer_data: CustomerData
seal: bool
Setting this to true will calculate the SHA256 automatically for sha256_hash
.
Implementations
sourceimpl CustomerSettings
impl CustomerSettings
pub fn valid_activation_code(&self) -> bool
sourceimpl<CustomerData, VendorUsage> CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData, VendorUsage> CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
pub fn debug_settings(&self) -> DebugSettings
pub fn to_bytes(&mut self) -> Result<[u8; 512]>
Trait Implementations
sourceimpl<CustomerData: Clone, VendorUsage: Clone> Clone for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Clone, VendorUsage: Clone> Clone for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn clone(&self) -> CustomerSettings<CustomerData, VendorUsage>
fn clone(&self) -> CustomerSettings<CustomerData, VendorUsage>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<CustomerData: Debug, VendorUsage: Debug> Debug for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Debug, VendorUsage: Debug> Debug for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourceimpl<CustomerData: Default, VendorUsage: Default> Default for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Default, VendorUsage: Default> Default for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn default() -> CustomerSettings<CustomerData, VendorUsage>
fn default() -> CustomerSettings<CustomerData, VendorUsage>
Returns the “default value” for a type. Read more
sourceimpl<'de, CustomerData, VendorUsage> Deserialize<'de> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
CustomerData: Deserialize<'de>,
VendorUsage: Deserialize<'de>,
CustomerData: Default,
VendorUsage: Default,
impl<'de, CustomerData, VendorUsage> Deserialize<'de> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
CustomerData: Deserialize<'de>,
VendorUsage: Deserialize<'de>,
CustomerData: Default,
VendorUsage: Default,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<CustomerData: Hash, VendorUsage: Hash> Hash for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Hash, VendorUsage: Hash> Hash for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourceimpl<CustomerData: Ord, VendorUsage: Ord> Ord for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Ord, VendorUsage: Ord> Ord for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn cmp(&self, other: &CustomerSettings<CustomerData, VendorUsage>) -> Ordering
fn cmp(&self, other: &CustomerSettings<CustomerData, VendorUsage>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<CustomerData: PartialEq, VendorUsage: PartialEq> PartialEq<CustomerSettings<CustomerData, VendorUsage>> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: PartialEq, VendorUsage: PartialEq> PartialEq<CustomerSettings<CustomerData, VendorUsage>> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn eq(&self, other: &CustomerSettings<CustomerData, VendorUsage>) -> bool
fn eq(&self, other: &CustomerSettings<CustomerData, VendorUsage>) -> bool
sourceimpl<CustomerData: PartialOrd, VendorUsage: PartialOrd> PartialOrd<CustomerSettings<CustomerData, VendorUsage>> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: PartialOrd, VendorUsage: PartialOrd> PartialOrd<CustomerSettings<CustomerData, VendorUsage>> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn partial_cmp(
&self,
other: &CustomerSettings<CustomerData, VendorUsage>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &CustomerSettings<CustomerData, VendorUsage>
) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl<CustomerData, VendorUsage> Serialize for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
VendorUsage: Serialize,
impl<CustomerData, VendorUsage> Serialize for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
VendorUsage: Serialize,
sourceimpl<CustomerData, VendorUsage> TryFrom<&[u8]> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData, VendorUsage> TryFrom<&[u8]> for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Copy, VendorUsage: Copy> Copy for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Eq, VendorUsage: Eq> Eq for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData, VendorUsage> StructuralEq for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData, VendorUsage> StructuralPartialEq for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
Auto Trait Implementations
impl<CustomerData, VendorUsage> RefUnwindSafe for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: RefUnwindSafe,
VendorUsage: RefUnwindSafe,
impl<CustomerData, VendorUsage> Send for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: Send,
VendorUsage: Send,
impl<CustomerData, VendorUsage> Sync for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: Sync,
VendorUsage: Sync,
impl<CustomerData, VendorUsage> Unpin for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: Unpin,
VendorUsage: Unpin,
impl<CustomerData, VendorUsage> UnwindSafe for CustomerSettings<CustomerData, VendorUsage>where
CustomerData: UnwindSafe,
VendorUsage: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.