#[doc = "Register `CFG7` reader"]
pub struct R(crate::R<CFG7_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CFG7_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<CFG7_SPEC>> for R {
    fn from(reader: crate::R<CFG7_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `CFG7` writer"]
pub struct W(crate::W<CFG7_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<CFG7_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<CFG7_SPEC>> for W {
    fn from(writer: crate::W<CFG7_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Synchronization selection for PA input 4\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum IN_SYNC4_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    DOUBLESYNC = 2,
    #[doc = "3: No description available"]
    RSVD = 3,
}
impl From<IN_SYNC4_A> for u8 {
    #[inline(always)]
    fn from(variant: IN_SYNC4_A) -> Self {
        variant as _
    }
}
#[doc = "Field `IN_SYNC4` reader - Synchronization selection for PA input 4"]
pub struct IN_SYNC4_R(crate::FieldReader<u8, IN_SYNC4_A>);
impl IN_SYNC4_R {
    pub(crate) fn new(bits: u8) -> Self {
        IN_SYNC4_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IN_SYNC4_A {
        match self.bits {
            0 => IN_SYNC4_A::TRANSPARENT,
            1 => IN_SYNC4_A::SINGLESYNC,
            2 => IN_SYNC4_A::DOUBLESYNC,
            3 => IN_SYNC4_A::RSVD,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == IN_SYNC4_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == IN_SYNC4_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `DOUBLESYNC`"]
    #[inline(always)]
    pub fn is_doublesync(&self) -> bool {
        **self == IN_SYNC4_A::DOUBLESYNC
    }
    #[doc = "Checks if the value of the field is `RSVD`"]
    #[inline(always)]
    pub fn is_rsvd(&self) -> bool {
        **self == IN_SYNC4_A::RSVD
    }
}
impl core::ops::Deref for IN_SYNC4_R {
    type Target = crate::FieldReader<u8, IN_SYNC4_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `IN_SYNC4` writer - Synchronization selection for PA input 4"]
pub struct IN_SYNC4_W<'a> {
    w: &'a mut W,
}
impl<'a> IN_SYNC4_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: IN_SYNC4_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(IN_SYNC4_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(IN_SYNC4_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn doublesync(self) -> &'a mut W {
        self.variant(IN_SYNC4_A::DOUBLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn rsvd(self) -> &'a mut W {
        self.variant(IN_SYNC4_A::RSVD)
    }
    #[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 selection for PA input 5\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum IN_SYNC5_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    DOUBLESYNC = 2,
    #[doc = "3: No description available"]
    RSVD = 3,
}
impl From<IN_SYNC5_A> for u8 {
    #[inline(always)]
    fn from(variant: IN_SYNC5_A) -> Self {
        variant as _
    }
}
#[doc = "Field `IN_SYNC5` reader - Synchronization selection for PA input 5"]
pub struct IN_SYNC5_R(crate::FieldReader<u8, IN_SYNC5_A>);
impl IN_SYNC5_R {
    pub(crate) fn new(bits: u8) -> Self {
        IN_SYNC5_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IN_SYNC5_A {
        match self.bits {
            0 => IN_SYNC5_A::TRANSPARENT,
            1 => IN_SYNC5_A::SINGLESYNC,
            2 => IN_SYNC5_A::DOUBLESYNC,
            3 => IN_SYNC5_A::RSVD,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == IN_SYNC5_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == IN_SYNC5_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `DOUBLESYNC`"]
    #[inline(always)]
    pub fn is_doublesync(&self) -> bool {
        **self == IN_SYNC5_A::DOUBLESYNC
    }
    #[doc = "Checks if the value of the field is `RSVD`"]
    #[inline(always)]
    pub fn is_rsvd(&self) -> bool {
        **self == IN_SYNC5_A::RSVD
    }
}
impl core::ops::Deref for IN_SYNC5_R {
    type Target = crate::FieldReader<u8, IN_SYNC5_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `IN_SYNC5` writer - Synchronization selection for PA input 5"]
pub struct IN_SYNC5_W<'a> {
    w: &'a mut W,
}
impl<'a> IN_SYNC5_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: IN_SYNC5_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(IN_SYNC5_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(IN_SYNC5_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn doublesync(self) -> &'a mut W {
        self.variant(IN_SYNC5_A::DOUBLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn rsvd(self) -> &'a mut W {
        self.variant(IN_SYNC5_A::RSVD)
    }
    #[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 selection for PA input 6\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum IN_SYNC6_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    DOUBLESYNC = 2,
    #[doc = "3: No description available"]
    RSVD = 3,
}
impl From<IN_SYNC6_A> for u8 {
    #[inline(always)]
    fn from(variant: IN_SYNC6_A) -> Self {
        variant as _
    }
}
#[doc = "Field `IN_SYNC6` reader - Synchronization selection for PA input 6"]
pub struct IN_SYNC6_R(crate::FieldReader<u8, IN_SYNC6_A>);
impl IN_SYNC6_R {
    pub(crate) fn new(bits: u8) -> Self {
        IN_SYNC6_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IN_SYNC6_A {
        match self.bits {
            0 => IN_SYNC6_A::TRANSPARENT,
            1 => IN_SYNC6_A::SINGLESYNC,
            2 => IN_SYNC6_A::DOUBLESYNC,
            3 => IN_SYNC6_A::RSVD,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == IN_SYNC6_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == IN_SYNC6_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `DOUBLESYNC`"]
    #[inline(always)]
    pub fn is_doublesync(&self) -> bool {
        **self == IN_SYNC6_A::DOUBLESYNC
    }
    #[doc = "Checks if the value of the field is `RSVD`"]
    #[inline(always)]
    pub fn is_rsvd(&self) -> bool {
        **self == IN_SYNC6_A::RSVD
    }
}
impl core::ops::Deref for IN_SYNC6_R {
    type Target = crate::FieldReader<u8, IN_SYNC6_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `IN_SYNC6` writer - Synchronization selection for PA input 6"]
pub struct IN_SYNC6_W<'a> {
    w: &'a mut W,
}
impl<'a> IN_SYNC6_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: IN_SYNC6_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(IN_SYNC6_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(IN_SYNC6_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn doublesync(self) -> &'a mut W {
        self.variant(IN_SYNC6_A::DOUBLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn rsvd(self) -> &'a mut W {
        self.variant(IN_SYNC6_A::RSVD)
    }
    #[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 selection for PA input 7\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum IN_SYNC7_A {
    #[doc = "0: No description available"]
    TRANSPARENT = 0,
    #[doc = "1: No description available"]
    SINGLESYNC = 1,
    #[doc = "2: No description available"]
    DOUBLESYNC = 2,
    #[doc = "3: No description available"]
    RSVD = 3,
}
impl From<IN_SYNC7_A> for u8 {
    #[inline(always)]
    fn from(variant: IN_SYNC7_A) -> Self {
        variant as _
    }
}
#[doc = "Field `IN_SYNC7` reader - Synchronization selection for PA input 7"]
pub struct IN_SYNC7_R(crate::FieldReader<u8, IN_SYNC7_A>);
impl IN_SYNC7_R {
    pub(crate) fn new(bits: u8) -> Self {
        IN_SYNC7_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> IN_SYNC7_A {
        match self.bits {
            0 => IN_SYNC7_A::TRANSPARENT,
            1 => IN_SYNC7_A::SINGLESYNC,
            2 => IN_SYNC7_A::DOUBLESYNC,
            3 => IN_SYNC7_A::RSVD,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TRANSPARENT`"]
    #[inline(always)]
    pub fn is_transparent(&self) -> bool {
        **self == IN_SYNC7_A::TRANSPARENT
    }
    #[doc = "Checks if the value of the field is `SINGLESYNC`"]
    #[inline(always)]
    pub fn is_singlesync(&self) -> bool {
        **self == IN_SYNC7_A::SINGLESYNC
    }
    #[doc = "Checks if the value of the field is `DOUBLESYNC`"]
    #[inline(always)]
    pub fn is_doublesync(&self) -> bool {
        **self == IN_SYNC7_A::DOUBLESYNC
    }
    #[doc = "Checks if the value of the field is `RSVD`"]
    #[inline(always)]
    pub fn is_rsvd(&self) -> bool {
        **self == IN_SYNC7_A::RSVD
    }
}
impl core::ops::Deref for IN_SYNC7_R {
    type Target = crate::FieldReader<u8, IN_SYNC7_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `IN_SYNC7` writer - Synchronization selection for PA input 7"]
pub struct IN_SYNC7_W<'a> {
    w: &'a mut W,
}
impl<'a> IN_SYNC7_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: IN_SYNC7_A) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn transparent(self) -> &'a mut W {
        self.variant(IN_SYNC7_A::TRANSPARENT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn singlesync(self) -> &'a mut W {
        self.variant(IN_SYNC7_A::SINGLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn doublesync(self) -> &'a mut W {
        self.variant(IN_SYNC7_A::DOUBLESYNC)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn rsvd(self) -> &'a mut W {
        self.variant(IN_SYNC7_A::RSVD)
    }
    #[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 selection for PA input 4"]
    #[inline(always)]
    pub fn in_sync4(&self) -> IN_SYNC4_R {
        IN_SYNC4_R::new((self.bits & 0x03) as u8)
    }
    #[doc = "Bits 2:3 - Synchronization selection for PA input 5"]
    #[inline(always)]
    pub fn in_sync5(&self) -> IN_SYNC5_R {
        IN_SYNC5_R::new(((self.bits >> 2) & 0x03) as u8)
    }
    #[doc = "Bits 4:5 - Synchronization selection for PA input 6"]
    #[inline(always)]
    pub fn in_sync6(&self) -> IN_SYNC6_R {
        IN_SYNC6_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 6:7 - Synchronization selection for PA input 7"]
    #[inline(always)]
    pub fn in_sync7(&self) -> IN_SYNC7_R {
        IN_SYNC7_R::new(((self.bits >> 6) & 0x03) as u8)
    }
}
impl W {
    #[doc = "Bits 0:1 - Synchronization selection for PA input 4"]
    #[inline(always)]
    pub fn in_sync4(&mut self) -> IN_SYNC4_W {
        IN_SYNC4_W { w: self }
    }
    #[doc = "Bits 2:3 - Synchronization selection for PA input 5"]
    #[inline(always)]
    pub fn in_sync5(&mut self) -> IN_SYNC5_W {
        IN_SYNC5_W { w: self }
    }
    #[doc = "Bits 4:5 - Synchronization selection for PA input 6"]
    #[inline(always)]
    pub fn in_sync6(&mut self) -> IN_SYNC6_W {
        IN_SYNC6_W { w: self }
    }
    #[doc = "Bits 6:7 - Synchronization selection for PA input 7"]
    #[inline(always)]
    pub fn in_sync7(&mut self) -> IN_SYNC7_W {
        IN_SYNC7_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 Input Data Sync Control 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 [cfg7](index.html) module"]
pub struct CFG7_SPEC;
impl crate::RegisterSpec for CFG7_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [cfg7::R](R) reader structure"]
impl crate::Readable for CFG7_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cfg7::W](W) writer structure"]
impl crate::Writable for CFG7_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets CFG7 to value 0"]
impl crate::Resettable for CFG7_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
