xhcid: fix isoch and interrupt endpoint types being swapped

This commit is contained in:
Jeremy Soller
2024-04-16 09:13:44 -06:00
parent c85baf220e
commit 29b1c1aa0d
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -112,9 +112,9 @@ impl EndpDesc {
pub fn ty(self) -> EndpointTy {
match self.attributes & ENDP_ATTR_TY_MASK {
0 => EndpointTy::Ctrl,
1 => EndpointTy::Interrupt,
1 => EndpointTy::Isoch,
2 => EndpointTy::Bulk,
3 => EndpointTy::Isoch,
3 => EndpointTy::Interrupt,
_ => unreachable!(),
}
}
+4 -4
View File
@@ -17,18 +17,18 @@ pub const ENDP_ATTR_TY_MASK: u8 = 0x3;
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum EndpointTy {
Ctrl = 0,
Interrupt = 1,
Isoch = 1,
Bulk = 2,
Isoch = 3,
Interrupt = 3,
}
impl EndpointDescriptor {
fn ty(self) -> EndpointTy {
match self.attributes & ENDP_ATTR_TY_MASK {
0 => EndpointTy::Ctrl,
1 => EndpointTy::Interrupt,
1 => EndpointTy::Isoch,
2 => EndpointTy::Bulk,
3 => EndpointTy::Isoch,
3 => EndpointTy::Interrupt,
_ => unreachable!(),
}
}