Skip to content

Commit

Permalink
Fix examples broken by #95 (#103)
Browse files Browse the repository at this point in the history
* Fix examples broken by #95

* fmt
  • Loading branch information
usbalbin authored Dec 18, 2023
1 parent e8e9c2d commit c34b89b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/flash_with_rtic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mod app {
use crate::utils::logger;
use stm32g4xx_hal::flash::{FlashExt, FlashSize, FlashWriter, Parts};
use stm32g4xx_hal::prelude::*;
use stm32g4xx_hal::pwr::PwrExt;
use stm32g4xx_hal::rcc::{PllConfig, RccExt};

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

let mut rcc = rcc.freeze(clock_config);
let pwr = dp.PWR.constrain().freeze();
let mut rcc = rcc.freeze(clock_config, pwr);

unsafe {
let mut flash = &(*stm32g4xx_hal::stm32::FLASH::ptr());
Expand Down
2 changes: 1 addition & 1 deletion examples/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use hal::{rcc, stm32};
use stm32g4xx_hal as hal;

use cortex_m_rt::entry;
use defmt::info;
use nb::block;
use utils::logger::info;

#[macro_use]
mod utils;
Expand Down

0 comments on commit c34b89b

Please sign in to comment.