#[doc = "Register `DCFG3` reader"]
pub struct R(crate::R<DCFG3_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<DCFG3_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<DCFG3_SPEC>> for R {
    fn from(reader: crate::R<DCFG3_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `DCFG3` writer"]
pub struct W(crate::W<DCFG3_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<DCFG3_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl core::convert::From<crate::W<DCFG3_SPEC>> for W {
    fn from(writer: crate::W<DCFG3_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Dynamic compare selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CMP_SEL_A {
    #[doc = "0: No description available"]
    CFG_A = 0,
    #[doc = "1: No description available"]
    CFG_B = 1,
}
impl From<CMP_SEL_A> for bool {
    #[inline(always)]
    fn from(variant: CMP_SEL_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CMP_SEL` reader - Dynamic compare selection"]
pub struct CMP_SEL_R(crate::FieldReader<bool, CMP_SEL_A>);
impl CMP_SEL_R {
    pub(crate) fn new(bits: bool) -> Self {
        CMP_SEL_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CMP_SEL_A {
        match self.bits {
            false => CMP_SEL_A::CFG_A,
            true => CMP_SEL_A::CFG_B,
        }
    }
    #[doc = "Checks if the value of the field is `CFG_A`"]
    #[inline(always)]
    pub fn is_cfg_a(&self) -> bool {
        **self == CMP_SEL_A::CFG_A
    }
    #[doc = "Checks if the value of the field is `CFG_B`"]
    #[inline(always)]
    pub fn is_cfg_b(&self) -> bool {
        **self == CMP_SEL_A::CFG_B
    }
}
impl core::ops::Deref for CMP_SEL_R {
    type Target = crate::FieldReader<bool, CMP_SEL_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `CMP_SEL` writer - Dynamic compare selection"]
pub struct CMP_SEL_W<'a> {
    w: &'a mut W,
}
impl<'a> CMP_SEL_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: CMP_SEL_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cfg_a(self) -> &'a mut W {
        self.variant(CMP_SEL_A::CFG_A)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cfg_b(self) -> &'a mut W {
        self.variant(CMP_SEL_A::CFG_B)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !0x01) | (value as u16 & 0x01);
        self.w
    }
}
#[doc = "Dynamic shift in selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SI_SEL_A {
    #[doc = "0: No description available"]
    CFG_A = 0,
    #[doc = "1: No description available"]
    CFG_B = 1,
}
impl From<SI_SEL_A> for bool {
    #[inline(always)]
    fn from(variant: SI_SEL_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SI_SEL` reader - Dynamic shift in selection"]
pub struct SI_SEL_R(crate::FieldReader<bool, SI_SEL_A>);
impl SI_SEL_R {
    pub(crate) fn new(bits: bool) -> Self {
        SI_SEL_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SI_SEL_A {
        match self.bits {
            false => SI_SEL_A::CFG_A,
            true => SI_SEL_A::CFG_B,
        }
    }
    #[doc = "Checks if the value of the field is `CFG_A`"]
    #[inline(always)]
    pub fn is_cfg_a(&self) -> bool {
        **self == SI_SEL_A::CFG_A
    }
    #[doc = "Checks if the value of the field is `CFG_B`"]
    #[inline(always)]
    pub fn is_cfg_b(&self) -> bool {
        **self == SI_SEL_A::CFG_B
    }
}
impl core::ops::Deref for SI_SEL_R {
    type Target = crate::FieldReader<bool, SI_SEL_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `SI_SEL` writer - Dynamic shift in selection"]
pub struct SI_SEL_W<'a> {
    w: &'a mut W,
}
impl<'a> SI_SEL_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SI_SEL_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cfg_a(self) -> &'a mut W {
        self.variant(SI_SEL_A::CFG_A)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cfg_b(self) -> &'a mut W {
        self.variant(SI_SEL_A::CFG_B)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u16 & 0x01) << 1);
        self.w
    }
}
#[doc = "Dynamic carry in selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CI_SEL_A {
    #[doc = "0: No description available"]
    CFG_A = 0,
    #[doc = "1: No description available"]
    CFG_B = 1,
}
impl From<CI_SEL_A> for bool {
    #[inline(always)]
    fn from(variant: CI_SEL_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CI_SEL` reader - Dynamic carry in selection"]
pub struct CI_SEL_R(crate::FieldReader<bool, CI_SEL_A>);
impl CI_SEL_R {
    pub(crate) fn new(bits: bool) -> Self {
        CI_SEL_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CI_SEL_A {
        match self.bits {
            false => CI_SEL_A::CFG_A,
            true => CI_SEL_A::CFG_B,
        }
    }
    #[doc = "Checks if the value of the field is `CFG_A`"]
    #[inline(always)]
    pub fn is_cfg_a(&self) -> bool {
        **self == CI_SEL_A::CFG_A
    }
    #[doc = "Checks if the value of the field is `CFG_B`"]
    #[inline(always)]
    pub fn is_cfg_b(&self) -> bool {
        **self == CI_SEL_A::CFG_B
    }
}
impl core::ops::Deref for CI_SEL_R {
    type Target = crate::FieldReader<bool, CI_SEL_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `CI_SEL` writer - Dynamic carry in selection"]
pub struct CI_SEL_W<'a> {
    w: &'a mut W,
}
impl<'a> CI_SEL_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: CI_SEL_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cfg_a(self) -> &'a mut W {
        self.variant(CI_SEL_A::CFG_A)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cfg_b(self) -> &'a mut W {
        self.variant(CI_SEL_A::CFG_B)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u16 & 0x01) << 2);
        self.w
    }
}
#[doc = "Dynamic CRC feedback selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CFB_EN_A {
    #[doc = "0: No description available"]
    DISABLE = 0,
    #[doc = "1: No description available"]
    ENABLE = 1,
}
impl From<CFB_EN_A> for bool {
    #[inline(always)]
    fn from(variant: CFB_EN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CFB_EN` reader - Dynamic CRC feedback selection"]
pub struct CFB_EN_R(crate::FieldReader<bool, CFB_EN_A>);
impl CFB_EN_R {
    pub(crate) fn new(bits: bool) -> Self {
        CFB_EN_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CFB_EN_A {
        match self.bits {
            false => CFB_EN_A::DISABLE,
            true => CFB_EN_A::ENABLE,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLE`"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        **self == CFB_EN_A::DISABLE
    }
    #[doc = "Checks if the value of the field is `ENABLE`"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        **self == CFB_EN_A::ENABLE
    }
}
impl core::ops::Deref for CFB_EN_R {
    type Target = crate::FieldReader<bool, CFB_EN_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `CFB_EN` writer - Dynamic CRC feedback selection"]
pub struct CFB_EN_W<'a> {
    w: &'a mut W,
}
impl<'a> CFB_EN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: CFB_EN_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut W {
        self.variant(CFB_EN_A::DISABLE)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut W {
        self.variant(CFB_EN_A::ENABLE)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u16 & 0x01) << 3);
        self.w
    }
}
#[doc = "Dynamic A1 write source selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum A1_WR_SRC_A {
    #[doc = "0: No description available"]
    NOWRITE = 0,
    #[doc = "1: No description available"]
    ALU = 1,
    #[doc = "2: No description available"]
    D1 = 2,
    #[doc = "3: No description available"]
    F1 = 3,
}
impl From<A1_WR_SRC_A> for u8 {
    #[inline(always)]
    fn from(variant: A1_WR_SRC_A) -> Self {
        variant as _
    }
}
#[doc = "Field `A1_WR_SRC` reader - Dynamic A1 write source selection"]
pub struct A1_WR_SRC_R(crate::FieldReader<u8, A1_WR_SRC_A>);
impl A1_WR_SRC_R {
    pub(crate) fn new(bits: u8) -> Self {
        A1_WR_SRC_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> A1_WR_SRC_A {
        match self.bits {
            0 => A1_WR_SRC_A::NOWRITE,
            1 => A1_WR_SRC_A::ALU,
            2 => A1_WR_SRC_A::D1,
            3 => A1_WR_SRC_A::F1,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `NOWRITE`"]
    #[inline(always)]
    pub fn is_nowrite(&self) -> bool {
        **self == A1_WR_SRC_A::NOWRITE
    }
    #[doc = "Checks if the value of the field is `ALU`"]
    #[inline(always)]
    pub fn is_alu(&self) -> bool {
        **self == A1_WR_SRC_A::ALU
    }
    #[doc = "Checks if the value of the field is `D1`"]
    #[inline(always)]
    pub fn is_d1(&self) -> bool {
        **self == A1_WR_SRC_A::D1
    }
    #[doc = "Checks if the value of the field is `F1`"]
    #[inline(always)]
    pub fn is_f1(&self) -> bool {
        **self == A1_WR_SRC_A::F1
    }
}
impl core::ops::Deref for A1_WR_SRC_R {
    type Target = crate::FieldReader<u8, A1_WR_SRC_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `A1_WR_SRC` writer - Dynamic A1 write source selection"]
pub struct A1_WR_SRC_W<'a> {
    w: &'a mut W,
}
impl<'a> A1_WR_SRC_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: A1_WR_SRC_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn nowrite(self) -> &'a mut W {
        self.variant(A1_WR_SRC_A::NOWRITE)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn alu(self) -> &'a mut W {
        self.variant(A1_WR_SRC_A::ALU)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn d1(self) -> &'a mut W {
        self.variant(A1_WR_SRC_A::D1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f1(self) -> &'a mut W {
        self.variant(A1_WR_SRC_A::F1)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u16 & 0x03) << 4);
        self.w
    }
}
#[doc = "Dynamic A0 write source selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum A0_WR_SRC_A {
    #[doc = "0: No description available"]
    NOWRITE = 0,
    #[doc = "1: No description available"]
    ALU = 1,
    #[doc = "2: No description available"]
    D0 = 2,
    #[doc = "3: No description available"]
    F0 = 3,
}
impl From<A0_WR_SRC_A> for u8 {
    #[inline(always)]
    fn from(variant: A0_WR_SRC_A) -> Self {
        variant as _
    }
}
#[doc = "Field `A0_WR_SRC` reader - Dynamic A0 write source selection"]
pub struct A0_WR_SRC_R(crate::FieldReader<u8, A0_WR_SRC_A>);
impl A0_WR_SRC_R {
    pub(crate) fn new(bits: u8) -> Self {
        A0_WR_SRC_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> A0_WR_SRC_A {
        match self.bits {
            0 => A0_WR_SRC_A::NOWRITE,
            1 => A0_WR_SRC_A::ALU,
            2 => A0_WR_SRC_A::D0,
            3 => A0_WR_SRC_A::F0,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `NOWRITE`"]
    #[inline(always)]
    pub fn is_nowrite(&self) -> bool {
        **self == A0_WR_SRC_A::NOWRITE
    }
    #[doc = "Checks if the value of the field is `ALU`"]
    #[inline(always)]
    pub fn is_alu(&self) -> bool {
        **self == A0_WR_SRC_A::ALU
    }
    #[doc = "Checks if the value of the field is `D0`"]
    #[inline(always)]
    pub fn is_d0(&self) -> bool {
        **self == A0_WR_SRC_A::D0
    }
    #[doc = "Checks if the value of the field is `F0`"]
    #[inline(always)]
    pub fn is_f0(&self) -> bool {
        **self == A0_WR_SRC_A::F0
    }
}
impl core::ops::Deref for A0_WR_SRC_R {
    type Target = crate::FieldReader<u8, A0_WR_SRC_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `A0_WR_SRC` writer - Dynamic A0 write source selection"]
pub struct A0_WR_SRC_W<'a> {
    w: &'a mut W,
}
impl<'a> A0_WR_SRC_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: A0_WR_SRC_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn nowrite(self) -> &'a mut W {
        self.variant(A0_WR_SRC_A::NOWRITE)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn alu(self) -> &'a mut W {
        self.variant(A0_WR_SRC_A::ALU)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn d0(self) -> &'a mut W {
        self.variant(A0_WR_SRC_A::D0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f0(self) -> &'a mut W {
        self.variant(A0_WR_SRC_A::F0)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u16 & 0x03) << 6);
        self.w
    }
}
#[doc = "Dynamic shift selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum SHIFT_A {
    #[doc = "0: No description available"]
    NOSHIFT = 0,
    #[doc = "1: No description available"]
    LEFT = 1,
    #[doc = "2: No description available"]
    RIGHT = 2,
    #[doc = "3: No description available"]
    SWAP = 3,
}
impl From<SHIFT_A> for u8 {
    #[inline(always)]
    fn from(variant: SHIFT_A) -> Self {
        variant as _
    }
}
#[doc = "Field `SHIFT` reader - Dynamic shift selection"]
pub struct SHIFT_R(crate::FieldReader<u8, SHIFT_A>);
impl SHIFT_R {
    pub(crate) fn new(bits: u8) -> Self {
        SHIFT_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SHIFT_A {
        match self.bits {
            0 => SHIFT_A::NOSHIFT,
            1 => SHIFT_A::LEFT,
            2 => SHIFT_A::RIGHT,
            3 => SHIFT_A::SWAP,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `NOSHIFT`"]
    #[inline(always)]
    pub fn is_noshift(&self) -> bool {
        **self == SHIFT_A::NOSHIFT
    }
    #[doc = "Checks if the value of the field is `LEFT`"]
    #[inline(always)]
    pub fn is_left(&self) -> bool {
        **self == SHIFT_A::LEFT
    }
    #[doc = "Checks if the value of the field is `RIGHT`"]
    #[inline(always)]
    pub fn is_right(&self) -> bool {
        **self == SHIFT_A::RIGHT
    }
    #[doc = "Checks if the value of the field is `SWAP`"]
    #[inline(always)]
    pub fn is_swap(&self) -> bool {
        **self == SHIFT_A::SWAP
    }
}
impl core::ops::Deref for SHIFT_R {
    type Target = crate::FieldReader<u8, SHIFT_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `SHIFT` writer - Dynamic shift selection"]
pub struct SHIFT_W<'a> {
    w: &'a mut W,
}
impl<'a> SHIFT_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SHIFT_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn noshift(self) -> &'a mut W {
        self.variant(SHIFT_A::NOSHIFT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn left(self) -> &'a mut W {
        self.variant(SHIFT_A::LEFT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn right(self) -> &'a mut W {
        self.variant(SHIFT_A::RIGHT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn swap(self) -> &'a mut W {
        self.variant(SHIFT_A::SWAP)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u16 & 0x03) << 8);
        self.w
    }
}
#[doc = "Dynamic ALU source B selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum SRC_B_A {
    #[doc = "0: No description available"]
    D0 = 0,
    #[doc = "1: No description available"]
    D1 = 1,
    #[doc = "2: No description available"]
    A0 = 2,
    #[doc = "3: No description available"]
    A1 = 3,
}
impl From<SRC_B_A> for u8 {
    #[inline(always)]
    fn from(variant: SRC_B_A) -> Self {
        variant as _
    }
}
#[doc = "Field `SRC_B` reader - Dynamic ALU source B selection"]
pub struct SRC_B_R(crate::FieldReader<u8, SRC_B_A>);
impl SRC_B_R {
    pub(crate) fn new(bits: u8) -> Self {
        SRC_B_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SRC_B_A {
        match self.bits {
            0 => SRC_B_A::D0,
            1 => SRC_B_A::D1,
            2 => SRC_B_A::A0,
            3 => SRC_B_A::A1,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `D0`"]
    #[inline(always)]
    pub fn is_d0(&self) -> bool {
        **self == SRC_B_A::D0
    }
    #[doc = "Checks if the value of the field is `D1`"]
    #[inline(always)]
    pub fn is_d1(&self) -> bool {
        **self == SRC_B_A::D1
    }
    #[doc = "Checks if the value of the field is `A0`"]
    #[inline(always)]
    pub fn is_a0(&self) -> bool {
        **self == SRC_B_A::A0
    }
    #[doc = "Checks if the value of the field is `A1`"]
    #[inline(always)]
    pub fn is_a1(&self) -> bool {
        **self == SRC_B_A::A1
    }
}
impl core::ops::Deref for SRC_B_R {
    type Target = crate::FieldReader<u8, SRC_B_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `SRC_B` writer - Dynamic ALU source B selection"]
pub struct SRC_B_W<'a> {
    w: &'a mut W,
}
impl<'a> SRC_B_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SRC_B_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn d0(self) -> &'a mut W {
        self.variant(SRC_B_A::D0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn d1(self) -> &'a mut W {
        self.variant(SRC_B_A::D1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn a0(self) -> &'a mut W {
        self.variant(SRC_B_A::A0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn a1(self) -> &'a mut W {
        self.variant(SRC_B_A::A1)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u16 & 0x03) << 10);
        self.w
    }
}
#[doc = "Dynamic ALU source A selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SRC_A_A {
    #[doc = "0: No description available"]
    A0 = 0,
    #[doc = "1: No description available"]
    A1 = 1,
}
impl From<SRC_A_A> for bool {
    #[inline(always)]
    fn from(variant: SRC_A_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SRC_A` reader - Dynamic ALU source A selection"]
pub struct SRC_A_R(crate::FieldReader<bool, SRC_A_A>);
impl SRC_A_R {
    pub(crate) fn new(bits: bool) -> Self {
        SRC_A_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SRC_A_A {
        match self.bits {
            false => SRC_A_A::A0,
            true => SRC_A_A::A1,
        }
    }
    #[doc = "Checks if the value of the field is `A0`"]
    #[inline(always)]
    pub fn is_a0(&self) -> bool {
        **self == SRC_A_A::A0
    }
    #[doc = "Checks if the value of the field is `A1`"]
    #[inline(always)]
    pub fn is_a1(&self) -> bool {
        **self == SRC_A_A::A1
    }
}
impl core::ops::Deref for SRC_A_R {
    type Target = crate::FieldReader<bool, SRC_A_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `SRC_A` writer - Dynamic ALU source A selection"]
pub struct SRC_A_W<'a> {
    w: &'a mut W,
}
impl<'a> SRC_A_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SRC_A_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn a0(self) -> &'a mut W {
        self.variant(SRC_A_A::A0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn a1(self) -> &'a mut W {
        self.variant(SRC_A_A::A1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u16 & 0x01) << 12);
        self.w
    }
}
#[doc = "Dynamic ALU function selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum FUNC_A {
    #[doc = "0: No description available"]
    PASS = 0,
    #[doc = "1: No description available"]
    INC_A = 1,
    #[doc = "2: No description available"]
    DEC_A = 2,
    #[doc = "3: No description available"]
    ADD = 3,
    #[doc = "4: No description available"]
    SUB = 4,
    #[doc = "5: No description available"]
    XOR = 5,
    #[doc = "6: No description available"]
    AND = 6,
    #[doc = "7: No description available"]
    OR = 7,
}
impl From<FUNC_A> for u8 {
    #[inline(always)]
    fn from(variant: FUNC_A) -> Self {
        variant as _
    }
}
#[doc = "Field `FUNC` reader - Dynamic ALU function selection"]
pub struct FUNC_R(crate::FieldReader<u8, FUNC_A>);
impl FUNC_R {
    pub(crate) fn new(bits: u8) -> Self {
        FUNC_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> FUNC_A {
        match self.bits {
            0 => FUNC_A::PASS,
            1 => FUNC_A::INC_A,
            2 => FUNC_A::DEC_A,
            3 => FUNC_A::ADD,
            4 => FUNC_A::SUB,
            5 => FUNC_A::XOR,
            6 => FUNC_A::AND,
            7 => FUNC_A::OR,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `PASS`"]
    #[inline(always)]
    pub fn is_pass(&self) -> bool {
        **self == FUNC_A::PASS
    }
    #[doc = "Checks if the value of the field is `INC_A`"]
    #[inline(always)]
    pub fn is_inc_a(&self) -> bool {
        **self == FUNC_A::INC_A
    }
    #[doc = "Checks if the value of the field is `DEC_A`"]
    #[inline(always)]
    pub fn is_dec_a(&self) -> bool {
        **self == FUNC_A::DEC_A
    }
    #[doc = "Checks if the value of the field is `ADD`"]
    #[inline(always)]
    pub fn is_add(&self) -> bool {
        **self == FUNC_A::ADD
    }
    #[doc = "Checks if the value of the field is `SUB`"]
    #[inline(always)]
    pub fn is_sub(&self) -> bool {
        **self == FUNC_A::SUB
    }
    #[doc = "Checks if the value of the field is `XOR`"]
    #[inline(always)]
    pub fn is_xor(&self) -> bool {
        **self == FUNC_A::XOR
    }
    #[doc = "Checks if the value of the field is `AND`"]
    #[inline(always)]
    pub fn is_and(&self) -> bool {
        **self == FUNC_A::AND
    }
    #[doc = "Checks if the value of the field is `OR`"]
    #[inline(always)]
    pub fn is_or(&self) -> bool {
        **self == FUNC_A::OR
    }
}
impl core::ops::Deref for FUNC_R {
    type Target = crate::FieldReader<u8, FUNC_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `FUNC` writer - Dynamic ALU function selection"]
pub struct FUNC_W<'a> {
    w: &'a mut W,
}
impl<'a> FUNC_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: FUNC_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn pass(self) -> &'a mut W {
        self.variant(FUNC_A::PASS)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn inc_a(self) -> &'a mut W {
        self.variant(FUNC_A::INC_A)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dec_a(self) -> &'a mut W {
        self.variant(FUNC_A::DEC_A)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn add(self) -> &'a mut W {
        self.variant(FUNC_A::ADD)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn sub(self) -> &'a mut W {
        self.variant(FUNC_A::SUB)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn xor(self) -> &'a mut W {
        self.variant(FUNC_A::XOR)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn and(self) -> &'a mut W {
        self.variant(FUNC_A::AND)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn or(self) -> &'a mut W {
        self.variant(FUNC_A::OR)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x07 << 13)) | ((value as u16 & 0x07) << 13);
        self.w
    }
}
impl R {
    #[doc = "Bit 0 - Dynamic compare selection"]
    #[inline(always)]
    pub fn cmp_sel(&self) -> CMP_SEL_R {
        CMP_SEL_R::new((self.bits & 0x01) != 0)
    }
    #[doc = "Bit 1 - Dynamic shift in selection"]
    #[inline(always)]
    pub fn si_sel(&self) -> SI_SEL_R {
        SI_SEL_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2 - Dynamic carry in selection"]
    #[inline(always)]
    pub fn ci_sel(&self) -> CI_SEL_R {
        CI_SEL_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Dynamic CRC feedback selection"]
    #[inline(always)]
    pub fn cfb_en(&self) -> CFB_EN_R {
        CFB_EN_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bits 4:5 - Dynamic A1 write source selection"]
    #[inline(always)]
    pub fn a1_wr_src(&self) -> A1_WR_SRC_R {
        A1_WR_SRC_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 6:7 - Dynamic A0 write source selection"]
    #[inline(always)]
    pub fn a0_wr_src(&self) -> A0_WR_SRC_R {
        A0_WR_SRC_R::new(((self.bits >> 6) & 0x03) as u8)
    }
    #[doc = "Bits 8:9 - Dynamic shift selection"]
    #[inline(always)]
    pub fn shift(&self) -> SHIFT_R {
        SHIFT_R::new(((self.bits >> 8) & 0x03) as u8)
    }
    #[doc = "Bits 10:11 - Dynamic ALU source B selection"]
    #[inline(always)]
    pub fn src_b(&self) -> SRC_B_R {
        SRC_B_R::new(((self.bits >> 10) & 0x03) as u8)
    }
    #[doc = "Bit 12 - Dynamic ALU source A selection"]
    #[inline(always)]
    pub fn src_a(&self) -> SRC_A_R {
        SRC_A_R::new(((self.bits >> 12) & 0x01) != 0)
    }
    #[doc = "Bits 13:15 - Dynamic ALU function selection"]
    #[inline(always)]
    pub fn func(&self) -> FUNC_R {
        FUNC_R::new(((self.bits >> 13) & 0x07) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - Dynamic compare selection"]
    #[inline(always)]
    pub fn cmp_sel(&mut self) -> CMP_SEL_W {
        CMP_SEL_W { w: self }
    }
    #[doc = "Bit 1 - Dynamic shift in selection"]
    #[inline(always)]
    pub fn si_sel(&mut self) -> SI_SEL_W {
        SI_SEL_W { w: self }
    }
    #[doc = "Bit 2 - Dynamic carry in selection"]
    #[inline(always)]
    pub fn ci_sel(&mut self) -> CI_SEL_W {
        CI_SEL_W { w: self }
    }
    #[doc = "Bit 3 - Dynamic CRC feedback selection"]
    #[inline(always)]
    pub fn cfb_en(&mut self) -> CFB_EN_W {
        CFB_EN_W { w: self }
    }
    #[doc = "Bits 4:5 - Dynamic A1 write source selection"]
    #[inline(always)]
    pub fn a1_wr_src(&mut self) -> A1_WR_SRC_W {
        A1_WR_SRC_W { w: self }
    }
    #[doc = "Bits 6:7 - Dynamic A0 write source selection"]
    #[inline(always)]
    pub fn a0_wr_src(&mut self) -> A0_WR_SRC_W {
        A0_WR_SRC_W { w: self }
    }
    #[doc = "Bits 8:9 - Dynamic shift selection"]
    #[inline(always)]
    pub fn shift(&mut self) -> SHIFT_W {
        SHIFT_W { w: self }
    }
    #[doc = "Bits 10:11 - Dynamic ALU source B selection"]
    #[inline(always)]
    pub fn src_b(&mut self) -> SRC_B_W {
        SRC_B_W { w: self }
    }
    #[doc = "Bit 12 - Dynamic ALU source A selection"]
    #[inline(always)]
    pub fn src_a(&mut self) -> SRC_A_W {
        SRC_A_W { w: self }
    }
    #[doc = "Bits 13:15 - Dynamic ALU function selection"]
    #[inline(always)]
    pub fn func(&mut self) -> FUNC_W {
        FUNC_W { w: self }
    }
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Dynamic Configuration RAM\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dcfg3](index.html) module"]
pub struct DCFG3_SPEC;
impl crate::RegisterSpec for DCFG3_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [dcfg3::R](R) reader structure"]
impl crate::Readable for DCFG3_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dcfg3::W](W) writer structure"]
impl crate::Writable for DCFG3_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets DCFG3 to value 0"]
impl crate::Resettable for DCFG3_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
