From 2d7ba44621fa35abad07d2ddb8b253e815ce2c1f Mon Sep 17 00:00:00 2001 From: kbleeke Date: Sun, 2 Apr 2023 20:19:47 +0200 Subject: rework event handling to allow sending data --- src/ioctl.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ioctl.rs') diff --git a/src/ioctl.rs b/src/ioctl.rs index 89b20a2d6..803934cf9 100644 --- a/src/ioctl.rs +++ b/src/ioctl.rs @@ -4,6 +4,8 @@ use core::task::{Poll, Waker}; use embassy_sync::waitqueue::WakerRegistration; +use crate::fmt::Bytes; + #[derive(Clone, Copy)] pub enum IoctlType { Get = 0, @@ -100,6 +102,8 @@ impl IoctlState { pub fn ioctl_done(&self, response: &[u8]) { if let IoctlStateInner::Sent { buf } = self.state.get() { + info!("IOCTL Response: {:02x}", Bytes(response)); + // TODO fix this (unsafe { &mut *buf }[..response.len()]).copy_from_slice(response); @@ -107,6 +111,8 @@ impl IoctlState { resp_len: response.len(), }); self.wake_control(); + } else { + warn!("IOCTL Response but no pending Ioctl"); } } } -- cgit