1 Commits

Author SHA1 Message Date
fc0775ddb4 Rework library structure
Changed:

- Move most library components to new [`vorago-shared-periphs`](https://egit.irs.uni-stuttgart.de/rust/vorago-shared-periphs)
  which is mostly re-exported in this crate.
- All HAL API constructors now have a more consistent argument order: PAC structures and resource
  management structures first, then clock configuration, then any other configuration.
- Overhaul and simplification of several HAL APIs. The system configuration and IRQ router
  peripheral instance generally does not need to be passed to HAL API anymore.
- All HAL drivers are now type erased. The constructors will still expect and consume the PAC
  singleton component for resource management purposes, but are not cached anymore.
- Refactoring of GPIO library to be more inline with embassy GPIO API.

Added:

- I2C clock timeout feature support.
2025-04-24 16:41:01 +02:00

View File

@ -122,7 +122,6 @@ fn main() -> ! {
}
TestCase::Pulse => {
// TODO: Fix
/*
let mut output_pulsed = Output::new(pinsa.pa0, PinState::Low);
output_pulsed.configure_pulse_mode(true, PinState::Low);
defmt::info!("Pulsing high 10 times..");
@ -132,21 +131,18 @@ fn main() -> ! {
cortex_m::asm::delay(25_000_000);
}
output_pulsed.configure_pulse_mode(true, PinState::High);
rprintln!("Pulsing low 10 times..");
defmt::info!("Pulsing low 10 times..");
for _ in 0..10 {
output_pulsed.set_low();
cortex_m::asm::delay(25_000_000);
}
*/
}
TestCase::DelayGpio => {
// TODO: Fix
/*
let mut out_0 = pinsa.pa0.into_readable_push_pull_output();
let mut out_0 = Output::new(pinsa.pa0, PinState::Low);
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);
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);
for _ in 0..20 {
out_0.toggle();
@ -154,7 +150,6 @@ fn main() -> ! {
out_2.toggle();
cortex_m::asm::delay(25_000_000);
}
*/
}
TestCase::DelayMs => {
let mut delay_timer = CountdownTimer::new(dp.tim1, 50.MHz());