Updating delay

This commit is contained in:
Ryan Summers 2021-05-06 17:14:17 +02:00
parent ff79e0a8ac
commit 89eaefd8d5
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,7 @@
#![no_std] #![no_std]
#![no_main] #![no_main]
use embedded_hal::digital::v2::InputPin;
use generic_array::typenum::U4; use generic_array::typenum::U4;
use serde::Deserialize; use serde::Deserialize;

View File

@ -167,8 +167,9 @@ pub fn setup(
system_timer::SystemTimer::initialize(tim15); system_timer::SystemTimer::initialize(tim15);
} }
let mut delay = let mut delay = asm_delay::AsmDelay::new(asm_delay::bitrate::MegaHertz(
asm_delay::AsmDelay::new(asm_delay::bitrate::MegaHertz(2 * 400)); ccdr.clocks.c_ck().0 / 1_000_000,
));
let gpioa = device.GPIOA.split(ccdr.peripheral.GPIOA); let gpioa = device.GPIOA.split(ccdr.peripheral.GPIOA);
let gpiob = device.GPIOB.split(ccdr.peripheral.GPIOB); let gpiob = device.GPIOB.split(ccdr.peripheral.GPIOB);