#[doc = "Register `CFG14` reader"]
pub struct R(crate::R<CFG14_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CFG14_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<CFG14_SPEC>> for R {
    fn from(reader: crate::R<CFG14_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `CFG14` writer"]
pub struct W(crate::W<CFG14_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<CFG14_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<CFG14_SPEC>> for W {
    fn from(writer: crate::W<CFG14_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Synchronization options for dsi_to_oe\\[0\\]\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SYNC0_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    CONSTANT1 = 2,
    #[doc = "3: No description available"]
    CONSTANT0 = 3,
}
impl From<OE_SYNC0_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SYNC0_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SYNC0` reader - Synchronization options for dsi_to_oe\\[0\\]"]
pub struct OE_SYNC0_R(crate::FieldReader<u8, OE_SYNC0_A>);
impl OE_SYNC0_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SYNC0_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SYNC0_A {
        match self.bits {
            0 => OE_SYNC0_A::TRANSPARENT,
            1 => OE_SYNC0_A::SINGLESYNC,
            2 => OE_SYNC0_A::CONSTANT1,
            3 => OE_SYNC0_A::CONSTANT0,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == OE_SYNC0_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == OE_SYNC0_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `CONSTANT1`"]
    #[inline(always)]
    pub fn is_constant1(&self) -> bool {
        **self == OE_SYNC0_A::CONSTANT1
    }
    #[doc = "Checks if the value of the field is `CONSTANT0`"]
    #[inline(always)]
    pub fn is_constant0(&self) -> bool {
        **self == OE_SYNC0_A::CONSTANT0
    }
}
impl core::ops::Deref for OE_SYNC0_R {
    type Target = crate::FieldReader<u8, OE_SYNC0_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SYNC0` writer - Synchronization options for dsi_to_oe\\[0\\]"]
pub struct OE_SYNC0_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SYNC0_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SYNC0_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(OE_SYNC0_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(OE_SYNC0_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant1(self) -> &'a mut W {
        self.variant(OE_SYNC0_A::CONSTANT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant0(self) -> &'a mut W {
        self.variant(OE_SYNC0_A::CONSTANT0)
    }
    #[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 = "Synchronization options for dsi_to_oe\\[1\\]\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SYNC1_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    CONSTANT1 = 2,
    #[doc = "3: No description available"]
    CONSTANT0 = 3,
}
impl From<OE_SYNC1_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SYNC1_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SYNC1` reader - Synchronization options for dsi_to_oe\\[1\\]"]
pub struct OE_SYNC1_R(crate::FieldReader<u8, OE_SYNC1_A>);
impl OE_SYNC1_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SYNC1_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SYNC1_A {
        match self.bits {
            0 => OE_SYNC1_A::TRANSPARENT,
            1 => OE_SYNC1_A::SINGLESYNC,
            2 => OE_SYNC1_A::CONSTANT1,
            3 => OE_SYNC1_A::CONSTANT0,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == OE_SYNC1_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == OE_SYNC1_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `CONSTANT1`"]
    #[inline(always)]
    pub fn is_constant1(&self) -> bool {
        **self == OE_SYNC1_A::CONSTANT1
    }
    #[doc = "Checks if the value of the field is `CONSTANT0`"]
    #[inline(always)]
    pub fn is_constant0(&self) -> bool {
        **self == OE_SYNC1_A::CONSTANT0
    }
}
impl core::ops::Deref for OE_SYNC1_R {
    type Target = crate::FieldReader<u8, OE_SYNC1_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SYNC1` writer - Synchronization options for dsi_to_oe\\[1\\]"]
pub struct OE_SYNC1_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SYNC1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SYNC1_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(OE_SYNC1_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(OE_SYNC1_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant1(self) -> &'a mut W {
        self.variant(OE_SYNC1_A::CONSTANT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant0(self) -> &'a mut W {
        self.variant(OE_SYNC1_A::CONSTANT0)
    }
    #[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 = "Synchronization options for dsi_to_oe\\[2\\]\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SYNC2_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    CONSTANT1 = 2,
    #[doc = "3: No description available"]
    CONSTANT0 = 3,
}
impl From<OE_SYNC2_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SYNC2_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SYNC2` reader - Synchronization options for dsi_to_oe\\[2\\]"]
pub struct OE_SYNC2_R(crate::FieldReader<u8, OE_SYNC2_A>);
impl OE_SYNC2_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SYNC2_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SYNC2_A {
        match self.bits {
            0 => OE_SYNC2_A::TRANSPARENT,
            1 => OE_SYNC2_A::SINGLESYNC,
            2 => OE_SYNC2_A::CONSTANT1,
            3 => OE_SYNC2_A::CONSTANT0,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == OE_SYNC2_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == OE_SYNC2_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `CONSTANT1`"]
    #[inline(always)]
    pub fn is_constant1(&self) -> bool {
        **self == OE_SYNC2_A::CONSTANT1
    }
    #[doc = "Checks if the value of the field is `CONSTANT0`"]
    #[inline(always)]
    pub fn is_constant0(&self) -> bool {
        **self == OE_SYNC2_A::CONSTANT0
    }
}
impl core::ops::Deref for OE_SYNC2_R {
    type Target = crate::FieldReader<u8, OE_SYNC2_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SYNC2` writer - Synchronization options for dsi_to_oe\\[2\\]"]
pub struct OE_SYNC2_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SYNC2_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SYNC2_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(OE_SYNC2_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(OE_SYNC2_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant1(self) -> &'a mut W {
        self.variant(OE_SYNC2_A::CONSTANT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant0(self) -> &'a mut W {
        self.variant(OE_SYNC2_A::CONSTANT0)
    }
    #[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 = "Synchronization options for dsi_to_oe\\[3\\]\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OE_SYNC3_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    CONSTANT1 = 2,
    #[doc = "3: No description available"]
    CONSTANT0 = 3,
}
impl From<OE_SYNC3_A> for u8 {
    #[inline(always)]
    fn from(variant: OE_SYNC3_A) -> Self {
        variant as _
    }
}
#[doc = "Field `OE_SYNC3` reader - Synchronization options for dsi_to_oe\\[3\\]"]
pub struct OE_SYNC3_R(crate::FieldReader<u8, OE_SYNC3_A>);
impl OE_SYNC3_R {
    pub(crate) fn new(bits: u8) -> Self {
        OE_SYNC3_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OE_SYNC3_A {
        match self.bits {
            0 => OE_SYNC3_A::TRANSPARENT,
            1 => OE_SYNC3_A::SINGLESYNC,
            2 => OE_SYNC3_A::CONSTANT1,
            3 => OE_SYNC3_A::CONSTANT0,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == OE_SYNC3_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == OE_SYNC3_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `CONSTANT1`"]
    #[inline(always)]
    pub fn is_constant1(&self) -> bool {
        **self == OE_SYNC3_A::CONSTANT1
    }
    #[doc = "Checks if the value of the field is `CONSTANT0`"]
    #[inline(always)]
    pub fn is_constant0(&self) -> bool {
        **self == OE_SYNC3_A::CONSTANT0
    }
}
impl core::ops::Deref for OE_SYNC3_R {
    type Target = crate::FieldReader<u8, OE_SYNC3_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OE_SYNC3` writer - Synchronization options for dsi_to_oe\\[3\\]"]
pub struct OE_SYNC3_W<'a> {
    w: &'a mut W,
}
impl<'a> OE_SYNC3_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OE_SYNC3_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(OE_SYNC3_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(OE_SYNC3_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant1(self) -> &'a mut W {
        self.variant(OE_SYNC3_A::CONSTANT1)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn constant0(self) -> &'a mut W {
        self.variant(OE_SYNC3_A::CONSTANT0)
    }
    #[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 - Synchronization options for dsi_to_oe\\[0\\]"]
    #[inline(always)]
    pub fn oe_sync0(&self) -> OE_SYNC0_R {
        OE_SYNC0_R::new((self.bits & 0x03) as u8)
    }
    #[doc = "Bits 2:3 - Synchronization options for dsi_to_oe\\[1\\]"]
    #[inline(always)]
    pub fn oe_sync1(&self) -> OE_SYNC1_R {
        OE_SYNC1_R::new(((self.bits >> 2) & 0x03) as u8)
    }
    #[doc = "Bits 4:5 - Synchronization options for dsi_to_oe\\[2\\]"]
    #[inline(always)]
    pub fn oe_sync2(&self) -> OE_SYNC2_R {
        OE_SYNC2_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 6:7 - Synchronization options for dsi_to_oe\\[3\\]"]
    #[inline(always)]
    pub fn oe_sync3(&self) -> OE_SYNC3_R {
        OE_SYNC3_R::new(((self.bits >> 6) & 0x03) as u8)
    }
}
impl W {
    #[doc = "Bits 0:1 - Synchronization options for dsi_to_oe\\[0\\]"]
    #[inline(always)]
    pub fn oe_sync0(&mut self) -> OE_SYNC0_W {
        OE_SYNC0_W { w: self }
    }
    #[doc = "Bits 2:3 - Synchronization options for dsi_to_oe\\[1\\]"]
    #[inline(always)]
    pub fn oe_sync1(&mut self) -> OE_SYNC1_W {
        OE_SYNC1_W { w: self }
    }
    #[doc = "Bits 4:5 - Synchronization options for dsi_to_oe\\[2\\]"]
    #[inline(always)]
    pub fn oe_sync2(&mut self) -> OE_SYNC2_W {
        OE_SYNC2_W { w: self }
    }
    #[doc = "Bits 6:7 - Synchronization options for dsi_to_oe\\[3\\]"]
    #[inline(always)]
    pub fn oe_sync3(&mut self) -> OE_SYNC3_W {
        OE_SYNC3_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 Sync 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 [cfg14](index.html) module"]
pub struct CFG14_SPEC;
impl crate::RegisterSpec for CFG14_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [cfg14::R](R) reader structure"]
impl crate::Readable for CFG14_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cfg14::W](W) writer structure"]
impl crate::Writable for CFG14_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets CFG14 to value 0"]
impl crate::Resettable for CFG14_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
