#[non_exhaustive]pub struct EndpointOptions {
pub max_packet_size: Option<u16>,
pub buffers: u8,
pub max_burst: u8,
pub additional_transactions: u8,
}Expand description
Endpoint settings chosen by the user rather than by the class.
These trade throughput for hardware resources, and don’t change how a class works. Classes take
them in their configuration for the endpoints where they matter, and pass them to the
InterfaceAltBuilder methods that allocate those endpoints. Other endpoints use
EndpointOptions::new().
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_packet_size: Option<u16>Max packet size of a bulk endpoint, in bytes, or None for the largest one the device speed
allows: 64 at full speed, 512 at high speed and 1024 at SuperSpeed. Ignored for endpoints
that aren’t bulk.
A smaller one saves packet memory. Only full speed allows that, with 8, 16 or 32.
Default: None
buffers: u8Number of packets the hardware may buffer for each endpoint.
More buffers let the hardware move the next packet while software is still busy with the previous one, which improves throughput, at the cost of more packet memory. Drivers use as many buffers as they support, up to this number.
Default: 1
max_burst: u8Maximum burst size at SuperSpeed, in packets minus one. Ignored for endpoints that aren’t bulk, and at lower speeds.
Default: 0 Max: 15
additional_transactions: u8Additional transaction opportunities per microframe at high speed (wMaxPacketSize bits
12..11). Ignored for non-periodic endpoints and at other speeds.
Default: 0 Max: 2