#[doc = "Register `BKOUT` reader"]
pub type R = crate::R<BkoutSpec>;
#[doc = "Register `BKOUT` writer"]
pub type W = crate::W<BkoutSpec>;
#[doc = "Field `EN` reader - Enable Output"]
pub type EnR = crate::FieldReader;
#[doc = "Field `EN` writer - Enable Output"]
pub type EnW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `CLR` writer - Clear Output"]
pub type ClrW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `SET` writer - Set Output"]
pub type SetW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
#[doc = "Field `RTCTGL` reader - RTC Toggle Output"]
pub type RtctglR = crate::FieldReader;
#[doc = "Field `RTCTGL` writer - RTC Toggle Output"]
pub type RtctglW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
    #[doc = "Bits 0:1 - Enable Output"]
    #[inline(always)]
    pub fn en(&self) -> EnR {
        EnR::new((self.bits & 3) as u8)
    }
    #[doc = "Bits 24:25 - RTC Toggle Output"]
    #[inline(always)]
    pub fn rtctgl(&self) -> RtctglR {
        RtctglR::new(((self.bits >> 24) & 3) as u8)
    }
}
impl W {
    #[doc = "Bits 0:1 - Enable Output"]
    #[inline(always)]
    pub fn en(&mut self) -> EnW<BkoutSpec> {
        EnW::new(self, 0)
    }
    #[doc = "Bits 8:9 - Clear Output"]
    #[inline(always)]
    pub fn clr(&mut self) -> ClrW<BkoutSpec> {
        ClrW::new(self, 8)
    }
    #[doc = "Bits 16:17 - Set Output"]
    #[inline(always)]
    pub fn set_(&mut self) -> SetW<BkoutSpec> {
        SetW::new(self, 16)
    }
    #[doc = "Bits 24:25 - RTC Toggle Output"]
    #[inline(always)]
    pub fn rtctgl(&mut self) -> RtctglW<BkoutSpec> {
        RtctglW::new(self, 24)
    }
}
#[doc = "Backup Output Control\n\nYou can [`read`](crate::Reg::read) this register and get [`bkout::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`bkout::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct BkoutSpec;
impl crate::RegisterSpec for BkoutSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`bkout::R`](R) reader structure"]
impl crate::Readable for BkoutSpec {}
#[doc = "`write(|w| ..)` method takes [`bkout::W`](W) writer structure"]
impl crate::Writable for BkoutSpec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets BKOUT to value 0"]
impl crate::Resettable for BkoutSpec {
    const RESET_VALUE: u32 = 0;
}
