Struct lpc55::protected_flash::CustomerSettingsArea
source · [−]pub struct CustomerSettingsArea<CustomerData = RawCustomerData, VendorUsage = RawVendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,{
pub scratch: CustomerSettings<CustomerData, VendorUsage>,
pub ping: CustomerSettings<CustomerData, VendorUsage>,
pub pong: CustomerSettings<CustomerData, VendorUsage>,
}
Expand description
This is a bit of an interesting construction.
The scratch page “remains outside the protected region”, the intent is that the application updates this (in NXP’s view, by calling bootloader API), and then resets the core.
During startup, bootloader selects one of ping or pong page, depending on which has higher “version” field. If scratch page has even higher “version”, the bootloader erases the older of ping/pong and overwrites with scratch.
Fields
scratch: CustomerSettings<CustomerData, VendorUsage>
ping: CustomerSettings<CustomerData, VendorUsage>
pong: CustomerSettings<CustomerData, VendorUsage>
Implementations
sourceimpl<CustomerData, VendorUsage> CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData + Clone,
VendorUsage: CustomerSettingsVendorUsage + Clone,
impl<CustomerData, VendorUsage> CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData + Clone,
VendorUsage: CustomerSettingsVendorUsage + Clone,
sourcepub fn most_recent(&self) -> CustomerSettings<CustomerData, VendorUsage>
pub fn most_recent(&self) -> CustomerSettings<CustomerData, VendorUsage>
Returns either the ping or pong page, whichever has the highest version.
Trait Implementations
sourceimpl<CustomerData: Clone, VendorUsage: Clone> Clone for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Clone, VendorUsage: Clone> Clone for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn clone(&self) -> CustomerSettingsArea<CustomerData, VendorUsage>
fn clone(&self) -> CustomerSettingsArea<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 CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Debug, VendorUsage: Debug> Debug for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourceimpl<CustomerData: Default, VendorUsage: Default> Default for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Default, VendorUsage: Default> Default for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn default() -> CustomerSettingsArea<CustomerData, VendorUsage>
fn default() -> CustomerSettingsArea<CustomerData, VendorUsage>
Returns the “default value” for a type. Read more
sourceimpl<'de, CustomerData, VendorUsage> Deserialize<'de> for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
CustomerData: Deserialize<'de>,
VendorUsage: Deserialize<'de>,
impl<'de, CustomerData, VendorUsage> Deserialize<'de> for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
CustomerData: Deserialize<'de>,
VendorUsage: Deserialize<'de>,
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 CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Hash, VendorUsage: Hash> Hash for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourceimpl<CustomerData: Ord, VendorUsage: Ord> Ord for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Ord, VendorUsage: Ord> Ord for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn cmp(
&self,
other: &CustomerSettingsArea<CustomerData, VendorUsage>
) -> Ordering
fn cmp(
&self,
other: &CustomerSettingsArea<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<CustomerSettingsArea<CustomerData, VendorUsage>> for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: PartialEq, VendorUsage: PartialEq> PartialEq<CustomerSettingsArea<CustomerData, VendorUsage>> for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn eq(&self, other: &CustomerSettingsArea<CustomerData, VendorUsage>) -> bool
fn eq(&self, other: &CustomerSettingsArea<CustomerData, VendorUsage>) -> bool
sourceimpl<CustomerData: PartialOrd, VendorUsage: PartialOrd> PartialOrd<CustomerSettingsArea<CustomerData, VendorUsage>> for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: PartialOrd, VendorUsage: PartialOrd> PartialOrd<CustomerSettingsArea<CustomerData, VendorUsage>> for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
sourcefn partial_cmp(
&self,
other: &CustomerSettingsArea<CustomerData, VendorUsage>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &CustomerSettingsArea<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 CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
CustomerData: Serialize,
VendorUsage: Serialize,
impl<CustomerData, VendorUsage> Serialize for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
CustomerData: Serialize,
VendorUsage: Serialize,
sourceimpl TryFrom<&[u8]> for CustomerSettingsArea
impl TryFrom<&[u8]> for CustomerSettingsArea
impl<CustomerData: Copy, VendorUsage: Copy> Copy for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData: Eq, VendorUsage: Eq> Eq for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData, VendorUsage> StructuralEq for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
impl<CustomerData, VendorUsage> StructuralPartialEq for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: CustomerSettingsCustomerData,
VendorUsage: CustomerSettingsVendorUsage,
Auto Trait Implementations
impl<CustomerData, VendorUsage> RefUnwindSafe for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: RefUnwindSafe,
VendorUsage: RefUnwindSafe,
impl<CustomerData, VendorUsage> Send for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: Send,
VendorUsage: Send,
impl<CustomerData, VendorUsage> Sync for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: Sync,
VendorUsage: Sync,
impl<CustomerData, VendorUsage> Unpin for CustomerSettingsArea<CustomerData, VendorUsage>where
CustomerData: Unpin,
VendorUsage: Unpin,
impl<CustomerData, VendorUsage> UnwindSafe for CustomerSettingsArea<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.