Skip to content

Commit 1d075f8

Browse files
committed
Fix rcc docs
1 parent 92d9357 commit 1d075f8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/rcc.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl AHB {
8787
/// ```
8888
/// let dp = pac::Peripherals::take().unwrap();
8989
/// let rcc = dp.RCC.constrain();
90-
/// use_ahb(&mut rcc.apb1)
90+
/// use_apb1(&mut rcc.apb1)
9191
/// ```
9292
pub struct APB1 {
9393
_0: (),
@@ -112,7 +112,7 @@ impl APB1 {
112112
/// ```
113113
/// let dp = pac::Peripherals::take().unwrap();
114114
/// let rcc = dp.RCC.constrain();
115-
/// use_ahb(&mut rcc.apb2)
115+
/// use_apb2(&mut rcc.apb2)
116116
/// ```
117117
pub struct APB2 {
118118
_0: (),
@@ -212,7 +212,7 @@ impl BDCR {
212212
/// ```
213213
/// let dp = pac::Peripherals::take().unwrap();
214214
/// let rcc = dp.RCC.constrain();
215-
/// use_ahb(&mut rcc.cfgr)
215+
/// use_cfgr(&mut rcc.cfgr)
216216
/// ```
217217
pub struct CFGR {
218218
hse: Option<u32>,
@@ -376,10 +376,11 @@ impl CFGR {
376376
}
377377

378378
// PLL_MUL maximal value is 16
379-
assert!(divisor <= 16);
380-
// PRE_DIV maximal value is 16
381379
assert!(multiplier <= 16);
382380

381+
// PRE_DIV maximal value is 16
382+
assert!(divisor <= 16);
383+
383384
(multiplier, Some(divisor))
384385
}
385386
// HSI division is always divided by 2 and has no adjustable division

0 commit comments

Comments
 (0)