update VS Code config
Some checks failed
Rust/va416xx-rs/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2024-09-17 10:52:43 +02:00
parent a9185ffb48
commit b67b9d32f7
5 changed files with 54 additions and 32 deletions

View File

@ -3,9 +3,9 @@
#![no_std]
use core::cell::Cell;
use cortex_m::asm;
use cortex_m_rt::entry;
use critical_section::Mutex;
use embedded_hal::delay::DelayNs;
use panic_rtt_target as _;
use rtt_target::{rprintln, rtt_init_print};
use simple_examples::peb1;
@ -36,10 +36,11 @@ fn main() -> ! {
.xtal_n_clk_with_src_freq(peb1::EXTCLK_FREQ)
.freeze(&mut dp.sysconfig)
.unwrap();
let mut delay_provider = set_up_ms_tick(&mut dp.sysconfig, dp.tim0, &clocks);
let _ = set_up_ms_tick(&mut dp.sysconfig, dp.tim0, &clocks);
let mut second_timer = CountdownTimer::new(&mut dp.sysconfig, dp.tim1, &clocks);
second_timer.start(1.Hz());
second_timer.listen();
// let delay_provider = dp.sy
loop {
let current_ms = critical_section::with(|cs| MS_COUNTER.borrow(cs).get());
if current_ms - last_ms >= 1000 {
@ -48,7 +49,11 @@ fn main() -> ! {
let second = critical_section::with(|cs| SEC_COUNTER.borrow(cs).get());
rprintln!("Second counter: {}", second);
}
delay_provider.delay_ms(1000);
for _ in 0..30000 {
asm::nop();
}
//delay_provider.delay_ms(1000);
}
}