Skip to content

Commit b4d1942

Browse files
committed
chore: update embassy-stm32
Signed-off-by: Haobo Gu <[email protected]>
1 parent 0cb97e9 commit b4d1942

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1977
-131018
lines changed

docs/src/faq.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,20 @@ mod keyboard {
8282
#[Override(chip_config)]
8383
fn config() -> Config {
8484
let mut config = Config::default();
85-
config.rcc.hse = Some(Hertz(8_000_000));
86-
config.rcc.sys_ck = Some(Hertz(48_000_000));
87-
config.rcc.pclk1 = Some(Hertz(24_000_000));
85+
config.rcc.hse = Some(Hse {
86+
freq: Hertz(8_000_000),
87+
// Oscillator for bluepill, Bypass for nucleos.
88+
mode: HseMode::Oscillator,
89+
});
90+
config.rcc.pll = Some(Pll {
91+
src: PllSource::HSE,
92+
prediv: PllPreDiv::DIV1,
93+
mul: PllMul::MUL9,
94+
});
95+
config.rcc.sys = Sysclk::PLL1_P;
96+
config.rcc.ahb_pre = AHBPrescaler::DIV1;
97+
config.rcc.apb1_pre = APBPrescaler::DIV2;
98+
config.rcc.apb2_pre = APBPrescaler::DIV1;
8899
config
89100
}
90101
}

docs/src/low_power.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ There are a few more things that you have to do:
2626
3. If you're using `keyboard.toml`, nothing more to do. The `[rmk_keyboard]` macro will check your `Cargo.toml` and do the work for you. But if you're using Rust code, you need to use `ExtiInput` as your input pins, and update generics type of RMK keyboard run:
2727

2828
```rust
29-
let pd9 = ExtiInput::new(Input::new(p.PD9, Pull::Down).degrade(), p.EXTI9.degrade());
30-
let pd8 = ExtiInput::new(Input::new(p.PD8, Pull::Down).degrade(), p.EXTI8.degrade());
31-
let pb13 = ExtiInput::new(Input::new(p.PB13, Pull::Down).degrade(), p.EXTI13.degrade());
32-
let pb12 = ExtiInput::new(Input::new(p.PB12, Pull::Down).degrade(), p.EXTI12.degrade());
29+
let pd9 = ExtiInput::new(p.PD9, p.EXTI9, Pull::Down);
30+
let pd8 = ExtiInput::new(p.PD8, p.EXTI8, Pull::Down);
31+
let pb13 = ExtiInput::new(p.PB13, p.EXTI13, Pull::Down);
32+
let pb12 = ExtiInput::new(p.PB12, p.EXTI12, Pull::Down);
3333
let input_pins = [pd9, pd8, pb13, pb12];
3434

3535
// ...Other initialization code

docs/src/use_rust_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ at [line 15-17](https://github.com/embassy-rs/embassy/blob/main/examples/stm32f4
2828

2929
```rust
3030
bind_interrupts!(struct Irqs {
31-
OTG_FS => usb_otg::InterruptHandler<peripherals::USB_OTG_FS>;
31+
OTG_FS => usb::InterruptHandler<peripherals::USB_OTG_FS>;
3232
});
3333
```
3434

0 commit comments

Comments
 (0)