Remove the OperatingMode typestates

Instead have two explcit types(without the mode generic arg)types:
- One for config
- One for all operating modes
This commit is contained in:
Corey Schuhen
2024-02-18 13:09:37 +10:00
parent 5ad291b708
commit eafa90cd07
6 changed files with 133 additions and 162 deletions

View File

@@ -75,7 +75,7 @@ async fn main(_spawner: Spawner) {
let options = options();
let peripherals = embassy_stm32::init(options.config);
let mut can = can::Fdcan::new(peripherals.FDCAN1, peripherals.PB8, peripherals.PB9, Irqs);
let mut can = can::FdcanConfigurator::new(peripherals.FDCAN1, peripherals.PB8, peripherals.PB9, Irqs);
// 250k bps
can.set_bitrate(250_000);