pub struct Feedback<'d, D: Driver<'d>> { /* private fields */ }Expand description
Line out’s explicit feedback endpoint: the device’s sample rate in samples per packet
(packet_rate_hz).
Write it with Self::write_packet, or from the SOF interrupt through
Self::endpoint_index if the driver supports that. There the value goes on the wire as
is: 16.16 in 4 bytes at high speed, 10.14 in 3 bytes at full speed.
Implementations§
Source§impl<'d, D: Driver<'d>> Feedback<'d, D>
impl<'d, D: Driver<'d>> Feedback<'d, D>
Sourcepub async fn ready(
&mut self,
) -> Result<<D::EndpointIn as IsoEndpointIn>::Slot<'_>, EndpointDisabledError>where
D::EndpointIn: IsoEndpointIn,
pub async fn ready(
&mut self,
) -> Result<<D::EndpointIn as IsoEndpointIn>::Slot<'_>, EndpointDisabledError>where
D::EndpointIn: IsoEndpointIn,
Wait until the next feedback packet can be queued, returning a reserved slot.
Sourcepub async fn write_packet(
&mut self,
value: u32,
) -> Result<Option<NonZeroU32>, IsoWriteError>where
D::EndpointIn: IsoEndpointIn,
pub async fn write_packet(
&mut self,
value: u32,
) -> Result<Option<NonZeroU32>, IsoWriteError>where
D::EndpointIn: IsoEndpointIn,
Writes one feedback value for the next service interval: 16.16 samples per packet, at either speed. At full speed it is sent as 10.14.
Returns how many intervals were skipped before this packet, if any. A packet the host does not poll for is dropped rather than sent late.
Sourcepub async fn wait_connection(&mut self)
pub async fn wait_connection(&mut self)
Waits for the host to select line out’s streaming alternate setting.
Sourcepub fn endpoint_index(&self) -> usize
pub fn endpoint_index(&self) -> usize
The feedback endpoint’s index.