#[doc = "Register `PWR_DDFT_SELECT` reader"]
pub struct R(crate::R<PWR_DDFT_SELECT_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<PWR_DDFT_SELECT_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<PWR_DDFT_SELECT_SPEC>> for R {
    fn from(reader: crate::R<PWR_DDFT_SELECT_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `PWR_DDFT_SELECT` writer"]
pub struct W(crate::W<PWR_DDFT_SELECT_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<PWR_DDFT_SELECT_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<PWR_DDFT_SELECT_SPEC>> for W {
    fn from(writer: crate::W<PWR_DDFT_SELECT_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `DDFT1_SEL` reader - Signal select for ddft1 output:?0: wakeup_a?1: ipor_reset?2: hbod_reset_raw_n?3: lpcomp_dis?4: power_up_delayed?5: awake?6: hvmon_out_of_sync?7: pbod_reset?8: hvbod_reset?9: lpm_ready?10: io_disable_req_lv (excluding por_force_in_hv)?11: bootref_en"]
pub struct DDFT1_SEL_R(crate::FieldReader<u8, u8>);
impl DDFT1_SEL_R {
    pub(crate) fn new(bits: u8) -> Self {
        DDFT1_SEL_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for DDFT1_SEL_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DDFT1_SEL` writer - Signal select for ddft1 output:?0: wakeup_a?1: ipor_reset?2: hbod_reset_raw_n?3: lpcomp_dis?4: power_up_delayed?5: awake?6: hvmon_out_of_sync?7: pbod_reset?8: hvbod_reset?9: lpm_ready?10: io_disable_req_lv (excluding por_force_in_hv)?11: bootref_en"]
pub struct DDFT1_SEL_W<'a> {
    w: &'a mut W,
}
impl<'a> DDFT1_SEL_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
        self.w
    }
}
#[doc = "Field `DDFT2_SEL` reader - Signal select for ddft2 output:?0: act_power_en_a?1: power_up_raw?2: act_power_good_a?3: fastrefs_valid?4: vmon?5: bootref_outen?6: bootref_refsw?7: active_inrush_dis?8: awake?9: hvpor_reset_n?10: lpcomp_dis?11: wakeup_a?12: vmon_valid?13: block_rst_awake?14: slpholdreq_n?15: io_disable_delayed"]
pub struct DDFT2_SEL_R(crate::FieldReader<u8, u8>);
impl DDFT2_SEL_R {
    pub(crate) fn new(bits: u8) -> Self {
        DDFT2_SEL_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for DDFT2_SEL_R {
    type Target = crate::FieldReader<u8, u8>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `DDFT2_SEL` writer - Signal select for ddft2 output:?0: act_power_en_a?1: power_up_raw?2: act_power_good_a?3: fastrefs_valid?4: vmon?5: bootref_outen?6: bootref_refsw?7: active_inrush_dis?8: awake?9: hvpor_reset_n?10: lpcomp_dis?11: wakeup_a?12: vmon_valid?13: block_rst_awake?14: slpholdreq_n?15: io_disable_delayed"]
pub struct DDFT2_SEL_W<'a> {
    w: &'a mut W,
}
impl<'a> DDFT2_SEL_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
        self.w
    }
}
impl R {
    #[doc = "Bits 0:3 - Signal select for ddft1 output:?0: wakeup_a?1: ipor_reset?2: hbod_reset_raw_n?3: lpcomp_dis?4: power_up_delayed?5: awake?6: hvmon_out_of_sync?7: pbod_reset?8: hvbod_reset?9: lpm_ready?10: io_disable_req_lv (excluding por_force_in_hv)?11: bootref_en"]
    #[inline(always)]
    pub fn ddft1_sel(&self) -> DDFT1_SEL_R {
        DDFT1_SEL_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:7 - Signal select for ddft2 output:?0: act_power_en_a?1: power_up_raw?2: act_power_good_a?3: fastrefs_valid?4: vmon?5: bootref_outen?6: bootref_refsw?7: active_inrush_dis?8: awake?9: hvpor_reset_n?10: lpcomp_dis?11: wakeup_a?12: vmon_valid?13: block_rst_awake?14: slpholdreq_n?15: io_disable_delayed"]
    #[inline(always)]
    pub fn ddft2_sel(&self) -> DDFT2_SEL_R {
        DDFT2_SEL_R::new(((self.bits >> 4) & 0x0f) as u8)
    }
}
impl W {
    #[doc = "Bits 0:3 - Signal select for ddft1 output:?0: wakeup_a?1: ipor_reset?2: hbod_reset_raw_n?3: lpcomp_dis?4: power_up_delayed?5: awake?6: hvmon_out_of_sync?7: pbod_reset?8: hvbod_reset?9: lpm_ready?10: io_disable_req_lv (excluding por_force_in_hv)?11: bootref_en"]
    #[inline(always)]
    pub fn ddft1_sel(&mut self) -> DDFT1_SEL_W {
        DDFT1_SEL_W { w: self }
    }
    #[doc = "Bits 4:7 - Signal select for ddft2 output:?0: act_power_en_a?1: power_up_raw?2: act_power_good_a?3: fastrefs_valid?4: vmon?5: bootref_outen?6: bootref_refsw?7: active_inrush_dis?8: awake?9: hvpor_reset_n?10: lpcomp_dis?11: wakeup_a?12: vmon_valid?13: block_rst_awake?14: slpholdreq_n?15: io_disable_delayed"]
    #[inline(always)]
    pub fn ddft2_sel(&mut self) -> DDFT2_SEL_W {
        DDFT2_SEL_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 = "Digital DFT Select\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 [pwr_ddft_select](index.html) module"]
pub struct PWR_DDFT_SELECT_SPEC;
impl crate::RegisterSpec for PWR_DDFT_SELECT_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [pwr_ddft_select::R](R) reader structure"]
impl crate::Readable for PWR_DDFT_SELECT_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [pwr_ddft_select::W](W) writer structure"]
impl crate::Writable for PWR_DDFT_SELECT_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets PWR_DDFT_SELECT to value 0"]
impl crate::Resettable for PWR_DDFT_SELECT_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
