pub type R = crate::R<SEC1Rrs>;
pub type W = crate::W<SEC1Rrs>;
pub type SEC_SIZE1_R = crate::FieldReader;
pub type SEC_SIZE1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type BOOT_LOCK_R = crate::BitReader;
pub type BOOT_LOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn sec_size1(&self) -> SEC_SIZE1_R {
SEC_SIZE1_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn boot_lock(&self) -> BOOT_LOCK_R {
BOOT_LOCK_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SEC1R")
.field("boot_lock", &self.boot_lock())
.field("sec_size1", &self.sec_size1())
.finish()
}
}
impl W {
#[inline(always)]
pub fn sec_size1(&mut self) -> SEC_SIZE1_W<SEC1Rrs> {
SEC_SIZE1_W::new(self, 0)
}
#[inline(always)]
pub fn boot_lock(&mut self) -> BOOT_LOCK_W<SEC1Rrs> {
BOOT_LOCK_W::new(self, 16)
}
}
pub struct SEC1Rrs;
impl crate::RegisterSpec for SEC1Rrs {
type Ux = u32;
}
impl crate::Readable for SEC1Rrs {}
impl crate::Writable for SEC1Rrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for SEC1Rrs {
const RESET_VALUE: u32 = 0xff00_ff00;
}