pub type R = crate::R<CKPROTRrs>;
pub type W = crate::W<CKPROTRrs>;
pub type XSPICKP_R = crate::BitReader;
pub type XSPICKP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FMCCKP_R = crate::BitReader;
pub type FMCCKP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type XSPI1SWP_R = crate::FieldReader;
pub type XSPI2SWP_R = crate::FieldReader;
pub type FMCSWP_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn xspickp(&self) -> XSPICKP_R {
XSPICKP_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn fmcckp(&self) -> FMCCKP_R {
FMCCKP_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn xspi1swp(&self) -> XSPI1SWP_R {
XSPI1SWP_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn xspi2swp(&self) -> XSPI2SWP_R {
XSPI2SWP_R::new(((self.bits >> 8) & 7) as u8)
}
#[inline(always)]
pub fn fmcswp(&self) -> FMCSWP_R {
FMCSWP_R::new(((self.bits >> 12) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CKPROTR")
.field("xspickp", &self.xspickp())
.field("fmcckp", &self.fmcckp())
.field("xspi1swp", &self.xspi1swp())
.field("xspi2swp", &self.xspi2swp())
.field("fmcswp", &self.fmcswp())
.finish()
}
}
impl W {
#[inline(always)]
pub fn xspickp(&mut self) -> XSPICKP_W<CKPROTRrs> {
XSPICKP_W::new(self, 0)
}
#[inline(always)]
pub fn fmcckp(&mut self) -> FMCCKP_W<CKPROTRrs> {
FMCCKP_W::new(self, 1)
}
}
pub struct CKPROTRrs;
impl crate::RegisterSpec for CKPROTRrs {
type Ux = u32;
}
impl crate::Readable for CKPROTRrs {}
impl crate::Writable for CKPROTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CKPROTRrs {}