#[embassy_executor::task] pub async fn dispatcher(innie: Innie, outie: OutieRef, mut led: Output<'static, AnyPin>) { loop { let msg = innie.receive().await; let Some(whbody) = WhBody::try_from(&msg) else { continue; }; match whbody.wh.key { icd::Uptime::REQ_KEY => { // This has no request body handle_uptime(outie, whbody.wh.seq_no).await; } icd::ResetToBootloader::REQ_KEY => { handle_reset_bootload(outie, whbody.wh.seq_no).await; } icd::Ident::REQ_KEY => { if let Ok(time_ms) = postcard::from_bytes::<::Request>(whbody.body) { handle_ident(outie, whbody.wh.seq_no, time_ms, &mut led).await; } } _ => { // oops } } } }