Skip to content

Commit 60e7e93

Browse files
committed
Force EP0 max packet size to 64 for High Speed
1 parent 96abcb2 commit 60e7e93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test_class.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ use crate::descriptor;
99
#[cfg(feature = "test-class-high-speed")]
1010
mod sizes {
1111
pub const BUFFER: usize = 1024;
12+
pub const CONTROL_ENDPOINT: u8 = 64;
1213
pub const BULK_ENDPOINT: u16 = 512;
1314
pub const INTERRUPT_ENDPOINT: u16 = 1024;
1415
}
1516

1617
#[cfg(not(feature = "test-class-high-speed"))]
1718
mod sizes {
1819
pub const BUFFER: usize = 256;
20+
pub const CONTROL_ENDPOINT: u8 = 8;
1921
pub const BULK_ENDPOINT: u16 = 64;
2022
pub const INTERRUPT_ENDPOINT: u16 = 31;
2123
}
@@ -87,6 +89,7 @@ impl<B: UsbBus> TestClass<'_, B> {
8789
.manufacturer(MANUFACTURER)
8890
.product(PRODUCT)
8991
.serial_number(SERIAL_NUMBER)
92+
.max_packet_size_0(sizes::CONTROL_ENDPOINT)
9093
.build()
9194
}
9295

0 commit comments

Comments
 (0)