Compare commits
1 Commits
0f209c152d
...
fc0775ddb4
Author | SHA1 | Date | |
---|---|---|---|
fc0775ddb4 |
@ -122,7 +122,6 @@ fn main() -> ! {
|
|||||||
}
|
}
|
||||||
TestCase::Pulse => {
|
TestCase::Pulse => {
|
||||||
// TODO: Fix
|
// TODO: Fix
|
||||||
/*
|
|
||||||
let mut output_pulsed = Output::new(pinsa.pa0, PinState::Low);
|
let mut output_pulsed = Output::new(pinsa.pa0, PinState::Low);
|
||||||
output_pulsed.configure_pulse_mode(true, PinState::Low);
|
output_pulsed.configure_pulse_mode(true, PinState::Low);
|
||||||
defmt::info!("Pulsing high 10 times..");
|
defmt::info!("Pulsing high 10 times..");
|
||||||
@ -132,21 +131,18 @@ fn main() -> ! {
|
|||||||
cortex_m::asm::delay(25_000_000);
|
cortex_m::asm::delay(25_000_000);
|
||||||
}
|
}
|
||||||
output_pulsed.configure_pulse_mode(true, PinState::High);
|
output_pulsed.configure_pulse_mode(true, PinState::High);
|
||||||
rprintln!("Pulsing low 10 times..");
|
defmt::info!("Pulsing low 10 times..");
|
||||||
for _ in 0..10 {
|
for _ in 0..10 {
|
||||||
output_pulsed.set_low();
|
output_pulsed.set_low();
|
||||||
cortex_m::asm::delay(25_000_000);
|
cortex_m::asm::delay(25_000_000);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
TestCase::DelayGpio => {
|
TestCase::DelayGpio => {
|
||||||
// TODO: Fix
|
let mut out_0 = Output::new(pinsa.pa0, PinState::Low);
|
||||||
/*
|
|
||||||
let mut out_0 = pinsa.pa0.into_readable_push_pull_output();
|
|
||||||
out_0.configure_delay(true, false);
|
out_0.configure_delay(true, false);
|
||||||
let mut out_1 = pinsa.pa1.into_readable_push_pull_output();
|
let mut out_1 = Output::new(pinsa.pa1, PinState::Low);
|
||||||
out_1.configure_delay(false, true);
|
out_1.configure_delay(false, true);
|
||||||
let mut out_2 = pinsa.pa3.into_readable_push_pull_output();
|
let mut out_2 = Output::new(pinsa.pa3, PinState::Low);
|
||||||
out_2.configure_delay(true, true);
|
out_2.configure_delay(true, true);
|
||||||
for _ in 0..20 {
|
for _ in 0..20 {
|
||||||
out_0.toggle();
|
out_0.toggle();
|
||||||
@ -154,7 +150,6 @@ fn main() -> ! {
|
|||||||
out_2.toggle();
|
out_2.toggle();
|
||||||
cortex_m::asm::delay(25_000_000);
|
cortex_m::asm::delay(25_000_000);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
TestCase::DelayMs => {
|
TestCase::DelayMs => {
|
||||||
let mut delay_timer = CountdownTimer::new(dp.tim1, 50.MHz());
|
let mut delay_timer = CountdownTimer::new(dp.tim1, 50.MHz());
|
||||||
|
Reference in New Issue
Block a user