stm32f1_staging/stm32f107/fsmc/
bwtr1.rs1pub type R = crate::R<BWTR1rs>;
3pub type W = crate::W<BWTR1rs>;
5pub type ADDSET_R = crate::FieldReader;
7pub type ADDSET_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9pub type ADDHLD_R = crate::FieldReader;
11pub type ADDHLD_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13pub type DATAST_R = crate::FieldReader;
15pub type DATAST_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17pub type CLKDIV_R = crate::FieldReader;
19pub type CLKDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21pub type DATLAT_R = crate::FieldReader;
23pub type DATLAT_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
25pub type ACCMOD_R = crate::FieldReader;
27pub type ACCMOD_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29impl R {
30 #[inline(always)]
32 pub fn addset(&self) -> ADDSET_R {
33 ADDSET_R::new((self.bits & 0x0f) as u8)
34 }
35 #[inline(always)]
37 pub fn addhld(&self) -> ADDHLD_R {
38 ADDHLD_R::new(((self.bits >> 4) & 0x0f) as u8)
39 }
40 #[inline(always)]
42 pub fn datast(&self) -> DATAST_R {
43 DATAST_R::new(((self.bits >> 8) & 0xff) as u8)
44 }
45 #[inline(always)]
47 pub fn clkdiv(&self) -> CLKDIV_R {
48 CLKDIV_R::new(((self.bits >> 20) & 0x0f) as u8)
49 }
50 #[inline(always)]
52 pub fn datlat(&self) -> DATLAT_R {
53 DATLAT_R::new(((self.bits >> 24) & 0x0f) as u8)
54 }
55 #[inline(always)]
57 pub fn accmod(&self) -> ACCMOD_R {
58 ACCMOD_R::new(((self.bits >> 28) & 3) as u8)
59 }
60}
61impl core::fmt::Debug for R {
62 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
63 f.debug_struct("BWTR1")
64 .field("accmod", &self.accmod())
65 .field("datlat", &self.datlat())
66 .field("clkdiv", &self.clkdiv())
67 .field("datast", &self.datast())
68 .field("addhld", &self.addhld())
69 .field("addset", &self.addset())
70 .finish()
71 }
72}
73impl W {
74 #[inline(always)]
76 pub fn addset(&mut self) -> ADDSET_W<BWTR1rs> {
77 ADDSET_W::new(self, 0)
78 }
79 #[inline(always)]
81 pub fn addhld(&mut self) -> ADDHLD_W<BWTR1rs> {
82 ADDHLD_W::new(self, 4)
83 }
84 #[inline(always)]
86 pub fn datast(&mut self) -> DATAST_W<BWTR1rs> {
87 DATAST_W::new(self, 8)
88 }
89 #[inline(always)]
91 pub fn clkdiv(&mut self) -> CLKDIV_W<BWTR1rs> {
92 CLKDIV_W::new(self, 20)
93 }
94 #[inline(always)]
96 pub fn datlat(&mut self) -> DATLAT_W<BWTR1rs> {
97 DATLAT_W::new(self, 24)
98 }
99 #[inline(always)]
101 pub fn accmod(&mut self) -> ACCMOD_W<BWTR1rs> {
102 ACCMOD_W::new(self, 28)
103 }
104}
105pub struct BWTR1rs;
111impl crate::RegisterSpec for BWTR1rs {
112 type Ux = u32;
113}
114impl crate::Readable for BWTR1rs {}
116impl crate::Writable for BWTR1rs {
118 type Safety = crate::Unsafe;
119}
120impl crate::Resettable for BWTR1rs {
122 const RESET_VALUE: u32 = 0x0fff_ffff;
123}