stm32f1_staging/stm32f103/flash/
obr.rs1pub type R = crate::R<OBRrs>;
3pub type OPTERR_R = crate::BitReader;
5pub type RDPRT_R = crate::BitReader;
7pub type WDG_SW_R = crate::BitReader;
9pub type N_RST_STOP_R = crate::BitReader;
11pub type N_RST_STDBY_R = crate::BitReader;
13pub type DATA0_R = crate::FieldReader;
15pub type DATA1_R = crate::FieldReader;
17impl R {
18 #[inline(always)]
20 pub fn opterr(&self) -> OPTERR_R {
21 OPTERR_R::new((self.bits & 1) != 0)
22 }
23 #[inline(always)]
25 pub fn rdprt(&self) -> RDPRT_R {
26 RDPRT_R::new(((self.bits >> 1) & 1) != 0)
27 }
28 #[inline(always)]
30 pub fn wdg_sw(&self) -> WDG_SW_R {
31 WDG_SW_R::new(((self.bits >> 2) & 1) != 0)
32 }
33 #[inline(always)]
35 pub fn n_rst_stop(&self) -> N_RST_STOP_R {
36 N_RST_STOP_R::new(((self.bits >> 3) & 1) != 0)
37 }
38 #[inline(always)]
40 pub fn n_rst_stdby(&self) -> N_RST_STDBY_R {
41 N_RST_STDBY_R::new(((self.bits >> 4) & 1) != 0)
42 }
43 #[inline(always)]
45 pub fn data0(&self) -> DATA0_R {
46 DATA0_R::new(((self.bits >> 10) & 0xff) as u8)
47 }
48 #[inline(always)]
50 pub fn data1(&self) -> DATA1_R {
51 DATA1_R::new(((self.bits >> 18) & 0xff) as u8)
52 }
53}
54impl core::fmt::Debug for R {
55 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
56 f.debug_struct("OBR")
57 .field("opterr", &self.opterr())
58 .field("rdprt", &self.rdprt())
59 .field("wdg_sw", &self.wdg_sw())
60 .field("n_rst_stop", &self.n_rst_stop())
61 .field("n_rst_stdby", &self.n_rst_stdby())
62 .field("data0", &self.data0())
63 .field("data1", &self.data1())
64 .finish()
65 }
66}
67pub struct OBRrs;
73impl crate::RegisterSpec for OBRrs {
74 type Ux = u32;
75}
76impl crate::Readable for OBRrs {}
78impl crate::Resettable for OBRrs {
80 const RESET_VALUE: u32 = 0x03ff_fffc;
81}