From 393bf323b00c39bb9396cc22ba35a536811642c7 Mon Sep 17 00:00:00 2001 From: dbydd <1992003927@qq.com> Date: Mon, 26 Aug 2024 15:35:02 +0800 Subject: [PATCH] make input context could clean all bits expect 0 of add flag --- src/context/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/context/mod.rs b/src/context/mod.rs index d0e9170..db88729 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -227,6 +227,11 @@ pub trait InputControlHandler: AsRef<[u32]> + AsMut<[u32]> { self.as_mut()[1] = 1u32; } + /// clear all drop flag + fn clear_all_drop_flag(&mut self) { + self.as_mut()[0] = 0u32; + } + rw_field_cx!([7](0..=7), configuration_value, "Configuration Value", u8); rw_field_cx!([7](8..=15), interface_number, "Interface Number", u8); rw_field_cx!([7](16..=23), alternate_setting, "Alternate Setting", u8);