pub type R = crate::R<OPTCRrs>;
pub type W = crate::W<OPTCRrs>;
pub type OPTLOCK_R = crate::BitReader;
pub type OPTLOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OPTSTART_R = crate::BitReader;
pub type OPTSTART_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OPTCHANGEERRIE_R = crate::BitReader;
pub type OPTCHANGEERRIE_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn optlock(&self) -> OPTLOCK_R {
OPTLOCK_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn optstart(&self) -> OPTSTART_R {
OPTSTART_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn optchangeerrie(&self) -> OPTCHANGEERRIE_R {
OPTCHANGEERRIE_R::new(((self.bits >> 30) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("OPTCR")
.field("optlock", &self.optlock())
.field("optstart", &self.optstart())
.field("optchangeerrie", &self.optchangeerrie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn optlock(&mut self) -> OPTLOCK_W<OPTCRrs> {
OPTLOCK_W::new(self, 0)
}
#[inline(always)]
pub fn optstart(&mut self) -> OPTSTART_W<OPTCRrs> {
OPTSTART_W::new(self, 1)
}
#[inline(always)]
pub fn optchangeerrie(&mut self) -> OPTCHANGEERRIE_W<OPTCRrs> {
OPTCHANGEERRIE_W::new(self, 30)
}
}
pub struct OPTCRrs;
impl crate::RegisterSpec for OPTCRrs {
type Ux = u32;
}
impl crate::Readable for OPTCRrs {}
impl crate::Writable for OPTCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for OPTCRrs {}