@@ -32,6 +32,15 @@ impl RccExt for RCC {
32
32
}
33
33
34
34
/// Constrained RCC peripheral
35
+ ///
36
+ /// An instance of this struct is aquired by calling the
37
+ /// [constrain](trait.RccExt.html#tymethod.constrain) function on the
38
+ /// [pac::RCC](../pac/struct.RCC.html) struct.
39
+ ///
40
+ /// ```
41
+ /// let dp = pac::Peripherals::take().unwrap();
42
+ /// let rcc = dp.RCC.constrain();
43
+ /// ```
35
44
pub struct Rcc {
36
45
/// AMBA High-performance Bus (AHB) registers
37
46
pub ahb : AHB ,
@@ -44,6 +53,14 @@ pub struct Rcc {
44
53
}
45
54
46
55
/// AMBA High-performance Bus (AHB) registers
56
+ ///
57
+ /// An instance of this struct is aquired from the [Rcc](../struct.Rcc.html) struct.
58
+ ///
59
+ /// ```
60
+ /// let dp = pac::Peripherals::take().unwrap();
61
+ /// let rcc = dp.RCC.constrain();
62
+ /// use_ahb(&mut rcc.ahb)
63
+ /// ```
47
64
pub struct AHB {
48
65
_0 : ( ) ,
49
66
}
@@ -61,6 +78,14 @@ impl AHB {
61
78
}
62
79
63
80
/// Advanced Peripheral Bus 1 (APB1) registers
81
+ ///
82
+ /// An instance of this struct is aquired from the [Rcc](../struct.Rcc.html) struct.
83
+ ///
84
+ /// ```
85
+ /// let dp = pac::Peripherals::take().unwrap();
86
+ /// let rcc = dp.RCC.constrain();
87
+ /// use_ahb(&mut rcc.apb1)
88
+ /// ```
64
89
pub struct APB1 {
65
90
_0 : ( ) ,
66
91
}
@@ -78,6 +103,14 @@ impl APB1 {
78
103
}
79
104
80
105
/// Advanced Peripheral Bus 2 (APB2) registers
106
+ ///
107
+ /// An instance of this struct is aquired from the [Rcc](../struct.Rcc.html) struct.
108
+ ///
109
+ /// ```
110
+ /// let dp = pac::Peripherals::take().unwrap();
111
+ /// let rcc = dp.RCC.constrain();
112
+ /// use_ahb(&mut rcc.apb2)
113
+ /// ```
81
114
pub struct APB2 {
82
115
_0 : ( ) ,
83
116
}
@@ -158,6 +191,14 @@ mod usb_clocking {
158
191
}
159
192
160
193
/// Clock configuration
194
+ ///
195
+ /// An instance of this struct is aquired from the [Rcc](../struct.Rcc.html) struct.
196
+ ///
197
+ /// ```
198
+ /// let dp = pac::Peripherals::take().unwrap();
199
+ /// let rcc = dp.RCC.constrain();
200
+ /// use_ahb(&mut rcc.cfgr)
201
+ /// ```
161
202
pub struct CFGR {
162
203
hse : Option < u32 > ,
163
204
hclk : Option < u32 > ,
0 commit comments