diff options
| author | nitroxis <[email protected]> | 2023-01-27 15:49:19 +0100 |
|---|---|---|
| committer | nitroxis <[email protected]> | 2023-01-27 15:53:13 +0100 |
| commit | c9e2cd6dd41f9281f89ba40cc57dea07b9a224b8 (patch) | |
| tree | 8ebdce84657997cec97e5593726f8fdcc4de68f7 /embassy-usb/src | |
| parent | ffa75e1e39949807317ee75459ae9d18b5376578 (diff) | |
usb: allow adding isochronous endpoints
Diffstat (limited to 'embassy-usb/src')
| -rw-r--r-- | embassy-usb/src/builder.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs index 87a8333bb..fc16d2b41 100644 --- a/embassy-usb/src/builder.rs +++ b/embassy-usb/src/builder.rs | |||
| @@ -401,4 +401,17 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> { | |||
| 401 | pub fn endpoint_interrupt_out(&mut self, max_packet_size: u16, interval: u8) -> D::EndpointOut { | 401 | pub fn endpoint_interrupt_out(&mut self, max_packet_size: u16, interval: u8) -> D::EndpointOut { |
| 402 | self.endpoint_out(EndpointType::Interrupt, max_packet_size, interval) | 402 | self.endpoint_out(EndpointType::Interrupt, max_packet_size, interval) |
| 403 | } | 403 | } |
| 404 | |||
| 405 | /// Allocate a ISOCHRONOUS IN endpoint and write its descriptor. | ||
| 406 | /// | ||
| 407 | /// Descriptors are written in the order builder functions are called. Note that some | ||
| 408 | /// classes care about the order. | ||
| 409 | pub fn endpoint_isochronous_in(&mut self, max_packet_size: u16, interval: u8) -> D::EndpointIn { | ||
| 410 | self.endpoint_in(EndpointType::Isochronous, max_packet_size, interval) | ||
| 411 | } | ||
| 412 | |||
| 413 | /// Allocate a ISOCHRONOUS OUT endpoint and write its descriptor. | ||
| 414 | pub fn endpoint_isochronous_out(&mut self, max_packet_size: u16, interval: u8) -> D::EndpointOut { | ||
| 415 | self.endpoint_out(EndpointType::Isochronous, max_packet_size, interval) | ||
| 416 | } | ||
| 404 | } | 417 | } |
