Updating delay
This commit is contained in:
parent
ff79e0a8ac
commit
89eaefd8d5
@ -2,6 +2,7 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use embedded_hal::digital::v2::InputPin;
|
||||
use generic_array::typenum::U4;
|
||||
|
||||
use serde::Deserialize;
|
||||
|
@ -167,8 +167,9 @@ pub fn setup(
|
||||
system_timer::SystemTimer::initialize(tim15);
|
||||
}
|
||||
|
||||
let mut delay =
|
||||
asm_delay::AsmDelay::new(asm_delay::bitrate::MegaHertz(2 * 400));
|
||||
let mut delay = asm_delay::AsmDelay::new(asm_delay::bitrate::MegaHertz(
|
||||
ccdr.clocks.c_ck().0 / 1_000_000,
|
||||
));
|
||||
|
||||
let gpioa = device.GPIOA.split(ccdr.peripheral.GPIOA);
|
||||
let gpiob = device.GPIOB.split(ccdr.peripheral.GPIOB);
|
||||
|
Loading…
Reference in New Issue
Block a user