Struct lpc55_hal::peripherals::pfr::Pfr[][src]

pub struct Pfr<State = Unknown> {
    pub flash_config: FlashConfig,
    pub _state: State,
}

Fields

flash_config: FlashConfig_state: State

Implementations

impl Pfr[src]

pub fn new() -> Self[src]

pub fn enabled(self, clock_config: &Clocks) -> Result<Pfr<Enabled>, u32>[src]

impl Pfr<Enabled>[src]

pub fn read_cmpa(&mut self) -> Result<Cmpa, u32>[src]

pub fn cmpa_customer_data(&mut self) -> &'static [u8][src]

Get a readonly static reference to the customer data in CMPA.

pub fn read_cfpa_with_bootrom(&mut self) -> Result<Cfpa, u32>[src]

Keeping here for reference, but this sometimes returns unexpected old versions of the CFPA page that are not seen on scratch, ping, or pong pages. Findings:

  • Immediately after CFPA is updated, this method returns the latest CFPA data.
  • After boot/reset, this method will potentially return expected old versions of CFPA.
  • There is a pattern of how to increment VERSION to result in this method returning old CFPA versions or not which is impractical. It’s almost like there is some other cfpa page storage not documented and this bootrom method mismanages the VERSION.

pub fn read_latest_cfpa(&mut self) -> Result<Cfpa, u32>[src]

Reads CFPA without use of bootrom. Appears that the bootrom method sometimes returns previous versions of the CFPA page (not seen on scratch, ping, or pong pages). This method always returns the most recently updated Cfpa from ping or pong pages.

pub fn read_cfpa_ping(&mut self) -> Result<Cfpa, u32>[src]

pub fn read_cfpa_pong(&mut self) -> Result<Cfpa, u32>[src]

pub fn write_cfpa(&mut self, cfpa: &Cfpa) -> Result<(), u32>[src]

pub fn read_key_code(&mut self, key_type: KeyType) -> Result<[u8; 52], u32>[src]

pub fn read_activation_code(&mut self) -> Result<[u8; 1192], u32>[src]

pub fn lock_all(&mut self) -> Result<(), u32>[src]

Set write protection to PFR pages. Lasts until next power on reset.

Auto Trait Implementations

impl<State> Send for Pfr<State> where
    State: Send

impl<State> Sync for Pfr<State> where
    State: Sync

impl<State> Unpin for Pfr<State> where
    State: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.