pub type EndpointIn<'a, B> = Endpoint<'a, B, In>;Expand description
A device-to-host (IN) endpoint handle.
Aliased Type§
pub struct EndpointIn<'a, B> { /* private fields */ }Implementations§
Source§impl<B: UsbBus> EndpointIn<'_, B>
impl<B: UsbBus> EndpointIn<'_, B>
Sourcepub fn write(&self, data: &[u8]) -> UsbResult<usize>
pub fn write(&self, data: &[u8]) -> UsbResult<usize>
Write a single packet to this endpoint.
Returns the number of bytes actually written. If the USB peripheral’s
transmit buffer is still occupied, returns UsbError::WouldBlock.
The host ends a bulk transfer on a short packet: a packet of exactly
max_packet_size bytes should be followed by
an empty write (CdcAcm, for
one, does this for you) or the host keeps the transfer open.