stm32f1_staging/stm32f107/fsmc/
btr3.rs1pub type R = crate::R<BTR3rs>;
3pub type W = crate::W<BTR3rs>;
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 BUSTURN_R = crate::FieldReader;
19pub type BUSTURN_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21pub type CLKDIV_R = crate::FieldReader;
23pub type CLKDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
25pub type DATLAT_R = crate::FieldReader;
27pub type DATLAT_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
29pub type ACCMOD_R = crate::FieldReader;
31pub type ACCMOD_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
33impl R {
34 #[inline(always)]
36 pub fn addset(&self) -> ADDSET_R {
37 ADDSET_R::new((self.bits & 0x0f) as u8)
38 }
39 #[inline(always)]
41 pub fn addhld(&self) -> ADDHLD_R {
42 ADDHLD_R::new(((self.bits >> 4) & 0x0f) as u8)
43 }
44 #[inline(always)]
46 pub fn datast(&self) -> DATAST_R {
47 DATAST_R::new(((self.bits >> 8) & 0xff) as u8)
48 }
49 #[inline(always)]
51 pub fn busturn(&self) -> BUSTURN_R {
52 BUSTURN_R::new(((self.bits >> 16) & 0x0f) as u8)
53 }
54 #[inline(always)]
56 pub fn clkdiv(&self) -> CLKDIV_R {
57 CLKDIV_R::new(((self.bits >> 20) & 0x0f) as u8)
58 }
59 #[inline(always)]
61 pub fn datlat(&self) -> DATLAT_R {
62 DATLAT_R::new(((self.bits >> 24) & 0x0f) as u8)
63 }
64 #[inline(always)]
66 pub fn accmod(&self) -> ACCMOD_R {
67 ACCMOD_R::new(((self.bits >> 28) & 3) as u8)
68 }
69}
70impl core::fmt::Debug for R {
71 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
72 f.debug_struct("BTR3")
73 .field("accmod", &self.accmod())
74 .field("datlat", &self.datlat())
75 .field("clkdiv", &self.clkdiv())
76 .field("busturn", &self.busturn())
77 .field("datast", &self.datast())
78 .field("addhld", &self.addhld())
79 .field("addset", &self.addset())
80 .finish()
81 }
82}
83impl W {
84 #[inline(always)]
86 pub fn addset(&mut self) -> ADDSET_W<BTR3rs> {
87 ADDSET_W::new(self, 0)
88 }
89 #[inline(always)]
91 pub fn addhld(&mut self) -> ADDHLD_W<BTR3rs> {
92 ADDHLD_W::new(self, 4)
93 }
94 #[inline(always)]
96 pub fn datast(&mut self) -> DATAST_W<BTR3rs> {
97 DATAST_W::new(self, 8)
98 }
99 #[inline(always)]
101 pub fn busturn(&mut self) -> BUSTURN_W<BTR3rs> {
102 BUSTURN_W::new(self, 16)
103 }
104 #[inline(always)]
106 pub fn clkdiv(&mut self) -> CLKDIV_W<BTR3rs> {
107 CLKDIV_W::new(self, 20)
108 }
109 #[inline(always)]
111 pub fn datlat(&mut self) -> DATLAT_W<BTR3rs> {
112 DATLAT_W::new(self, 24)
113 }
114 #[inline(always)]
116 pub fn accmod(&mut self) -> ACCMOD_W<BTR3rs> {
117 ACCMOD_W::new(self, 28)
118 }
119}
120pub struct BTR3rs;
126impl crate::RegisterSpec for BTR3rs {
127 type Ux = u32;
128}
129impl crate::Readable for BTR3rs {}
131impl crate::Writable for BTR3rs {
133 type Safety = crate::Unsafe;
134}
135impl crate::Resettable for BTR3rs {
137 const RESET_VALUE: u32 = 0xffff_ffff;
138}