pub type R = crate::R<CRCCRrs>;
pub type W = crate::W<CRCCRrs>;
pub type CRC_SECT_R = crate::FieldReader;
pub type CRC_SECT_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type CRC_BY_SECT_R = crate::BitReader;
pub type CRC_BY_SECT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADD_SECT_R = crate::BitReader;
pub type ADD_SECT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CLEAN_SECT_R = crate::BitReader;
pub type CLEAN_SECT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type START_CRC_R = crate::BitReader;
pub type START_CRC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CLEAN_CRC_R = crate::BitReader;
pub type CLEAN_CRC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CRC_BURST_R = crate::FieldReader;
pub type CRC_BURST_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type ALL_BANK_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn crc_sect(&self) -> CRC_SECT_R {
CRC_SECT_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn crc_by_sect(&self) -> CRC_BY_SECT_R {
CRC_BY_SECT_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn add_sect(&self) -> ADD_SECT_R {
ADD_SECT_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn clean_sect(&self) -> CLEAN_SECT_R {
CLEAN_SECT_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn start_crc(&self) -> START_CRC_R {
START_CRC_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn clean_crc(&self) -> CLEAN_CRC_R {
CLEAN_CRC_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn crc_burst(&self) -> CRC_BURST_R {
CRC_BURST_R::new(((self.bits >> 20) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CRCCR")
.field("crc_sect", &self.crc_sect())
.field("crc_by_sect", &self.crc_by_sect())
.field("add_sect", &self.add_sect())
.field("clean_sect", &self.clean_sect())
.field("start_crc", &self.start_crc())
.field("clean_crc", &self.clean_crc())
.field("crc_burst", &self.crc_burst())
.finish()
}
}
impl W {
#[inline(always)]
pub fn crc_sect(&mut self) -> CRC_SECT_W<CRCCRrs> {
CRC_SECT_W::new(self, 0)
}
#[inline(always)]
pub fn crc_by_sect(&mut self) -> CRC_BY_SECT_W<CRCCRrs> {
CRC_BY_SECT_W::new(self, 8)
}
#[inline(always)]
pub fn add_sect(&mut self) -> ADD_SECT_W<CRCCRrs> {
ADD_SECT_W::new(self, 9)
}
#[inline(always)]
pub fn clean_sect(&mut self) -> CLEAN_SECT_W<CRCCRrs> {
CLEAN_SECT_W::new(self, 10)
}
#[inline(always)]
pub fn start_crc(&mut self) -> START_CRC_W<CRCCRrs> {
START_CRC_W::new(self, 16)
}
#[inline(always)]
pub fn clean_crc(&mut self) -> CLEAN_CRC_W<CRCCRrs> {
CLEAN_CRC_W::new(self, 17)
}
#[inline(always)]
pub fn crc_burst(&mut self) -> CRC_BURST_W<CRCCRrs> {
CRC_BURST_W::new(self, 20)
}
#[inline(always)]
pub fn all_bank(&mut self) -> ALL_BANK_W<CRCCRrs> {
ALL_BANK_W::new(self, 22)
}
}
pub struct CRCCRrs;
impl crate::RegisterSpec for CRCCRrs {
type Ux = u32;
}
impl crate::Readable for CRCCRrs {}
impl crate::Writable for CRCCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRCCRrs {}