pub type R = crate::R<OTP_LOCKrs>;
pub type W = crate::W<OTP_LOCKrs>;
pub type OTP_R = crate::BitReader;
pub type OTP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ROMLOCK_R = crate::BitReader;
pub type ROMLOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DENREG_R = crate::BitReader;
pub type DENREG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GPLOCK_R = crate::BitReader;
pub type GPLOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn otp(&self) -> OTP_R {
OTP_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn romlock(&self) -> ROMLOCK_R {
ROMLOCK_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn denreg(&self) -> DENREG_R {
DENREG_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn gplock(&self) -> GPLOCK_R {
GPLOCK_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("OTP_LOCK")
.field("otp", &self.otp())
.field("romlock", &self.romlock())
.field("denreg", &self.denreg())
.field("gplock", &self.gplock())
.finish()
}
}
impl W {
#[inline(always)]
pub fn otp(&mut self) -> OTP_W<OTP_LOCKrs> {
OTP_W::new(self, 0)
}
#[inline(always)]
pub fn romlock(&mut self) -> ROMLOCK_W<OTP_LOCKrs> {
ROMLOCK_W::new(self, 1)
}
#[inline(always)]
pub fn denreg(&mut self) -> DENREG_W<OTP_LOCKrs> {
DENREG_W::new(self, 2)
}
#[inline(always)]
pub fn gplock(&mut self) -> GPLOCK_W<OTP_LOCKrs> {
GPLOCK_W::new(self, 4)
}
}
pub struct OTP_LOCKrs;
impl crate::RegisterSpec for OTP_LOCKrs {
type Ux = u32;
}
impl crate::Readable for OTP_LOCKrs {}
impl crate::Writable for OTP_LOCKrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for OTP_LOCKrs {}