diff options
author | alexmoon <alex.r.moon@gmail.com> | 2022-04-05 22:04:11 -0400 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2022-04-09 01:48:17 +0200 |
commit | e867364d42477ecf3dc48e6fd787dff96cb6fadf (patch) | |
tree | 9bd64f21d1343b60186ce437f576c6a0fbbfdda6 /embassy-usb-serial | |
parent | b2cdaa56c1dca5ce293dad3b1e450f97bcf85251 (diff) | |
download | embassy-e867364d42477ecf3dc48e6fd787dff96cb6fadf.zip |
Unify ReadError and WriteError into EndpointError
Diffstat (limited to 'embassy-usb-serial')
-rw-r--r-- | embassy-usb-serial/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-usb-serial/src/lib.rs b/embassy-usb-serial/src/lib.rs index 07352fac..7b25398d 100644 --- a/embassy-usb-serial/src/lib.rs +++ b/embassy-usb-serial/src/lib.rs @@ -10,7 +10,7 @@ use core::mem::{self, MaybeUninit}; use core::sync::atomic::{AtomicBool, Ordering}; use embassy::blocking_mutex::CriticalSectionMutex; use embassy_usb::control::{self, ControlHandler, InResponse, OutResponse, Request}; -use embassy_usb::driver::{Endpoint, EndpointIn, EndpointOut, ReadError, WriteError}; +use embassy_usb::driver::{Endpoint, EndpointError, EndpointIn, EndpointOut}; use embassy_usb::{driver::Driver, types::*, UsbDeviceBuilder}; /// This should be used as `device_class` when building the `UsbDevice`. @@ -265,12 +265,12 @@ impl<'d, D: Driver<'d>> CdcAcmClass<'d, D> { } /// Writes a single packet into the IN endpoint. - pub async fn write_packet(&mut self, data: &[u8]) -> Result<(), WriteError> { + pub async fn write_packet(&mut self, data: &[u8]) -> Result<(), EndpointError> { self.write_ep.write(data).await } /// Reads a single packet from the OUT endpoint. - pub async fn read_packet(&mut self, data: &mut [u8]) -> Result<usize, ReadError> { + pub async fn read_packet(&mut self, data: &mut [u8]) -> Result<usize, EndpointError> { self.read_ep.read(data).await } |