at32f4xx_pac/at32f407/rtc/
divh.rs

1#[doc = "Register `DIVH` writer"]
2pub type W = crate::W<DIVH_SPEC>;
3#[doc = "Field `DIV` writer - RTC divider high"]
4pub type DIV_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
5impl core::fmt::Debug for crate::generic::Reg<DIVH_SPEC> {
6    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7        write!(f, "(not readable)")
8    }
9}
10impl W {
11    #[doc = "Bits 0:3 - RTC divider high"]
12    #[inline(always)]
13    #[must_use]
14    pub fn div(&mut self) -> DIV_W<DIVH_SPEC> {
15        DIV_W::new(self, 0)
16    }
17}
18#[doc = "RTC Divider Register High\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`divh::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
19pub struct DIVH_SPEC;
20impl crate::RegisterSpec for DIVH_SPEC {
21    type Ux = u32;
22}
23#[doc = "`write(|w| ..)` method takes [`divh::W`](W) writer structure"]
24impl crate::Writable for DIVH_SPEC {
25    type Safety = crate::Unsafe;
26    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
27    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
28}
29#[doc = "`reset()` method sets DIVH to value 0"]
30impl crate::Resettable for DIVH_SPEC {
31    const RESET_VALUE: u32 = 0;
32}