pub struct UsbBusAllocator<B: UsbBus> { /* fields omitted */ }
Helper type used for UsbBus resource allocation and initialization.
Creates a new UsbBusAllocator
that wraps the provided UsbBus
. Usually only called by
USB driver implementations.
Allocates a new interface number.
Allocates a new string index.
Allocates an endpoint with the specified direction and address.
This directly delegates to UsbBus::alloc_ep
, so see that method for details. This should
rarely be needed by classes.
Allocates a control endpoint.
This crate implements the control state machine only for endpoint 0. If classes want to
support control requests in other endpoints, the state machine must be implemented manually.
This should rarely be needed by classes.
max_packet_size
- Maximum packet size in bytes. Must be one of 8, 16, 32 or 64.
Allocates a bulk endpoint.
max_packet_size
- Maximum packet size in bytes. Must be one of 8, 16, 32 or 64.
Allocates an interrupt endpoint.
max_packet_size
- Maximum packet size in bytes. Cannot exceed 64 bytes.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static