diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-01-31 22:27:19 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-01-31 22:27:19 +0100 |
| commit | ca10fe7135d10084e38038f3cd433da39e505bea (patch) | |
| tree | 075aca4a76caccd1bba95869c64bbb838969c8b1 /embassy-usb/src/builder.rs | |
| parent | 4c1946454874597c358e7c7d5bf555b687376a5b (diff) | |
usb: docs
Diffstat (limited to 'embassy-usb/src/builder.rs')
| -rw-r--r-- | embassy-usb/src/builder.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs index fc16d2b41..484989949 100644 --- a/embassy-usb/src/builder.rs +++ b/embassy-usb/src/builder.rs | |||
| @@ -349,11 +349,11 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> { | |||
| 349 | self.builder.config_descriptor.write(descriptor_type, descriptor) | 349 | self.builder.config_descriptor.write(descriptor_type, descriptor) |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | fn endpoint_in(&mut self, ep_type: EndpointType, max_packet_size: u16, interval: u8) -> D::EndpointIn { | 352 | fn endpoint_in(&mut self, ep_type: EndpointType, max_packet_size: u16, interval_ms: u8) -> D::EndpointIn { |
| 353 | let ep = self | 353 | let ep = self |
| 354 | .builder | 354 | .builder |
| 355 | .driver | 355 | .driver |
| 356 | .alloc_endpoint_in(ep_type, max_packet_size, interval) | 356 | .alloc_endpoint_in(ep_type, max_packet_size, interval_ms) |
| 357 | .expect("alloc_endpoint_in failed"); | 357 | .expect("alloc_endpoint_in failed"); |
| 358 | 358 | ||
| 359 | self.builder.config_descriptor.endpoint(ep.info()); | 359 | self.builder.config_descriptor.endpoint(ep.info()); |
| @@ -361,11 +361,11 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> { | |||
| 361 | ep | 361 | ep |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | fn endpoint_out(&mut self, ep_type: EndpointType, max_packet_size: u16, interval: u8) -> D::EndpointOut { | 364 | fn endpoint_out(&mut self, ep_type: EndpointType, max_packet_size: u16, interval_ms: u8) -> D::EndpointOut { |
| 365 | let ep = self | 365 | let ep = self |
| 366 | .builder | 366 | .builder |
| 367 | .driver | 367 | .driver |
| 368 | .alloc_endpoint_out(ep_type, max_packet_size, interval) | 368 | .alloc_endpoint_out(ep_type, max_packet_size, interval_ms) |
| 369 | .expect("alloc_endpoint_out failed"); | 369 | .expect("alloc_endpoint_out failed"); |
| 370 | 370 | ||
| 371 | self.builder.config_descriptor.endpoint(ep.info()); | 371 | self.builder.config_descriptor.endpoint(ep.info()); |
| @@ -393,25 +393,25 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> { | |||
| 393 | /// | 393 | /// |
| 394 | /// Descriptors are written in the order builder functions are called. Note that some | 394 | /// Descriptors are written in the order builder functions are called. Note that some |
| 395 | /// classes care about the order. | 395 | /// classes care about the order. |
| 396 | pub fn endpoint_interrupt_in(&mut self, max_packet_size: u16, interval: u8) -> D::EndpointIn { | 396 | pub fn endpoint_interrupt_in(&mut self, max_packet_size: u16, interval_ms: u8) -> D::EndpointIn { |
| 397 | self.endpoint_in(EndpointType::Interrupt, max_packet_size, interval) | 397 | self.endpoint_in(EndpointType::Interrupt, max_packet_size, interval_ms) |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | /// Allocate a INTERRUPT OUT endpoint and write its descriptor. | 400 | /// Allocate a INTERRUPT OUT endpoint and write its descriptor. |
| 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_ms: u8) -> D::EndpointOut { |
| 402 | self.endpoint_out(EndpointType::Interrupt, max_packet_size, interval) | 402 | self.endpoint_out(EndpointType::Interrupt, max_packet_size, interval_ms) |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | /// Allocate a ISOCHRONOUS IN endpoint and write its descriptor. | 405 | /// Allocate a ISOCHRONOUS IN endpoint and write its descriptor. |
| 406 | /// | 406 | /// |
| 407 | /// Descriptors are written in the order builder functions are called. Note that some | 407 | /// Descriptors are written in the order builder functions are called. Note that some |
| 408 | /// classes care about the order. | 408 | /// classes care about the order. |
| 409 | pub fn endpoint_isochronous_in(&mut self, max_packet_size: u16, interval: u8) -> D::EndpointIn { | 409 | pub fn endpoint_isochronous_in(&mut self, max_packet_size: u16, interval_ms: u8) -> D::EndpointIn { |
| 410 | self.endpoint_in(EndpointType::Isochronous, max_packet_size, interval) | 410 | self.endpoint_in(EndpointType::Isochronous, max_packet_size, interval_ms) |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | /// Allocate a ISOCHRONOUS OUT endpoint and write its descriptor. | 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 { | 414 | pub fn endpoint_isochronous_out(&mut self, max_packet_size: u16, interval_ms: u8) -> D::EndpointOut { |
| 415 | self.endpoint_out(EndpointType::Isochronous, max_packet_size, interval) | 415 | self.endpoint_out(EndpointType::Isochronous, max_packet_size, interval_ms) |
| 416 | } | 416 | } |
| 417 | } | 417 | } |
