diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-04-16 04:47:27 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-04-23 01:11:10 +0200 |
| commit | 092c2b7dfea146681cea01fd4e4105c21c62b61f (patch) | |
| tree | be32635e53177b36ef36939bcdd5eadcf3be3ab8 /embassy-usb/src/types.rs | |
| parent | ea0a701ebd142ea42e05e51e844bd53cc9bdf354 (diff) | |
usb: builtin handling of interface alternate settings
The stack reads its own descriptors to figure out which endpoints
are used in which alt settings, and enables/disables them as needed.
The ControlHandler has a callback so it can get notified of alternate
setting changes, which is purely informative (it doesn't have to do anything).
Diffstat (limited to 'embassy-usb/src/types.rs')
| -rw-r--r-- | embassy-usb/src/types.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-usb/src/types.rs b/embassy-usb/src/types.rs index 9d00e46cb..b8717ffa9 100644 --- a/embassy-usb/src/types.rs +++ b/embassy-usb/src/types.rs | |||
| @@ -106,7 +106,7 @@ pub struct EndpointInfo { | |||
| 106 | /// A handle for a USB interface that contains its number. | 106 | /// A handle for a USB interface that contains its number. |
| 107 | #[derive(Copy, Clone, Eq, PartialEq)] | 107 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 108 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 108 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 109 | pub struct InterfaceNumber(u8); | 109 | pub struct InterfaceNumber(pub(crate) u8); |
| 110 | 110 | ||
| 111 | impl InterfaceNumber { | 111 | impl InterfaceNumber { |
| 112 | pub(crate) fn new(index: u8) -> InterfaceNumber { | 112 | pub(crate) fn new(index: u8) -> InterfaceNumber { |
