Struct stm32_metapac::flash::regs::Optcr
#[repr(transparent)]pub struct Optcr(pub u32);
Expand description
FLASH options control register.
Tuple Fields§
§0: u32
Implementations§
§impl Optcr
impl Optcr
pub const fn optlock(&self) -> bool
pub const fn optlock(&self) -> bool
Options lock When this bit is set write to all other bits in this register, and write to OTP words, option bytes and option bytes keys control registers, are ignored. Clearing this bit requires the correct write sequence to FLASH_OPTKEYR register (see this register for details). If a wrong sequence is executed, or the unlock sequence is performed twice, this bit remains locked until next system reset. During the write access to set LOCK bit from 0 to 1, it is possible to change the other bits of this register.
pub fn set_optlock(&mut self, val: bool)
pub fn set_optlock(&mut self, val: bool)
Options lock When this bit is set write to all other bits in this register, and write to OTP words, option bytes and option bytes keys control registers, are ignored. Clearing this bit requires the correct write sequence to FLASH_OPTKEYR register (see this register for details). If a wrong sequence is executed, or the unlock sequence is performed twice, this bit remains locked until next system reset. During the write access to set LOCK bit from 0 to 1, it is possible to change the other bits of this register.
pub fn set_pg_opt(&mut self, val: bool)
pub fn set_pg_opt(&mut self, val: bool)
Program options.
pub const fn kveie(&self) -> bool
pub const fn kveie(&self) -> bool
Key valid error interrupt enable bit This bit controls if an interrupt has to be generated when KVEF is set in FLASH_OPTISR.
pub fn set_kveie(&mut self, val: bool)
pub fn set_kveie(&mut self, val: bool)
Key valid error interrupt enable bit This bit controls if an interrupt has to be generated when KVEF is set in FLASH_OPTISR.
pub const fn kteie(&self) -> bool
pub const fn kteie(&self) -> bool
Key transfer error interrupt enable bit This bit controls if an interrupt has to be generated when KTEF is set in FLASH_OPTISR.
pub fn set_kteie(&mut self, val: bool)
pub fn set_kteie(&mut self, val: bool)
Key transfer error interrupt enable bit This bit controls if an interrupt has to be generated when KTEF is set in FLASH_OPTISR.
pub const fn opterrie(&self) -> bool
pub const fn opterrie(&self) -> bool
Option byte change error interrupt enable bit This bit controls if an interrupt has to be generated when an error occurs during an option byte change.
pub fn set_opterrie(&mut self, val: bool)
pub fn set_opterrie(&mut self, val: bool)
Option byte change error interrupt enable bit This bit controls if an interrupt has to be generated when an error occurs during an option byte change.
Trait Implementations§
impl Copy for Optcr
impl Eq for Optcr
impl StructuralPartialEq for Optcr
Auto Trait Implementations§
impl Freeze for Optcr
impl RefUnwindSafe for Optcr
impl Send for Optcr
impl Sync for Optcr
impl Unpin for Optcr
impl UnwindSafe for Optcr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)