#[doc = "Register `CFG12` reader"]
pub struct R(crate::R<CFG12_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CFG12_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<CFG12_SPEC>> for R {
    fn from(reader: crate::R<CFG12_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `CFG12` writer"]
pub struct W(crate::W<CFG12_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<CFG12_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<CFG12_SPEC>> for W {
    fn from(writer: crate::W<CFG12_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Data selection for PA oe 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SEL0_A {
    #[doc = "0: No description available"]
    DSI_OE_OUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OE_OUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OE_OUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OE_OUT3 = 3,
}
impl From<OE_SEL0_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SEL0_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SEL0` reader - Data selection for PA oe 0"]
pub struct OE_SEL0_R(crate::FieldReader<u8, OE_SEL0_A>);
impl OE_SEL0_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SEL0_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SEL0_A {
        match self.bits {
            0 => OE_SEL0_A::DSI_OE_OUT0,
            1 => OE_SEL0_A::DSI_OE_OUT1,
            2 => OE_SEL0_A::DSI_OE_OUT2,
            3 => OE_SEL0_A::DSI_OE_OUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT0`"]
    #[inline(always)]
    pub fn is_dsi_oe_out0(&self) -> bool {
        **self == OE_SEL0_A::DSI_OE_OUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT1`"]
    #[inline(always)]
    pub fn is_dsi_oe_out1(&self) -> bool {
        **self == OE_SEL0_A::DSI_OE_OUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT2`"]
    #[inline(always)]
    pub fn is_dsi_oe_out2(&self) -> bool {
        **self == OE_SEL0_A::DSI_OE_OUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT3`"]
    #[inline(always)]
    pub fn is_dsi_oe_out3(&self) -> bool {
        **self == OE_SEL0_A::DSI_OE_OUT3
    }
}
impl core::ops::Deref for OE_SEL0_R {
    type Target = crate::FieldReader<u8, OE_SEL0_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SEL0` writer - Data selection for PA oe 0"]
pub struct OE_SEL0_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SEL0_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SEL0_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out0(self) -> &'a mut W {
        self.variant(OE_SEL0_A::DSI_OE_OUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out1(self) -> &'a mut W {
        self.variant(OE_SEL0_A::DSI_OE_OUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out2(self) -> &'a mut W {
        self.variant(OE_SEL0_A::DSI_OE_OUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out3(self) -> &'a mut W {
        self.variant(OE_SEL0_A::DSI_OE_OUT3)
    }
    #[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) | (value as u8 & 0x03);
        self.w
    }
}
#[doc = "Data selection for PA oe 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SEL1_A {
    #[doc = "0: No description available"]
    DSI_OE_OUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OE_OUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OE_OUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OE_OUT3 = 3,
}
impl From<OE_SEL1_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SEL1_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SEL1` reader - Data selection for PA oe 1"]
pub struct OE_SEL1_R(crate::FieldReader<u8, OE_SEL1_A>);
impl OE_SEL1_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SEL1_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SEL1_A {
        match self.bits {
            0 => OE_SEL1_A::DSI_OE_OUT0,
            1 => OE_SEL1_A::DSI_OE_OUT1,
            2 => OE_SEL1_A::DSI_OE_OUT2,
            3 => OE_SEL1_A::DSI_OE_OUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT0`"]
    #[inline(always)]
    pub fn is_dsi_oe_out0(&self) -> bool {
        **self == OE_SEL1_A::DSI_OE_OUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT1`"]
    #[inline(always)]
    pub fn is_dsi_oe_out1(&self) -> bool {
        **self == OE_SEL1_A::DSI_OE_OUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT2`"]
    #[inline(always)]
    pub fn is_dsi_oe_out2(&self) -> bool {
        **self == OE_SEL1_A::DSI_OE_OUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT3`"]
    #[inline(always)]
    pub fn is_dsi_oe_out3(&self) -> bool {
        **self == OE_SEL1_A::DSI_OE_OUT3
    }
}
impl core::ops::Deref for OE_SEL1_R {
    type Target = crate::FieldReader<u8, OE_SEL1_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SEL1` writer - Data selection for PA oe 1"]
pub struct OE_SEL1_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SEL1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SEL1_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out0(self) -> &'a mut W {
        self.variant(OE_SEL1_A::DSI_OE_OUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out1(self) -> &'a mut W {
        self.variant(OE_SEL1_A::DSI_OE_OUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out2(self) -> &'a mut W {
        self.variant(OE_SEL1_A::DSI_OE_OUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out3(self) -> &'a mut W {
        self.variant(OE_SEL1_A::DSI_OE_OUT3)
    }
    #[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 << 2)) | ((value as u8 & 0x03) << 2);
        self.w
    }
}
#[doc = "Data selection for PA oe 2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SEL2_A {
    #[doc = "0: No description available"]
    DSI_OE_OUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OE_OUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OE_OUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OE_OUT3 = 3,
}
impl From<OE_SEL2_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SEL2_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SEL2` reader - Data selection for PA oe 2"]
pub struct OE_SEL2_R(crate::FieldReader<u8, OE_SEL2_A>);
impl OE_SEL2_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SEL2_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SEL2_A {
        match self.bits {
            0 => OE_SEL2_A::DSI_OE_OUT0,
            1 => OE_SEL2_A::DSI_OE_OUT1,
            2 => OE_SEL2_A::DSI_OE_OUT2,
            3 => OE_SEL2_A::DSI_OE_OUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT0`"]
    #[inline(always)]
    pub fn is_dsi_oe_out0(&self) -> bool {
        **self == OE_SEL2_A::DSI_OE_OUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT1`"]
    #[inline(always)]
    pub fn is_dsi_oe_out1(&self) -> bool {
        **self == OE_SEL2_A::DSI_OE_OUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT2`"]
    #[inline(always)]
    pub fn is_dsi_oe_out2(&self) -> bool {
        **self == OE_SEL2_A::DSI_OE_OUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT3`"]
    #[inline(always)]
    pub fn is_dsi_oe_out3(&self) -> bool {
        **self == OE_SEL2_A::DSI_OE_OUT3
    }
}
impl core::ops::Deref for OE_SEL2_R {
    type Target = crate::FieldReader<u8, OE_SEL2_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SEL2` writer - Data selection for PA oe 2"]
pub struct OE_SEL2_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SEL2_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SEL2_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out0(self) -> &'a mut W {
        self.variant(OE_SEL2_A::DSI_OE_OUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out1(self) -> &'a mut W {
        self.variant(OE_SEL2_A::DSI_OE_OUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out2(self) -> &'a mut W {
        self.variant(OE_SEL2_A::DSI_OE_OUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out3(self) -> &'a mut W {
        self.variant(OE_SEL2_A::DSI_OE_OUT3)
    }
    #[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 u8 & 0x03) << 4);
        self.w
    }
}
#[doc = "Data selection for PA oe 3\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SEL3_A {
    #[doc = "0: No description available"]
    DSI_OE_OUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OE_OUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OE_OUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OE_OUT3 = 3,
}
impl From<OE_SEL3_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SEL3_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SEL3` reader - Data selection for PA oe 3"]
pub struct OE_SEL3_R(crate::FieldReader<u8, OE_SEL3_A>);
impl OE_SEL3_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SEL3_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SEL3_A {
        match self.bits {
            0 => OE_SEL3_A::DSI_OE_OUT0,
            1 => OE_SEL3_A::DSI_OE_OUT1,
            2 => OE_SEL3_A::DSI_OE_OUT2,
            3 => OE_SEL3_A::DSI_OE_OUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT0`"]
    #[inline(always)]
    pub fn is_dsi_oe_out0(&self) -> bool {
        **self == OE_SEL3_A::DSI_OE_OUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT1`"]
    #[inline(always)]
    pub fn is_dsi_oe_out1(&self) -> bool {
        **self == OE_SEL3_A::DSI_OE_OUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT2`"]
    #[inline(always)]
    pub fn is_dsi_oe_out2(&self) -> bool {
        **self == OE_SEL3_A::DSI_OE_OUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OE_OUT3`"]
    #[inline(always)]
    pub fn is_dsi_oe_out3(&self) -> bool {
        **self == OE_SEL3_A::DSI_OE_OUT3
    }
}
impl core::ops::Deref for OE_SEL3_R {
    type Target = crate::FieldReader<u8, OE_SEL3_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SEL3` writer - Data selection for PA oe 3"]
pub struct OE_SEL3_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SEL3_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SEL3_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out0(self) -> &'a mut W {
        self.variant(OE_SEL3_A::DSI_OE_OUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out1(self) -> &'a mut W {
        self.variant(OE_SEL3_A::DSI_OE_OUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out2(self) -> &'a mut W {
        self.variant(OE_SEL3_A::DSI_OE_OUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_oe_out3(self) -> &'a mut W {
        self.variant(OE_SEL3_A::DSI_OE_OUT3)
    }
    #[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 u8 & 0x03) << 6);
        self.w
    }
}
impl R {
    #[doc = "Bits 0:1 - Data selection for PA oe 0"]
    #[inline(always)]
    pub fn oe_sel0(&self) -> OE_SEL0_R {
        OE_SEL0_R::new((self.bits & 0x03) as u8)
    }
    #[doc = "Bits 2:3 - Data selection for PA oe 1"]
    #[inline(always)]
    pub fn oe_sel1(&self) -> OE_SEL1_R {
        OE_SEL1_R::new(((self.bits >> 2) & 0x03) as u8)
    }
    #[doc = "Bits 4:5 - Data selection for PA oe 2"]
    #[inline(always)]
    pub fn oe_sel2(&self) -> OE_SEL2_R {
        OE_SEL2_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 6:7 - Data selection for PA oe 3"]
    #[inline(always)]
    pub fn oe_sel3(&self) -> OE_SEL3_R {
        OE_SEL3_R::new(((self.bits >> 6) & 0x03) as u8)
    }
}
impl W {
    #[doc = "Bits 0:1 - Data selection for PA oe 0"]
    #[inline(always)]
    pub fn oe_sel0(&mut self) -> OE_SEL0_W {
        OE_SEL0_W { w: self }
    }
    #[doc = "Bits 2:3 - Data selection for PA oe 1"]
    #[inline(always)]
    pub fn oe_sel1(&mut self) -> OE_SEL1_W {
        OE_SEL1_W { w: self }
    }
    #[doc = "Bits 4:5 - Data selection for PA oe 2"]
    #[inline(always)]
    pub fn oe_sel2(&mut self) -> OE_SEL2_W {
        OE_SEL2_W { w: self }
    }
    #[doc = "Bits 6:7 - Data selection for PA oe 3"]
    #[inline(always)]
    pub fn oe_sel3(&mut self) -> OE_SEL3_W {
        OE_SEL3_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 = "PA OE Select Register - Low\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 [cfg12](index.html) module"]
pub struct CFG12_SPEC;
impl crate::RegisterSpec for CFG12_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [cfg12::R](R) reader structure"]
impl crate::Readable for CFG12_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cfg12::W](W) writer structure"]
impl crate::Writable for CFG12_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets CFG12 to value 0"]
impl crate::Resettable for CFG12_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
