pub type W = crate::W<CRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RESETW {
Reset = 1,
}
impl From<RESETW> for bool {
#[inline(always)]
fn from(variant: RESETW) -> Self {
variant as u8 != 0
}
}
pub type RESET_W<'a, REG> = crate::BitWriter<'a, REG, RESETW>;
impl<'a, REG> RESET_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn reset(self) -> &'a mut crate::W<REG> {
self.variant(RESETW::Reset)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum POLYSIZE {
Polysize32 = 0,
Polysize16 = 1,
Polysize8 = 2,
Polysize7 = 3,
}
impl From<POLYSIZE> for u8 {
#[inline(always)]
fn from(variant: POLYSIZE) -> Self {
variant as _
}
}
impl crate::FieldSpec for POLYSIZE {
type Ux = u8;
}
impl crate::IsEnum for POLYSIZE {}
pub type POLYSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 2, POLYSIZE, crate::Safe>;
impl<'a, REG> POLYSIZE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn polysize32(self) -> &'a mut crate::W<REG> {
self.variant(POLYSIZE::Polysize32)
}
#[inline(always)]
pub fn polysize16(self) -> &'a mut crate::W<REG> {
self.variant(POLYSIZE::Polysize16)
}
#[inline(always)]
pub fn polysize8(self) -> &'a mut crate::W<REG> {
self.variant(POLYSIZE::Polysize8)
}
#[inline(always)]
pub fn polysize7(self) -> &'a mut crate::W<REG> {
self.variant(POLYSIZE::Polysize7)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum REV_IN {
Normal = 0,
Byte = 1,
HalfWord = 2,
Word = 3,
}
impl From<REV_IN> for u8 {
#[inline(always)]
fn from(variant: REV_IN) -> Self {
variant as _
}
}
impl crate::FieldSpec for REV_IN {
type Ux = u8;
}
impl crate::IsEnum for REV_IN {}
pub type REV_IN_W<'a, REG> = crate::FieldWriter<'a, REG, 2, REV_IN, crate::Safe>;
impl<'a, REG> REV_IN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn normal(self) -> &'a mut crate::W<REG> {
self.variant(REV_IN::Normal)
}
#[inline(always)]
pub fn byte(self) -> &'a mut crate::W<REG> {
self.variant(REV_IN::Byte)
}
#[inline(always)]
pub fn half_word(self) -> &'a mut crate::W<REG> {
self.variant(REV_IN::HalfWord)
}
#[inline(always)]
pub fn word(self) -> &'a mut crate::W<REG> {
self.variant(REV_IN::Word)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum REV_OUT {
Normal = 0,
Reversed = 1,
}
impl From<REV_OUT> for bool {
#[inline(always)]
fn from(variant: REV_OUT) -> Self {
variant as u8 != 0
}
}
pub type REV_OUT_W<'a, REG> = crate::BitWriter<'a, REG, REV_OUT>;
impl<'a, REG> REV_OUT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn normal(self) -> &'a mut crate::W<REG> {
self.variant(REV_OUT::Normal)
}
#[inline(always)]
pub fn reversed(self) -> &'a mut crate::W<REG> {
self.variant(REV_OUT::Reversed)
}
}
impl core::fmt::Debug for crate::generic::Reg<CRrs> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "(not readable)")
}
}
impl W {
#[inline(always)]
pub fn reset(&mut self) -> RESET_W<CRrs> {
RESET_W::new(self, 0)
}
#[inline(always)]
pub fn polysize(&mut self) -> POLYSIZE_W<CRrs> {
POLYSIZE_W::new(self, 3)
}
#[inline(always)]
pub fn rev_in(&mut self) -> REV_IN_W<CRrs> {
REV_IN_W::new(self, 5)
}
#[inline(always)]
pub fn rev_out(&mut self) -> REV_OUT_W<CRrs> {
REV_OUT_W::new(self, 7)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}