stm32f4_staging/stm32f401/rtc/
prer.rs1pub type R = crate::R<PRERrs>;
3pub type W = crate::W<PRERrs>;
5pub type PREDIV_S_R = crate::FieldReader<u16>;
7pub type PREDIV_S_W<'a, REG> = crate::FieldWriter<'a, REG, 15, u16, crate::Safe>;
9pub type PREDIV_A_R = crate::FieldReader;
11pub type PREDIV_A_W<'a, REG> = crate::FieldWriter<'a, REG, 7, u8, crate::Safe>;
13impl R {
14 #[inline(always)]
16 pub fn prediv_s(&self) -> PREDIV_S_R {
17 PREDIV_S_R::new((self.bits & 0x7fff) as u16)
18 }
19 #[inline(always)]
21 pub fn prediv_a(&self) -> PREDIV_A_R {
22 PREDIV_A_R::new(((self.bits >> 16) & 0x7f) as u8)
23 }
24}
25impl core::fmt::Debug for R {
26 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
27 f.debug_struct("PRER")
28 .field("prediv_a", &self.prediv_a())
29 .field("prediv_s", &self.prediv_s())
30 .finish()
31 }
32}
33impl W {
34 #[inline(always)]
36 pub fn prediv_s(&mut self) -> PREDIV_S_W<PRERrs> {
37 PREDIV_S_W::new(self, 0)
38 }
39 #[inline(always)]
41 pub fn prediv_a(&mut self) -> PREDIV_A_W<PRERrs> {
42 PREDIV_A_W::new(self, 16)
43 }
44}
45pub struct PRERrs;
51impl crate::RegisterSpec for PRERrs {
52 type Ux = u32;
53}
54impl crate::Readable for PRERrs {}
56impl crate::Writable for PRERrs {
58 type Safety = crate::Unsafe;
59}
60impl crate::Resettable for PRERrs {
62 const RESET_VALUE: u32 = 0x007f_00ff;
63}