diff options
| author | Matt Rodgers <[email protected]> | 2025-05-07 21:15:54 +0100 |
|---|---|---|
| committer | Matt Rodgers <[email protected]> | 2025-05-07 21:22:56 +0100 |
| commit | d46d3119cea14f6cd14c2fae7bf712faff4e6cfe (patch) | |
| tree | 42cd08301eb67cd2836db1334328248729957607 /embassy-usb-driver/src/lib.rs | |
| parent | 6c6ae4f9fca1eaff6cb9f2896de333d9493ea840 (diff) | |
Implement embedded-io-async traits for USB CDC ACM
Diffstat (limited to 'embassy-usb-driver/src/lib.rs')
| -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 | } | ||
