pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type GLOCK_R = crate::BitReader;
pub type GLOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MKLOCK_R = crate::BitReader;
pub type MKLOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn glock(&self) -> GLOCK_R {
GLOCK_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn mklock(&self) -> MKLOCK_R {
MKLOCK_R::new(((self.bits >> 1) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("glock", &self.glock())
.field("mklock", &self.mklock())
.finish()
}
}
impl W {
#[inline(always)]
pub fn glock(&mut self) -> GLOCK_W<CRrs> {
GLOCK_W::new(self, 0)
}
#[inline(always)]
pub fn mklock(&mut self) -> MKLOCK_W<CRrs> {
MKLOCK_W::new(self, 1)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}