pub type R = crate::R<CTRLrs>;
pub type W = crate::W<CTRLrs>;
pub type EnR = crate::BitReader;
pub type EnW<'a, REG> = crate::BitWriter<'a, REG>;
pub type PolyselR = crate::BitReader;
pub type PolyselW<'a, REG> = crate::BitWriter<'a, REG>;
pub type BytemodeR = crate::BitReader;
pub type BytemodeW<'a, REG> = crate::BitWriter<'a, REG>;
pub type BitreverseR = crate::BitReader;
pub type BitreverseW<'a, REG> = crate::BitWriter<'a, REG>;
pub type BytereverseR = crate::BitReader;
pub type BytereverseW<'a, REG> = crate::BitWriter<'a, REG>;
pub type AutoinitR = crate::BitReader;
pub type AutoinitW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn en(&self) -> EnR {
EnR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn polysel(&self) -> PolyselR {
PolyselR::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn bytemode(&self) -> BytemodeR {
BytemodeR::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn bitreverse(&self) -> BitreverseR {
BitreverseR::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn bytereverse(&self) -> BytereverseR {
BytereverseR::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn autoinit(&self) -> AutoinitR {
AutoinitR::new(((self.bits >> 13) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CTRL")
.field("en", &self.en())
.field("polysel", &self.polysel())
.field("bytemode", &self.bytemode())
.field("bitreverse", &self.bitreverse())
.field("bytereverse", &self.bytereverse())
.field("autoinit", &self.autoinit())
.finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self) -> EnW<'_, CTRLrs> {
EnW::new(self, 0)
}
#[inline(always)]
pub fn polysel(&mut self) -> PolyselW<'_, CTRLrs> {
PolyselW::new(self, 4)
}
#[inline(always)]
pub fn bytemode(&mut self) -> BytemodeW<'_, CTRLrs> {
BytemodeW::new(self, 8)
}
#[inline(always)]
pub fn bitreverse(&mut self) -> BitreverseW<'_, CTRLrs> {
BitreverseW::new(self, 9)
}
#[inline(always)]
pub fn bytereverse(&mut self) -> BytereverseW<'_, CTRLrs> {
BytereverseW::new(self, 10)
}
#[inline(always)]
pub fn autoinit(&mut self) -> AutoinitW<'_, CTRLrs> {
AutoinitW::new(self, 13)
}
}
pub struct CTRLrs;
impl crate::RegisterSpec for CTRLrs {
type Ux = u32;
}
impl crate::Readable for CTRLrs {}
impl crate::Writable for CTRLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CTRLrs {}