#[doc = "Register `CFG5` reader"]
pub struct R(crate::R<CFG5_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CFG5_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<CFG5_SPEC>> for R {
    fn from(reader: crate::R<CFG5_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `CFG5` writer"]
pub struct W(crate::W<CFG5_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<CFG5_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<CFG5_SPEC>> for W {
    fn from(writer: crate::W<CFG5_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Datapath Permutable Output Mux\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OUT0_A {
    #[doc = "0: No description available"]
    CE0 = 0,
    #[doc = "1: No description available"]
    CL0 = 1,
    #[doc = "2: No description available"]
    Z0 = 2,
    #[doc = "3: No description available"]
    FF0 = 3,
    #[doc = "4: No description available"]
    CE1 = 4,
    #[doc = "5: No description available"]
    CL1 = 5,
    #[doc = "6: No description available"]
    Z1 = 6,
    #[doc = "7: No description available"]
    FF1 = 7,
    #[doc = "8: No description available"]
    OV_MSB = 8,
    #[doc = "9: No description available"]
    CO_MSB = 9,
    #[doc = "10: No description available"]
    CMSBO = 10,
    #[doc = "11: No description available"]
    SO = 11,
    #[doc = "12: No description available"]
    F0_BLK_STAT = 12,
    #[doc = "13: No description available"]
    F1_BLK_STAT = 13,
    #[doc = "14: No description available"]
    F0_BUS_STAT = 14,
    #[doc = "15: No description available"]
    F1_BUS_STAT = 15,
}
impl From<OUT0_A> for u8 {
    #[inline(always)]
    fn from(variant: OUT0_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OUT0` reader - Datapath Permutable Output Mux"]
pub struct OUT0_R(crate::FieldReader<u8, OUT0_A>);
impl OUT0_R {
    pub(crate) fn new(bits: u8) -> Self {
        OUT0_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OUT0_A {
        match self.bits {
            0 => OUT0_A::CE0,
            1 => OUT0_A::CL0,
            2 => OUT0_A::Z0,
            3 => OUT0_A::FF0,
            4 => OUT0_A::CE1,
            5 => OUT0_A::CL1,
            6 => OUT0_A::Z1,
            7 => OUT0_A::FF1,
            8 => OUT0_A::OV_MSB,
            9 => OUT0_A::CO_MSB,
            10 => OUT0_A::CMSBO,
            11 => OUT0_A::SO,
            12 => OUT0_A::F0_BLK_STAT,
            13 => OUT0_A::F1_BLK_STAT,
            14 => OUT0_A::F0_BUS_STAT,
            15 => OUT0_A::F1_BUS_STAT,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `CE0`"]
    #[inline(always)]
    pub fn is_ce0(&self) -> bool {
        **self == OUT0_A::CE0
    }
    #[doc = "Checks if the value of the field is `CL0`"]
    #[inline(always)]
    pub fn is_cl0(&self) -> bool {
        **self == OUT0_A::CL0
    }
    #[doc = "Checks if the value of the field is `Z0`"]
    #[inline(always)]
    pub fn is_z0(&self) -> bool {
        **self == OUT0_A::Z0
    }
    #[doc = "Checks if the value of the field is `FF0`"]
    #[inline(always)]
    pub fn is_ff0(&self) -> bool {
        **self == OUT0_A::FF0
    }
    #[doc = "Checks if the value of the field is `CE1`"]
    #[inline(always)]
    pub fn is_ce1(&self) -> bool {
        **self == OUT0_A::CE1
    }
    #[doc = "Checks if the value of the field is `CL1`"]
    #[inline(always)]
    pub fn is_cl1(&self) -> bool {
        **self == OUT0_A::CL1
    }
    #[doc = "Checks if the value of the field is `Z1`"]
    #[inline(always)]
    pub fn is_z1(&self) -> bool {
        **self == OUT0_A::Z1
    }
    #[doc = "Checks if the value of the field is `FF1`"]
    #[inline(always)]
    pub fn is_ff1(&self) -> bool {
        **self == OUT0_A::FF1
    }
    #[doc = "Checks if the value of the field is `OV_MSB`"]
    #[inline(always)]
    pub fn is_ov_msb(&self) -> bool {
        **self == OUT0_A::OV_MSB
    }
    #[doc = "Checks if the value of the field is `CO_MSB`"]
    #[inline(always)]
    pub fn is_co_msb(&self) -> bool {
        **self == OUT0_A::CO_MSB
    }
    #[doc = "Checks if the value of the field is `CMSBO`"]
    #[inline(always)]
    pub fn is_cmsbo(&self) -> bool {
        **self == OUT0_A::CMSBO
    }
    #[doc = "Checks if the value of the field is `SO`"]
    #[inline(always)]
    pub fn is_so(&self) -> bool {
        **self == OUT0_A::SO
    }
    #[doc = "Checks if the value of the field is `F0_BLK_STAT`"]
    #[inline(always)]
    pub fn is_f0_blk_stat(&self) -> bool {
        **self == OUT0_A::F0_BLK_STAT
    }
    #[doc = "Checks if the value of the field is `F1_BLK_STAT`"]
    #[inline(always)]
    pub fn is_f1_blk_stat(&self) -> bool {
        **self == OUT0_A::F1_BLK_STAT
    }
    #[doc = "Checks if the value of the field is `F0_BUS_STAT`"]
    #[inline(always)]
    pub fn is_f0_bus_stat(&self) -> bool {
        **self == OUT0_A::F0_BUS_STAT
    }
    #[doc = "Checks if the value of the field is `F1_BUS_STAT`"]
    #[inline(always)]
    pub fn is_f1_bus_stat(&self) -> bool {
        **self == OUT0_A::F1_BUS_STAT
    }
}
impl core::ops::Deref for OUT0_R {
    type Target = crate::FieldReader<u8, OUT0_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OUT0` writer - Datapath Permutable Output Mux"]
pub struct OUT0_W<'a> {
    w: &'a mut W,
}
impl<'a> OUT0_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OUT0_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ce0(self) -> &'a mut W {
        self.variant(OUT0_A::CE0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cl0(self) -> &'a mut W {
        self.variant(OUT0_A::CL0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn z0(self) -> &'a mut W {
        self.variant(OUT0_A::Z0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ff0(self) -> &'a mut W {
        self.variant(OUT0_A::FF0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ce1(self) -> &'a mut W {
        self.variant(OUT0_A::CE1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cl1(self) -> &'a mut W {
        self.variant(OUT0_A::CL1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn z1(self) -> &'a mut W {
        self.variant(OUT0_A::Z1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ff1(self) -> &'a mut W {
        self.variant(OUT0_A::FF1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ov_msb(self) -> &'a mut W {
        self.variant(OUT0_A::OV_MSB)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn co_msb(self) -> &'a mut W {
        self.variant(OUT0_A::CO_MSB)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cmsbo(self) -> &'a mut W {
        self.variant(OUT0_A::CMSBO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn so(self) -> &'a mut W {
        self.variant(OUT0_A::SO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f0_blk_stat(self) -> &'a mut W {
        self.variant(OUT0_A::F0_BLK_STAT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f1_blk_stat(self) -> &'a mut W {
        self.variant(OUT0_A::F1_BLK_STAT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f0_bus_stat(self) -> &'a mut W {
        self.variant(OUT0_A::F0_BUS_STAT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f1_bus_stat(self) -> &'a mut W {
        self.variant(OUT0_A::F1_BUS_STAT)
    }
    #[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 u8 & 0x0f);
        self.w
    }
}
#[doc = "Datapath Permutable Output Mux\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OUT1_A {
    #[doc = "0: No description available"]
    CE0 = 0,
    #[doc = "1: No description available"]
    CL0 = 1,
    #[doc = "2: No description available"]
    Z0 = 2,
    #[doc = "3: No description available"]
    FF0 = 3,
    #[doc = "4: No description available"]
    CE1 = 4,
    #[doc = "5: No description available"]
    CL1 = 5,
    #[doc = "6: No description available"]
    Z1 = 6,
    #[doc = "7: No description available"]
    FF1 = 7,
    #[doc = "8: No description available"]
    OV_MSB = 8,
    #[doc = "9: No description available"]
    CO_MSB = 9,
    #[doc = "10: No description available"]
    CMSBO = 10,
    #[doc = "11: No description available"]
    SO = 11,
    #[doc = "12: No description available"]
    F0_BLK_STAT = 12,
    #[doc = "13: No description available"]
    F1_BLK_STAT = 13,
    #[doc = "14: No description available"]
    F0_BUS_STAT = 14,
    #[doc = "15: No description available"]
    F1_BUS_STAT = 15,
}
impl From<OUT1_A> for u8 {
    #[inline(always)]
    fn from(variant: OUT1_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OUT1` reader - Datapath Permutable Output Mux"]
pub struct OUT1_R(crate::FieldReader<u8, OUT1_A>);
impl OUT1_R {
    pub(crate) fn new(bits: u8) -> Self {
        OUT1_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OUT1_A {
        match self.bits {
            0 => OUT1_A::CE0,
            1 => OUT1_A::CL0,
            2 => OUT1_A::Z0,
            3 => OUT1_A::FF0,
            4 => OUT1_A::CE1,
            5 => OUT1_A::CL1,
            6 => OUT1_A::Z1,
            7 => OUT1_A::FF1,
            8 => OUT1_A::OV_MSB,
            9 => OUT1_A::CO_MSB,
            10 => OUT1_A::CMSBO,
            11 => OUT1_A::SO,
            12 => OUT1_A::F0_BLK_STAT,
            13 => OUT1_A::F1_BLK_STAT,
            14 => OUT1_A::F0_BUS_STAT,
            15 => OUT1_A::F1_BUS_STAT,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `CE0`"]
    #[inline(always)]
    pub fn is_ce0(&self) -> bool {
        **self == OUT1_A::CE0
    }
    #[doc = "Checks if the value of the field is `CL0`"]
    #[inline(always)]
    pub fn is_cl0(&self) -> bool {
        **self == OUT1_A::CL0
    }
    #[doc = "Checks if the value of the field is `Z0`"]
    #[inline(always)]
    pub fn is_z0(&self) -> bool {
        **self == OUT1_A::Z0
    }
    #[doc = "Checks if the value of the field is `FF0`"]
    #[inline(always)]
    pub fn is_ff0(&self) -> bool {
        **self == OUT1_A::FF0
    }
    #[doc = "Checks if the value of the field is `CE1`"]
    #[inline(always)]
    pub fn is_ce1(&self) -> bool {
        **self == OUT1_A::CE1
    }
    #[doc = "Checks if the value of the field is `CL1`"]
    #[inline(always)]
    pub fn is_cl1(&self) -> bool {
        **self == OUT1_A::CL1
    }
    #[doc = "Checks if the value of the field is `Z1`"]
    #[inline(always)]
    pub fn is_z1(&self) -> bool {
        **self == OUT1_A::Z1
    }
    #[doc = "Checks if the value of the field is `FF1`"]
    #[inline(always)]
    pub fn is_ff1(&self) -> bool {
        **self == OUT1_A::FF1
    }
    #[doc = "Checks if the value of the field is `OV_MSB`"]
    #[inline(always)]
    pub fn is_ov_msb(&self) -> bool {
        **self == OUT1_A::OV_MSB
    }
    #[doc = "Checks if the value of the field is `CO_MSB`"]
    #[inline(always)]
    pub fn is_co_msb(&self) -> bool {
        **self == OUT1_A::CO_MSB
    }
    #[doc = "Checks if the value of the field is `CMSBO`"]
    #[inline(always)]
    pub fn is_cmsbo(&self) -> bool {
        **self == OUT1_A::CMSBO
    }
    #[doc = "Checks if the value of the field is `SO`"]
    #[inline(always)]
    pub fn is_so(&self) -> bool {
        **self == OUT1_A::SO
    }
    #[doc = "Checks if the value of the field is `F0_BLK_STAT`"]
    #[inline(always)]
    pub fn is_f0_blk_stat(&self) -> bool {
        **self == OUT1_A::F0_BLK_STAT
    }
    #[doc = "Checks if the value of the field is `F1_BLK_STAT`"]
    #[inline(always)]
    pub fn is_f1_blk_stat(&self) -> bool {
        **self == OUT1_A::F1_BLK_STAT
    }
    #[doc = "Checks if the value of the field is `F0_BUS_STAT`"]
    #[inline(always)]
    pub fn is_f0_bus_stat(&self) -> bool {
        **self == OUT1_A::F0_BUS_STAT
    }
    #[doc = "Checks if the value of the field is `F1_BUS_STAT`"]
    #[inline(always)]
    pub fn is_f1_bus_stat(&self) -> bool {
        **self == OUT1_A::F1_BUS_STAT
    }
}
impl core::ops::Deref for OUT1_R {
    type Target = crate::FieldReader<u8, OUT1_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OUT1` writer - Datapath Permutable Output Mux"]
pub struct OUT1_W<'a> {
    w: &'a mut W,
}
impl<'a> OUT1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OUT1_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ce0(self) -> &'a mut W {
        self.variant(OUT1_A::CE0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cl0(self) -> &'a mut W {
        self.variant(OUT1_A::CL0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn z0(self) -> &'a mut W {
        self.variant(OUT1_A::Z0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ff0(self) -> &'a mut W {
        self.variant(OUT1_A::FF0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ce1(self) -> &'a mut W {
        self.variant(OUT1_A::CE1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cl1(self) -> &'a mut W {
        self.variant(OUT1_A::CL1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn z1(self) -> &'a mut W {
        self.variant(OUT1_A::Z1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ff1(self) -> &'a mut W {
        self.variant(OUT1_A::FF1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn ov_msb(self) -> &'a mut W {
        self.variant(OUT1_A::OV_MSB)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn co_msb(self) -> &'a mut W {
        self.variant(OUT1_A::CO_MSB)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cmsbo(self) -> &'a mut W {
        self.variant(OUT1_A::CMSBO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn so(self) -> &'a mut W {
        self.variant(OUT1_A::SO)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f0_blk_stat(self) -> &'a mut W {
        self.variant(OUT1_A::F0_BLK_STAT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f1_blk_stat(self) -> &'a mut W {
        self.variant(OUT1_A::F1_BLK_STAT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f0_bus_stat(self) -> &'a mut W {
        self.variant(OUT1_A::F0_BUS_STAT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn f1_bus_stat(self) -> &'a mut W {
        self.variant(OUT1_A::F1_BUS_STAT)
    }
    #[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 << 4)) | ((value as u8 & 0x0f) << 4);
        self.w
    }
}
impl R {
    #[doc = "Bits 0:3 - Datapath Permutable Output Mux"]
    #[inline(always)]
    pub fn out0(&self) -> OUT0_R {
        OUT0_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:7 - Datapath Permutable Output Mux"]
    #[inline(always)]
    pub fn out1(&self) -> OUT1_R {
        OUT1_R::new(((self.bits >> 4) & 0x0f) as u8)
    }
}
impl W {
    #[doc = "Bits 0:3 - Datapath Permutable Output Mux"]
    #[inline(always)]
    pub fn out0(&mut self) -> OUT0_W {
        OUT0_W { w: self }
    }
    #[doc = "Bits 4:7 - Datapath Permutable Output Mux"]
    #[inline(always)]
    pub fn out1(&mut self) -> OUT1_W {
        OUT1_W { w: self }
    }
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Datapath Output Selection for OUT1 OUT0\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 [cfg5](index.html) module"]
pub struct CFG5_SPEC;
impl crate::RegisterSpec for CFG5_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [cfg5::R](R) reader structure"]
impl crate::Readable for CFG5_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cfg5::W](W) writer structure"]
impl crate::Writable for CFG5_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets CFG5 to value 0"]
impl crate::Resettable for CFG5_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
