Skip to content

Commit

Permalink
make input context could clean all bits expect 0 of add flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dbydd committed Aug 26, 2024
1 parent 3515506 commit fced957
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ pub trait InputControlHandler: AsRef<[u32]> + AsMut<[u32]> {
self.as_mut()[1].set_bit(i, false);
}

/// clear all add flag expect ep 0
fn clear_all_nonep0_add_flag(&mut self) {
self.as_mut()[1] = 1u32;
}

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);
Expand Down

0 comments on commit fced957

Please sign in to comment.