Skip to content

Commit c34b89b

Browse files
authored
Fix examples broken by #95 (#103)
* Fix examples broken by #95 * fmt
1 parent e8e9c2d commit c34b89b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/flash_with_rtic.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ mod app {
1212
use crate::utils::logger;
1313
use stm32g4xx_hal::flash::{FlashExt, FlashSize, FlashWriter, Parts};
1414
use stm32g4xx_hal::prelude::*;
15+
use stm32g4xx_hal::pwr::PwrExt;
1516
use stm32g4xx_hal::rcc::{PllConfig, RccExt};
1617

1718
const LOG_LEVEL: log::LevelFilter = log::LevelFilter::Info;
@@ -67,7 +68,8 @@ mod app {
6768
// The ADC will ultimately be put into synchronous mode and will derive
6869
// its clock from the AHB bus clock, with a prescalar of 2 or 4.
6970

70-
let mut rcc = rcc.freeze(clock_config);
71+
let pwr = dp.PWR.constrain().freeze();
72+
let mut rcc = rcc.freeze(clock_config, pwr);
7173

7274
unsafe {
7375
let mut flash = &(*stm32g4xx_hal::stm32::FLASH::ptr());

examples/uart.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use hal::{rcc, stm32};
1212
use stm32g4xx_hal as hal;
1313

1414
use cortex_m_rt::entry;
15-
use defmt::info;
1615
use nb::block;
16+
use utils::logger::info;
1717

1818
#[macro_use]
1919
mod utils;

0 commit comments

Comments
 (0)