pub trait WriteProtect: WriteProtectKey + WpmrWpsrRegs {
// Provided methods
fn enable_writeprotect(&mut self) { ... }
fn disable_writeprotect(&mut self) { ... }
fn writeprotect_enabled(&self) -> bool { ... }
fn writeprotect_error(&self) -> bool { ... }
fn writeprotect_error_addr(
&self,
) -> Option<<<Self::Wpsr as WpsrRead>::R as WpsrReadFields>::Addr> { ... }
unsafe fn writeprotect_error_addr_unchecked(
&self,
) -> <<Self::Wpsr as WpsrRead>::R as WpsrReadFields>::Addr { ... }
}Provided Methods§
fn enable_writeprotect(&mut self)
fn disable_writeprotect(&mut self)
fn writeprotect_enabled(&self) -> bool
Sourcefn writeprotect_error(&self) -> bool
fn writeprotect_error(&self) -> bool
Check if a peripheral with write protection capability is indicating a write protection error.
Sourcefn writeprotect_error_addr(
&self,
) -> Option<<<Self::Wpsr as WpsrRead>::R as WpsrReadFields>::Addr>
fn writeprotect_error_addr( &self, ) -> Option<<<Self::Wpsr as WpsrRead>::R as WpsrReadFields>::Addr>
Check if the write protect status register of a peripheral with write protection capability
is indicating that a write protection error has occurred, and if it has, return the address
of the register write request that generated the error. Otherwise, None is returned.
Sourceunsafe fn writeprotect_error_addr_unchecked(
&self,
) -> <<Self::Wpsr as WpsrRead>::R as WpsrReadFields>::Addr
unsafe fn writeprotect_error_addr_unchecked( &self, ) -> <<Self::Wpsr as WpsrRead>::R as WpsrReadFields>::Addr
Read the value from the WPROTADDR field of the write protection status register of a
peripheral with write protection capability without checking the WPROTERR flag.
§Safety
The value held in this register may be nonsensical if the WPROTERR flag is not indicating
that a write protection error has occured, thus it is recommended to use the
writeprotect_error_addr
method instead.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
impl WriteProtect for DACC
The DACC has write protection on the following fields:
- Mode register (
DACC_MR) - Channel enable register (
DACC_CHER) - Channel disable register (
DACC_CHDR) - Analog current register (
DACC_ACR)
Implementors§
impl WriteProtect for PioA
impl WriteProtect for PioB
impl WriteProtect for PioC
impl WriteProtect for PioD
impl<Pio: PioRegisters> WriteProtect for Pio
PIO types have write protection on the following fields:
- PIO Enable Register (
PIO_PER) - PIO Disable Register (
PIO_PDR) - Output Enable Register (
PIO_OER) - Output Disable Register (
PIO_ODR) - Input Filter Enable Register (
PIO_IFER) - Input Filter Disable Register (
PIO_IDER) - Multi-driver Enable Register (
PIO_MDER) - Multi-driver Disable Register (
PIO_MDDR) - Pull Up Enable Register (
PIO_PUER) - Pull Up Disable Register (
PIO_PUDR)- Peripheral AB Select Register (
PIO_ABSR)
- Peripheral AB Select Register (
- Output Write Enable Register (
PIO_OWER) - Output Write Disable Register (
PIO_OWDR)