pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type ALGODIR_R = crate::BitReader;
pub type ALGODIR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ALGOMODE0_R = crate::FieldReader;
pub type ALGOMODE0_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type DATATYPE_R = crate::FieldReader;
pub type DATATYPE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type KEYSIZE_R = crate::FieldReader;
pub type KEYSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type FFLUSH_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CRYPEN_R = crate::BitReader;
pub type CRYPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GCM_CCMPH_R = crate::FieldReader;
pub type GCM_CCMPH_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type ALGOMODE3_R = crate::BitReader;
pub type ALGOMODE3_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn algodir(&self) -> ALGODIR_R {
ALGODIR_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn algomode0(&self) -> ALGOMODE0_R {
ALGOMODE0_R::new(((self.bits >> 3) & 7) as u8)
}
#[inline(always)]
pub fn datatype(&self) -> DATATYPE_R {
DATATYPE_R::new(((self.bits >> 6) & 3) as u8)
}
#[inline(always)]
pub fn keysize(&self) -> KEYSIZE_R {
KEYSIZE_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn crypen(&self) -> CRYPEN_R {
CRYPEN_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn gcm_ccmph(&self) -> GCM_CCMPH_R {
GCM_CCMPH_R::new(((self.bits >> 16) & 3) as u8)
}
#[inline(always)]
pub fn algomode3(&self) -> ALGOMODE3_R {
ALGOMODE3_R::new(((self.bits >> 19) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("algodir", &self.algodir())
.field("algomode0", &self.algomode0())
.field("datatype", &self.datatype())
.field("keysize", &self.keysize())
.field("crypen", &self.crypen())
.field("gcm_ccmph", &self.gcm_ccmph())
.field("algomode3", &self.algomode3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn algodir(&mut self) -> ALGODIR_W<CRrs> {
ALGODIR_W::new(self, 2)
}
#[inline(always)]
pub fn algomode0(&mut self) -> ALGOMODE0_W<CRrs> {
ALGOMODE0_W::new(self, 3)
}
#[inline(always)]
pub fn datatype(&mut self) -> DATATYPE_W<CRrs> {
DATATYPE_W::new(self, 6)
}
#[inline(always)]
pub fn keysize(&mut self) -> KEYSIZE_W<CRrs> {
KEYSIZE_W::new(self, 8)
}
#[inline(always)]
pub fn fflush(&mut self) -> FFLUSH_W<CRrs> {
FFLUSH_W::new(self, 14)
}
#[inline(always)]
pub fn crypen(&mut self) -> CRYPEN_W<CRrs> {
CRYPEN_W::new(self, 15)
}
#[inline(always)]
pub fn gcm_ccmph(&mut self) -> GCM_CCMPH_W<CRrs> {
GCM_CCMPH_W::new(self, 16)
}
#[inline(always)]
pub fn algomode3(&mut self) -> ALGOMODE3_W<CRrs> {
ALGOMODE3_W::new(self, 19)
}
}
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 {}