Compare commits
1 Commits
fc0775ddb4
...
0f209c152d
Author | SHA1 | Date | |
---|---|---|---|
0f209c152d |
@@ -122,6 +122,7 @@ 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..");
|
||||||
@@ -131,18 +132,21 @@ 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);
|
||||||
defmt::info!("Pulsing low 10 times..");
|
rprintln!("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 => {
|
||||||
let mut out_0 = Output::new(pinsa.pa0, PinState::Low);
|
// TODO: Fix
|
||||||
|
/*
|
||||||
|
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 = Output::new(pinsa.pa1, PinState::Low);
|
let mut out_1 = pinsa.pa1.into_readable_push_pull_output();
|
||||||
out_1.configure_delay(false, true);
|
out_1.configure_delay(false, true);
|
||||||
let mut out_2 = Output::new(pinsa.pa3, PinState::Low);
|
let mut out_2 = pinsa.pa3.into_readable_push_pull_output();
|
||||||
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();
|
||||||
@@ -150,6 +154,7 @@ 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