#[doc = "Register `WOUNDING` reader"]
pub struct R(crate::R<WOUNDING_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<WOUNDING_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<WOUNDING_SPEC>> for R {
    fn from(reader: crate::R<WOUNDING_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `WOUNDING` writer"]
pub struct W(crate::W<WOUNDING_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<WOUNDING_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<WOUNDING_SPEC>> for W {
    fn from(writer: crate::W<WOUNDING_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Maximum SAR resolution allowed\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum WOUND_RESOLUTION_AW {
    #[doc = "0: No description available"]
    CY12BIT = 0,
    #[doc = "1: No description available"]
    CY10BIT = 1,
    #[doc = "2: No description available"]
    CY8BIT = 2,
    #[doc = "3: No description available"]
    CY8BIT_TOO = 3,
}
impl From<WOUND_RESOLUTION_AW> for u8 {
    #[inline(always)]
    fn from(variant: WOUND_RESOLUTION_AW) -> Self {
        variant as _
    }
}
#[doc = "Field `WOUND_RESOLUTION` writer - Maximum SAR resolution allowed"]
pub struct WOUND_RESOLUTION_W<'a> {
    w: &'a mut W,
}
impl<'a> WOUND_RESOLUTION_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: WOUND_RESOLUTION_AW) -> &'a mut W {
        self.bits(variant.into())
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cy12bit(self) -> &'a mut W {
        self.variant(WOUND_RESOLUTION_AW::CY12BIT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cy10bit(self) -> &'a mut W {
        self.variant(WOUND_RESOLUTION_AW::CY10BIT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cy8bit(self) -> &'a mut W {
        self.variant(WOUND_RESOLUTION_AW::CY8BIT)
    }
    #[doc = "No description available"]
    #[inline(always)]
    pub fn cy8bit_too(self) -> &'a mut W {
        self.variant(WOUND_RESOLUTION_AW::CY8BIT_TOO)
    }
    #[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 u32 & 0x03);
        self.w
    }
}
impl W {
    #[doc = "Bits 0:1 - Maximum SAR resolution allowed"]
    #[inline(always)]
    pub fn wound_resolution(&mut self) -> WOUND_RESOLUTION_W {
        WOUND_RESOLUTION_W { w: self }
    }
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "SAR wounding 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 [wounding](index.html) module"]
pub struct WOUNDING_SPEC;
impl crate::RegisterSpec for WOUNDING_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [wounding::R](R) reader structure"]
impl crate::Readable for WOUNDING_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [wounding::W](W) writer structure"]
impl crate::Writable for WOUNDING_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets WOUNDING to value 0"]
impl crate::Resettable for WOUNDING_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
