diff options
Diffstat (limited to 'embassy-usb-driver/src')
| -rw-r--r-- | embassy-usb-driver/src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/embassy-usb-driver/src/lib.rs b/embassy-usb-driver/src/lib.rs index 3b705c8c4..d204e4d85 100644 --- a/embassy-usb-driver/src/lib.rs +++ b/embassy-usb-driver/src/lib.rs | |||
| @@ -395,3 +395,12 @@ pub enum EndpointError { | |||
| 395 | /// The endpoint is disabled. | 395 | /// The endpoint is disabled. |
| 396 | Disabled, | 396 | Disabled, |
| 397 | } | 397 | } |
| 398 | |||
| 399 | impl embedded_io_async::Error for EndpointError { | ||
| 400 | fn kind(&self) -> embedded_io_async::ErrorKind { | ||
| 401 | match self { | ||
| 402 | Self::BufferOverflow => embedded_io_async::ErrorKind::OutOfMemory, | ||
| 403 | Self::Disabled => embedded_io_async::ErrorKind::NotConnected, | ||
| 404 | } | ||
| 405 | } | ||
| 406 | } | ||
