#[doc = "Register `CLK_DFT_SELECT` reader"]
pub struct R(crate::R<CLK_DFT_SELECT_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CLK_DFT_SELECT_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<CLK_DFT_SELECT_SPEC>> for R {
    fn from(reader: crate::R<CLK_DFT_SELECT_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `CLK_DFT_SELECT` writer"]
pub struct W(crate::W<CLK_DFT_SELECT_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<CLK_DFT_SELECT_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<CLK_DFT_SELECT_SPEC>> for W {
    fn from(writer: crate::W<CLK_DFT_SELECT_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Select signal for DFT output #1.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DFT_SEL1_A {
    #[doc = "0: No description available"]
    NC = 0,
    #[doc = "1: No description available"]
    ILO = 1,
    #[doc = "2: No description available"]
    WCO = 2,
    #[doc = "3: No description available"]
    IMO = 3,
    #[doc = "4: No description available"]
    ECO = 4,
    #[doc = "5: No description available"]
    PLL = 5,
    #[doc = "6: No description available"]
    DPLL_OUT = 6,
    #[doc = "7: No description available"]
    DPLL_REF = 7,
    #[doc = "8: No description available"]
    DBL = 8,
    #[doc = "9: No description available"]
    IMO2X = 9,
    #[doc = "10: No description available"]
    IMO36 = 10,
    #[doc = "11: No description available"]
    HFCLK = 11,
    #[doc = "12: No description available"]
    LFCLK = 12,
    #[doc = "13: No description available"]
    SYSCLK = 13,
    #[doc = "14: No description available"]
    EXTCLK = 14,
    #[doc = "15: No description available"]
    HALFSYSCLK = 15,
}
impl From<DFT_SEL1_A> for u8 {
    #[inline(always)]
    fn from(variant: DFT_SEL1_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DFT_SEL1` reader - Select signal for DFT output #1."]
pub struct DFT_SEL1_R(crate::FieldReader<u8, DFT_SEL1_A>);
impl DFT_SEL1_R {
    pub(crate) fn new(bits: u8) -> Self {
        DFT_SEL1_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DFT_SEL1_A {
        match self.bits {
            0 => DFT_SEL1_A::NC,
            1 => DFT_SEL1_A::ILO,
            2 => DFT_SEL1_A::WCO,
            3 => DFT_SEL1_A::IMO,
            4 => DFT_SEL1_A::ECO,
            5 => DFT_SEL1_A::PLL,
            6 => DFT_SEL1_A::DPLL_OUT,
            7 => DFT_SEL1_A::DPLL_REF,
            8 => DFT_SEL1_A::DBL,
            9 => DFT_SEL1_A::IMO2X,
            10 => DFT_SEL1_A::IMO36,
            11 => DFT_SEL1_A::HFCLK,
            12 => DFT_SEL1_A::LFCLK,
            13 => DFT_SEL1_A::SYSCLK,
            14 => DFT_SEL1_A::EXTCLK,
            15 => DFT_SEL1_A::HALFSYSCLK,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `NC`"]
    #[inline(always)]
    pub fn is_nc(&self) -> bool {
        **self == DFT_SEL1_A::NC
    }
    #[doc = "Checks if the value of the field is `ILO`"]
    #[inline(always)]
    pub fn is_ilo(&self) -> bool {
        **self == DFT_SEL1_A::ILO
    }
    #[doc = "Checks if the value of the field is `WCO`"]
    #[inline(always)]
    pub fn is_wco(&self) -> bool {
        **self == DFT_SEL1_A::WCO
    }
    #[doc = "Checks if the value of the field is `IMO`"]
    #[inline(always)]
    pub fn is_imo(&self) -> bool {
        **self == DFT_SEL1_A::IMO
    }
    #[doc = "Checks if the value of the field is `ECO`"]
    #[inline(always)]
    pub fn is_eco(&self) -> bool {
        **self == DFT_SEL1_A::ECO
    }
    #[doc = "Checks if the value of the field is `PLL`"]
    #[inline(always)]
    pub fn is_pll(&self) -> bool {
        **self == DFT_SEL1_A::PLL
    }
    #[doc = "Checks if the value of the field is `DPLL_OUT`"]
    #[inline(always)]
    pub fn is_dpll_out(&self) -> bool {
        **self == DFT_SEL1_A::DPLL_OUT
    }
    #[doc = "Checks if the value of the field is `DPLL_REF`"]
    #[inline(always)]
    pub fn is_dpll_ref(&self) -> bool {
        **self == DFT_SEL1_A::DPLL_REF
    }
    #[doc = "Checks if the value of the field is `DBL`"]
    #[inline(always)]
    pub fn is_dbl(&self) -> bool {
        **self == DFT_SEL1_A::DBL
    }
    #[doc = "Checks if the value of the field is `IMO2X`"]
    #[inline(always)]
    pub fn is_imo2x(&self) -> bool {
        **self == DFT_SEL1_A::IMO2X
    }
    #[doc = "Checks if the value of the field is `IMO36`"]
    #[inline(always)]
    pub fn is_imo36(&self) -> bool {
        **self == DFT_SEL1_A::IMO36
    }
    #[doc = "Checks if the value of the field is `HFCLK`"]
    #[inline(always)]
    pub fn is_hfclk(&self) -> bool {
        **self == DFT_SEL1_A::HFCLK
    }
    #[doc = "Checks if the value of the field is `LFCLK`"]
    #[inline(always)]
    pub fn is_lfclk(&self) -> bool {
        **self == DFT_SEL1_A::LFCLK
    }
    #[doc = "Checks if the value of the field is `SYSCLK`"]
    #[inline(always)]
    pub fn is_sysclk(&self) -> bool {
        **self == DFT_SEL1_A::SYSCLK
    }
    #[doc = "Checks if the value of the field is `EXTCLK`"]
    #[inline(always)]
    pub fn is_extclk(&self) -> bool {
        **self == DFT_SEL1_A::EXTCLK
    }
    #[doc = "Checks if the value of the field is `HALFSYSCLK`"]
    #[inline(always)]
    pub fn is_halfsysclk(&self) -> bool {
        **self == DFT_SEL1_A::HALFSYSCLK
    }
}
impl core::ops::Deref for DFT_SEL1_R {
    type Target = crate::FieldReader<u8, DFT_SEL1_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DFT_SEL1` writer - Select signal for DFT output #1."]
pub struct DFT_SEL1_W<'a> {
    w: &'a mut W,
}
impl<'a> DFT_SEL1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DFT_SEL1_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn nc(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::NC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ilo(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::ILO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn wco(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::WCO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn imo(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::IMO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn eco(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::ECO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn pll(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::PLL)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dpll_out(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::DPLL_OUT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dpll_ref(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::DPLL_REF)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dbl(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::DBL)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn imo2x(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::IMO2X)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn imo36(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::IMO36)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn hfclk(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::HFCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn lfclk(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::LFCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn sysclk(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::SYSCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn extclk(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::EXTCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn halfsysclk(self) -> &'a mut W {
        self.variant(DFT_SEL1_A::HALFSYSCLK)
    }
    #[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 & !0x0f) | (value as u32 & 0x0f);
        self.w
    }
}
#[doc = "DFT Output Divide Down.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DFT_DIV1_A {
    #[doc = "0: No description available"]
    NO_DIV = 0,
    #[doc = "1: No description available"]
    DIV_BY_2 = 1,
    #[doc = "2: No description available"]
    DIV_BY_4 = 2,
    #[doc = "3: No description available"]
    DIV_BY_8 = 3,
}
impl From<DFT_DIV1_A> for u8 {
    #[inline(always)]
    fn from(variant: DFT_DIV1_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DFT_DIV1` reader - DFT Output Divide Down."]
pub struct DFT_DIV1_R(crate::FieldReader<u8, DFT_DIV1_A>);
impl DFT_DIV1_R {
    pub(crate) fn new(bits: u8) -> Self {
        DFT_DIV1_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DFT_DIV1_A {
        match self.bits {
            0 => DFT_DIV1_A::NO_DIV,
            1 => DFT_DIV1_A::DIV_BY_2,
            2 => DFT_DIV1_A::DIV_BY_4,
            3 => DFT_DIV1_A::DIV_BY_8,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `NO_DIV`"]
    #[inline(always)]
    pub fn is_no_div(&self) -> bool {
        **self == DFT_DIV1_A::NO_DIV
    }
    #[doc = "Checks if the value of the field is `DIV_BY_2`"]
    #[inline(always)]
    pub fn is_div_by_2(&self) -> bool {
        **self == DFT_DIV1_A::DIV_BY_2
    }
    #[doc = "Checks if the value of the field is `DIV_BY_4`"]
    #[inline(always)]
    pub fn is_div_by_4(&self) -> bool {
        **self == DFT_DIV1_A::DIV_BY_4
    }
    #[doc = "Checks if the value of the field is `DIV_BY_8`"]
    #[inline(always)]
    pub fn is_div_by_8(&self) -> bool {
        **self == DFT_DIV1_A::DIV_BY_8
    }
}
impl core::ops::Deref for DFT_DIV1_R {
    type Target = crate::FieldReader<u8, DFT_DIV1_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DFT_DIV1` writer - DFT Output Divide Down."]
pub struct DFT_DIV1_W<'a> {
    w: &'a mut W,
}
impl<'a> DFT_DIV1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DFT_DIV1_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn no_div(self) -> &'a mut W {
        self.variant(DFT_DIV1_A::NO_DIV)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn div_by_2(self) -> &'a mut W {
        self.variant(DFT_DIV1_A::DIV_BY_2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn div_by_4(self) -> &'a mut W {
        self.variant(DFT_DIV1_A::DIV_BY_4)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn div_by_8(self) -> &'a mut W {
        self.variant(DFT_DIV1_A::DIV_BY_8)
    }
    #[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 u32 & 0x03) << 4);
        self.w
    }
}
#[doc = "Select signal for DFT output #2.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DFT_SEL2_A {
    #[doc = "0: No description available"]
    NC = 0,
    #[doc = "1: No description available"]
    ILO = 1,
    #[doc = "2: No description available"]
    WCO = 2,
    #[doc = "3: No description available"]
    IMO = 3,
    #[doc = "4: No description available"]
    ECO = 4,
    #[doc = "5: No description available"]
    PLL = 5,
    #[doc = "6: No description available"]
    DPLL_OUT = 6,
    #[doc = "7: No description available"]
    DPLL_REF = 7,
    #[doc = "8: No description available"]
    DBL = 8,
    #[doc = "9: No description available"]
    IMO2X = 9,
    #[doc = "10: No description available"]
    IMO36 = 10,
    #[doc = "11: No description available"]
    HFCLK = 11,
    #[doc = "12: No description available"]
    LFCLK = 12,
    #[doc = "13: No description available"]
    SYSCLK = 13,
    #[doc = "14: No description available"]
    EXTCLK = 14,
    #[doc = "15: No description available"]
    HALFSYSCLK = 15,
}
impl From<DFT_SEL2_A> for u8 {
    #[inline(always)]
    fn from(variant: DFT_SEL2_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DFT_SEL2` reader - Select signal for DFT output #2."]
pub struct DFT_SEL2_R(crate::FieldReader<u8, DFT_SEL2_A>);
impl DFT_SEL2_R {
    pub(crate) fn new(bits: u8) -> Self {
        DFT_SEL2_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DFT_SEL2_A {
        match self.bits {
            0 => DFT_SEL2_A::NC,
            1 => DFT_SEL2_A::ILO,
            2 => DFT_SEL2_A::WCO,
            3 => DFT_SEL2_A::IMO,
            4 => DFT_SEL2_A::ECO,
            5 => DFT_SEL2_A::PLL,
            6 => DFT_SEL2_A::DPLL_OUT,
            7 => DFT_SEL2_A::DPLL_REF,
            8 => DFT_SEL2_A::DBL,
            9 => DFT_SEL2_A::IMO2X,
            10 => DFT_SEL2_A::IMO36,
            11 => DFT_SEL2_A::HFCLK,
            12 => DFT_SEL2_A::LFCLK,
            13 => DFT_SEL2_A::SYSCLK,
            14 => DFT_SEL2_A::EXTCLK,
            15 => DFT_SEL2_A::HALFSYSCLK,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `NC`"]
    #[inline(always)]
    pub fn is_nc(&self) -> bool {
        **self == DFT_SEL2_A::NC
    }
    #[doc = "Checks if the value of the field is `ILO`"]
    #[inline(always)]
    pub fn is_ilo(&self) -> bool {
        **self == DFT_SEL2_A::ILO
    }
    #[doc = "Checks if the value of the field is `WCO`"]
    #[inline(always)]
    pub fn is_wco(&self) -> bool {
        **self == DFT_SEL2_A::WCO
    }
    #[doc = "Checks if the value of the field is `IMO`"]
    #[inline(always)]
    pub fn is_imo(&self) -> bool {
        **self == DFT_SEL2_A::IMO
    }
    #[doc = "Checks if the value of the field is `ECO`"]
    #[inline(always)]
    pub fn is_eco(&self) -> bool {
        **self == DFT_SEL2_A::ECO
    }
    #[doc = "Checks if the value of the field is `PLL`"]
    #[inline(always)]
    pub fn is_pll(&self) -> bool {
        **self == DFT_SEL2_A::PLL
    }
    #[doc = "Checks if the value of the field is `DPLL_OUT`"]
    #[inline(always)]
    pub fn is_dpll_out(&self) -> bool {
        **self == DFT_SEL2_A::DPLL_OUT
    }
    #[doc = "Checks if the value of the field is `DPLL_REF`"]
    #[inline(always)]
    pub fn is_dpll_ref(&self) -> bool {
        **self == DFT_SEL2_A::DPLL_REF
    }
    #[doc = "Checks if the value of the field is `DBL`"]
    #[inline(always)]
    pub fn is_dbl(&self) -> bool {
        **self == DFT_SEL2_A::DBL
    }
    #[doc = "Checks if the value of the field is `IMO2X`"]
    #[inline(always)]
    pub fn is_imo2x(&self) -> bool {
        **self == DFT_SEL2_A::IMO2X
    }
    #[doc = "Checks if the value of the field is `IMO36`"]
    #[inline(always)]
    pub fn is_imo36(&self) -> bool {
        **self == DFT_SEL2_A::IMO36
    }
    #[doc = "Checks if the value of the field is `HFCLK`"]
    #[inline(always)]
    pub fn is_hfclk(&self) -> bool {
        **self == DFT_SEL2_A::HFCLK
    }
    #[doc = "Checks if the value of the field is `LFCLK`"]
    #[inline(always)]
    pub fn is_lfclk(&self) -> bool {
        **self == DFT_SEL2_A::LFCLK
    }
    #[doc = "Checks if the value of the field is `SYSCLK`"]
    #[inline(always)]
    pub fn is_sysclk(&self) -> bool {
        **self == DFT_SEL2_A::SYSCLK
    }
    #[doc = "Checks if the value of the field is `EXTCLK`"]
    #[inline(always)]
    pub fn is_extclk(&self) -> bool {
        **self == DFT_SEL2_A::EXTCLK
    }
    #[doc = "Checks if the value of the field is `HALFSYSCLK`"]
    #[inline(always)]
    pub fn is_halfsysclk(&self) -> bool {
        **self == DFT_SEL2_A::HALFSYSCLK
    }
}
impl core::ops::Deref for DFT_SEL2_R {
    type Target = crate::FieldReader<u8, DFT_SEL2_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DFT_SEL2` writer - Select signal for DFT output #2."]
pub struct DFT_SEL2_W<'a> {
    w: &'a mut W,
}
impl<'a> DFT_SEL2_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DFT_SEL2_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn nc(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::NC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ilo(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::ILO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn wco(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::WCO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn imo(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::IMO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn eco(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::ECO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn pll(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::PLL)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dpll_out(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::DPLL_OUT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dpll_ref(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::DPLL_REF)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dbl(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::DBL)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn imo2x(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::IMO2X)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn imo36(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::IMO36)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn hfclk(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::HFCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn lfclk(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::LFCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn sysclk(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::SYSCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn extclk(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::EXTCLK)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn halfsysclk(self) -> &'a mut W {
        self.variant(DFT_SEL2_A::HALFSYSCLK)
    }
    #[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 & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8);
        self.w
    }
}
#[doc = "DFT Output Divide Down.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DFT_DIV2_A {
    #[doc = "0: No description available"]
    NO_DIV = 0,
    #[doc = "1: No description available"]
    DIV_BY_2 = 1,
    #[doc = "2: No description available"]
    DIV_BY_4 = 2,
    #[doc = "3: No description available"]
    DIV_BY_8 = 3,
}
impl From<DFT_DIV2_A> for u8 {
    #[inline(always)]
    fn from(variant: DFT_DIV2_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DFT_DIV2` reader - DFT Output Divide Down."]
pub struct DFT_DIV2_R(crate::FieldReader<u8, DFT_DIV2_A>);
impl DFT_DIV2_R {
    pub(crate) fn new(bits: u8) -> Self {
        DFT_DIV2_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DFT_DIV2_A {
        match self.bits {
            0 => DFT_DIV2_A::NO_DIV,
            1 => DFT_DIV2_A::DIV_BY_2,
            2 => DFT_DIV2_A::DIV_BY_4,
            3 => DFT_DIV2_A::DIV_BY_8,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `NO_DIV`"]
    #[inline(always)]
    pub fn is_no_div(&self) -> bool {
        **self == DFT_DIV2_A::NO_DIV
    }
    #[doc = "Checks if the value of the field is `DIV_BY_2`"]
    #[inline(always)]
    pub fn is_div_by_2(&self) -> bool {
        **self == DFT_DIV2_A::DIV_BY_2
    }
    #[doc = "Checks if the value of the field is `DIV_BY_4`"]
    #[inline(always)]
    pub fn is_div_by_4(&self) -> bool {
        **self == DFT_DIV2_A::DIV_BY_4
    }
    #[doc = "Checks if the value of the field is `DIV_BY_8`"]
    #[inline(always)]
    pub fn is_div_by_8(&self) -> bool {
        **self == DFT_DIV2_A::DIV_BY_8
    }
}
impl core::ops::Deref for DFT_DIV2_R {
    type Target = crate::FieldReader<u8, DFT_DIV2_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DFT_DIV2` writer - DFT Output Divide Down."]
pub struct DFT_DIV2_W<'a> {
    w: &'a mut W,
}
impl<'a> DFT_DIV2_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DFT_DIV2_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn no_div(self) -> &'a mut W {
        self.variant(DFT_DIV2_A::NO_DIV)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn div_by_2(self) -> &'a mut W {
        self.variant(DFT_DIV2_A::DIV_BY_2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn div_by_4(self) -> &'a mut W {
        self.variant(DFT_DIV2_A::DIV_BY_4)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn div_by_8(self) -> &'a mut W {
        self.variant(DFT_DIV2_A::DIV_BY_8)
    }
    #[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 << 12)) | ((value as u32 & 0x03) << 12);
        self.w
    }
}
impl R {
    #[doc = "Bits 0:3 - Select signal for DFT output #1."]
    #[inline(always)]
    pub fn dft_sel1(&self) -> DFT_SEL1_R {
        DFT_SEL1_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:5 - DFT Output Divide Down."]
    #[inline(always)]
    pub fn dft_div1(&self) -> DFT_DIV1_R {
        DFT_DIV1_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 8:11 - Select signal for DFT output #2."]
    #[inline(always)]
    pub fn dft_sel2(&self) -> DFT_SEL2_R {
        DFT_SEL2_R::new(((self.bits >> 8) & 0x0f) as u8)
    }
    #[doc = "Bits 12:13 - DFT Output Divide Down."]
    #[inline(always)]
    pub fn dft_div2(&self) -> DFT_DIV2_R {
        DFT_DIV2_R::new(((self.bits >> 12) & 0x03) as u8)
    }
}
impl W {
    #[doc = "Bits 0:3 - Select signal for DFT output #1."]
    #[inline(always)]
    pub fn dft_sel1(&mut self) -> DFT_SEL1_W {
        DFT_SEL1_W { w: self }
    }
    #[doc = "Bits 4:5 - DFT Output Divide Down."]
    #[inline(always)]
    pub fn dft_div1(&mut self) -> DFT_DIV1_W {
        DFT_DIV1_W { w: self }
    }
    #[doc = "Bits 8:11 - Select signal for DFT output #2."]
    #[inline(always)]
    pub fn dft_sel2(&mut self) -> DFT_SEL2_W {
        DFT_SEL2_W { w: self }
    }
    #[doc = "Bits 12:13 - DFT Output Divide Down."]
    #[inline(always)]
    pub fn dft_div2(&mut self) -> DFT_DIV2_W {
        DFT_DIV2_W { w: self }
    }
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Clock DFT Mode Selection Register\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 [clk_dft_select](index.html) module"]
pub struct CLK_DFT_SELECT_SPEC;
impl crate::RegisterSpec for CLK_DFT_SELECT_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [clk_dft_select::R](R) reader structure"]
impl crate::Readable for CLK_DFT_SELECT_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [clk_dft_select::W](W) writer structure"]
impl crate::Writable for CLK_DFT_SELECT_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets CLK_DFT_SELECT to value 0"]
impl crate::Resettable for CLK_DFT_SELECT_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
