stm32f1_staging/stm32f100/cec/
cfgr.rs1pub type R = crate::R<CFGRrs>;
3pub type W = crate::W<CFGRrs>;
5pub type PE_R = crate::BitReader;
7pub type PE_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type IE_R = crate::BitReader;
11pub type IE_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type BTEM_R = crate::BitReader;
15pub type BTEM_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type BPEM_R = crate::BitReader;
19pub type BPEM_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[inline(always)]
24 pub fn pe(&self) -> PE_R {
25 PE_R::new((self.bits & 1) != 0)
26 }
27 #[inline(always)]
29 pub fn ie(&self) -> IE_R {
30 IE_R::new(((self.bits >> 1) & 1) != 0)
31 }
32 #[inline(always)]
34 pub fn btem(&self) -> BTEM_R {
35 BTEM_R::new(((self.bits >> 2) & 1) != 0)
36 }
37 #[inline(always)]
39 pub fn bpem(&self) -> BPEM_R {
40 BPEM_R::new(((self.bits >> 3) & 1) != 0)
41 }
42}
43impl core::fmt::Debug for R {
44 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
45 f.debug_struct("CFGR")
46 .field("pe", &self.pe())
47 .field("ie", &self.ie())
48 .field("btem", &self.btem())
49 .field("bpem", &self.bpem())
50 .finish()
51 }
52}
53impl W {
54 #[inline(always)]
56 pub fn pe(&mut self) -> PE_W<CFGRrs> {
57 PE_W::new(self, 0)
58 }
59 #[inline(always)]
61 pub fn ie(&mut self) -> IE_W<CFGRrs> {
62 IE_W::new(self, 1)
63 }
64 #[inline(always)]
66 pub fn btem(&mut self) -> BTEM_W<CFGRrs> {
67 BTEM_W::new(self, 2)
68 }
69 #[inline(always)]
71 pub fn bpem(&mut self) -> BPEM_W<CFGRrs> {
72 BPEM_W::new(self, 3)
73 }
74}
75pub struct CFGRrs;
81impl crate::RegisterSpec for CFGRrs {
82 type Ux = u32;
83}
84impl crate::Readable for CFGRrs {}
86impl crate::Writable for CFGRrs {
88 type Safety = crate::Unsafe;
89}
90impl crate::Resettable for CFGRrs {}