#[doc = "Register `CFG11` reader"]
pub struct R(crate::R<CFG11_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CFG11_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<CFG11_SPEC>> for R {
    fn from(reader: crate::R<CFG11_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `CFG11` writer"]
pub struct W(crate::W<CFG11_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<CFG11_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<CFG11_SPEC>> for W {
    fn from(writer: crate::W<CFG11_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Data selection for PA output 4\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DATA_SEL4_A {
    #[doc = "0: No description available"]
    DSI_OUTPUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OUTPUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OUTPUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OUTPUT3 = 3,
}
impl From<DATA_SEL4_A> for u8 {
    #[inline(always)]
    fn from(variant: DATA_SEL4_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DATA_SEL4` reader - Data selection for PA output 4"]
pub struct DATA_SEL4_R(crate::FieldReader<u8, DATA_SEL4_A>);
impl DATA_SEL4_R {
    pub(crate) fn new(bits: u8) -> Self {
        DATA_SEL4_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DATA_SEL4_A {
        match self.bits {
            0 => DATA_SEL4_A::DSI_OUTPUT0,
            1 => DATA_SEL4_A::DSI_OUTPUT1,
            2 => DATA_SEL4_A::DSI_OUTPUT2,
            3 => DATA_SEL4_A::DSI_OUTPUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT0`"]
    #[inline(always)]
    pub fn is_dsi_output0(&self) -> bool {
        **self == DATA_SEL4_A::DSI_OUTPUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT1`"]
    #[inline(always)]
    pub fn is_dsi_output1(&self) -> bool {
        **self == DATA_SEL4_A::DSI_OUTPUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT2`"]
    #[inline(always)]
    pub fn is_dsi_output2(&self) -> bool {
        **self == DATA_SEL4_A::DSI_OUTPUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT3`"]
    #[inline(always)]
    pub fn is_dsi_output3(&self) -> bool {
        **self == DATA_SEL4_A::DSI_OUTPUT3
    }
}
impl core::ops::Deref for DATA_SEL4_R {
    type Target = crate::FieldReader<u8, DATA_SEL4_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DATA_SEL4` writer - Data selection for PA output 4"]
pub struct DATA_SEL4_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA_SEL4_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DATA_SEL4_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output0(self) -> &'a mut W {
        self.variant(DATA_SEL4_A::DSI_OUTPUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output1(self) -> &'a mut W {
        self.variant(DATA_SEL4_A::DSI_OUTPUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output2(self) -> &'a mut W {
        self.variant(DATA_SEL4_A::DSI_OUTPUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output3(self) -> &'a mut W {
        self.variant(DATA_SEL4_A::DSI_OUTPUT3)
    }
    #[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 output 5\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DATA_SEL5_A {
    #[doc = "0: No description available"]
    DSI_OUTPUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OUTPUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OUTPUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OUTPUT3 = 3,
}
impl From<DATA_SEL5_A> for u8 {
    #[inline(always)]
    fn from(variant: DATA_SEL5_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DATA_SEL5` reader - Data selection for PA output 5"]
pub struct DATA_SEL5_R(crate::FieldReader<u8, DATA_SEL5_A>);
impl DATA_SEL5_R {
    pub(crate) fn new(bits: u8) -> Self {
        DATA_SEL5_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DATA_SEL5_A {
        match self.bits {
            0 => DATA_SEL5_A::DSI_OUTPUT0,
            1 => DATA_SEL5_A::DSI_OUTPUT1,
            2 => DATA_SEL5_A::DSI_OUTPUT2,
            3 => DATA_SEL5_A::DSI_OUTPUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT0`"]
    #[inline(always)]
    pub fn is_dsi_output0(&self) -> bool {
        **self == DATA_SEL5_A::DSI_OUTPUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT1`"]
    #[inline(always)]
    pub fn is_dsi_output1(&self) -> bool {
        **self == DATA_SEL5_A::DSI_OUTPUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT2`"]
    #[inline(always)]
    pub fn is_dsi_output2(&self) -> bool {
        **self == DATA_SEL5_A::DSI_OUTPUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT3`"]
    #[inline(always)]
    pub fn is_dsi_output3(&self) -> bool {
        **self == DATA_SEL5_A::DSI_OUTPUT3
    }
}
impl core::ops::Deref for DATA_SEL5_R {
    type Target = crate::FieldReader<u8, DATA_SEL5_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DATA_SEL5` writer - Data selection for PA output 5"]
pub struct DATA_SEL5_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA_SEL5_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DATA_SEL5_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output0(self) -> &'a mut W {
        self.variant(DATA_SEL5_A::DSI_OUTPUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output1(self) -> &'a mut W {
        self.variant(DATA_SEL5_A::DSI_OUTPUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output2(self) -> &'a mut W {
        self.variant(DATA_SEL5_A::DSI_OUTPUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output3(self) -> &'a mut W {
        self.variant(DATA_SEL5_A::DSI_OUTPUT3)
    }
    #[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 output 6\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DATA_SEL6_A {
    #[doc = "0: No description available"]
    DSI_OUTPUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OUTPUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OUTPUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OUTPUT3 = 3,
}
impl From<DATA_SEL6_A> for u8 {
    #[inline(always)]
    fn from(variant: DATA_SEL6_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DATA_SEL6` reader - Data selection for PA output 6"]
pub struct DATA_SEL6_R(crate::FieldReader<u8, DATA_SEL6_A>);
impl DATA_SEL6_R {
    pub(crate) fn new(bits: u8) -> Self {
        DATA_SEL6_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DATA_SEL6_A {
        match self.bits {
            0 => DATA_SEL6_A::DSI_OUTPUT0,
            1 => DATA_SEL6_A::DSI_OUTPUT1,
            2 => DATA_SEL6_A::DSI_OUTPUT2,
            3 => DATA_SEL6_A::DSI_OUTPUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT0`"]
    #[inline(always)]
    pub fn is_dsi_output0(&self) -> bool {
        **self == DATA_SEL6_A::DSI_OUTPUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT1`"]
    #[inline(always)]
    pub fn is_dsi_output1(&self) -> bool {
        **self == DATA_SEL6_A::DSI_OUTPUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT2`"]
    #[inline(always)]
    pub fn is_dsi_output2(&self) -> bool {
        **self == DATA_SEL6_A::DSI_OUTPUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT3`"]
    #[inline(always)]
    pub fn is_dsi_output3(&self) -> bool {
        **self == DATA_SEL6_A::DSI_OUTPUT3
    }
}
impl core::ops::Deref for DATA_SEL6_R {
    type Target = crate::FieldReader<u8, DATA_SEL6_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DATA_SEL6` writer - Data selection for PA output 6"]
pub struct DATA_SEL6_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA_SEL6_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DATA_SEL6_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output0(self) -> &'a mut W {
        self.variant(DATA_SEL6_A::DSI_OUTPUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output1(self) -> &'a mut W {
        self.variant(DATA_SEL6_A::DSI_OUTPUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output2(self) -> &'a mut W {
        self.variant(DATA_SEL6_A::DSI_OUTPUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output3(self) -> &'a mut W {
        self.variant(DATA_SEL6_A::DSI_OUTPUT3)
    }
    #[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 output 7\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DATA_SEL7_A {
    #[doc = "0: No description available"]
    DSI_OUTPUT0 = 0,
    #[doc = "1: No description available"]
    DSI_OUTPUT1 = 1,
    #[doc = "2: No description available"]
    DSI_OUTPUT2 = 2,
    #[doc = "3: No description available"]
    DSI_OUTPUT3 = 3,
}
impl From<DATA_SEL7_A> for u8 {
    #[inline(always)]
    fn from(variant: DATA_SEL7_A) -> Self {
        variant as _
    }
}
#[doc = "Field `DATA_SEL7` reader - Data selection for PA output 7"]
pub struct DATA_SEL7_R(crate::FieldReader<u8, DATA_SEL7_A>);
impl DATA_SEL7_R {
    pub(crate) fn new(bits: u8) -> Self {
        DATA_SEL7_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DATA_SEL7_A {
        match self.bits {
            0 => DATA_SEL7_A::DSI_OUTPUT0,
            1 => DATA_SEL7_A::DSI_OUTPUT1,
            2 => DATA_SEL7_A::DSI_OUTPUT2,
            3 => DATA_SEL7_A::DSI_OUTPUT3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT0`"]
    #[inline(always)]
    pub fn is_dsi_output0(&self) -> bool {
        **self == DATA_SEL7_A::DSI_OUTPUT0
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT1`"]
    #[inline(always)]
    pub fn is_dsi_output1(&self) -> bool {
        **self == DATA_SEL7_A::DSI_OUTPUT1
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT2`"]
    #[inline(always)]
    pub fn is_dsi_output2(&self) -> bool {
        **self == DATA_SEL7_A::DSI_OUTPUT2
    }
    #[doc = "Checks if the value of the field is `DSI_OUTPUT3`"]
    #[inline(always)]
    pub fn is_dsi_output3(&self) -> bool {
        **self == DATA_SEL7_A::DSI_OUTPUT3
    }
}
impl core::ops::Deref for DATA_SEL7_R {
    type Target = crate::FieldReader<u8, DATA_SEL7_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DATA_SEL7` writer - Data selection for PA output 7"]
pub struct DATA_SEL7_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA_SEL7_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DATA_SEL7_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output0(self) -> &'a mut W {
        self.variant(DATA_SEL7_A::DSI_OUTPUT0)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output1(self) -> &'a mut W {
        self.variant(DATA_SEL7_A::DSI_OUTPUT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output2(self) -> &'a mut W {
        self.variant(DATA_SEL7_A::DSI_OUTPUT2)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn dsi_output3(self) -> &'a mut W {
        self.variant(DATA_SEL7_A::DSI_OUTPUT3)
    }
    #[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 output 4"]
    #[inline(always)]
    pub fn data_sel4(&self) -> DATA_SEL4_R {
        DATA_SEL4_R::new((self.bits & 0x03) as u8)
    }
    #[doc = "Bits 2:3 - Data selection for PA output 5"]
    #[inline(always)]
    pub fn data_sel5(&self) -> DATA_SEL5_R {
        DATA_SEL5_R::new(((self.bits >> 2) & 0x03) as u8)
    }
    #[doc = "Bits 4:5 - Data selection for PA output 6"]
    #[inline(always)]
    pub fn data_sel6(&self) -> DATA_SEL6_R {
        DATA_SEL6_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 6:7 - Data selection for PA output 7"]
    #[inline(always)]
    pub fn data_sel7(&self) -> DATA_SEL7_R {
        DATA_SEL7_R::new(((self.bits >> 6) & 0x03) as u8)
    }
}
impl W {
    #[doc = "Bits 0:1 - Data selection for PA output 4"]
    #[inline(always)]
    pub fn data_sel4(&mut self) -> DATA_SEL4_W {
        DATA_SEL4_W { w: self }
    }
    #[doc = "Bits 2:3 - Data selection for PA output 5"]
    #[inline(always)]
    pub fn data_sel5(&mut self) -> DATA_SEL5_W {
        DATA_SEL5_W { w: self }
    }
    #[doc = "Bits 4:5 - Data selection for PA output 6"]
    #[inline(always)]
    pub fn data_sel6(&mut self) -> DATA_SEL6_W {
        DATA_SEL6_W { w: self }
    }
    #[doc = "Bits 6:7 - Data selection for PA output 7"]
    #[inline(always)]
    pub fn data_sel7(&mut self) -> DATA_SEL7_W {
        DATA_SEL7_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 Output Data Select Register - High\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 [cfg11](index.html) module"]
pub struct CFG11_SPEC;
impl crate::RegisterSpec for CFG11_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [cfg11::R](R) reader structure"]
impl crate::Readable for CFG11_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cfg11::W](W) writer structure"]
impl crate::Writable for CFG11_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets CFG11 to value 0"]
impl crate::Resettable for CFG11_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
