Type Alias RxStream2

Source
pub type RxStream2<BUF> = RxStream<BUF, RxDma2>;
Expand description

A type shorthand for specifying different DMA channels easily.

Aliased Type§

pub struct RxStream2<BUF> { /* private fields */ }

Implementations§

Source§

impl<BUF> RxStream2<BUF>
where &'static mut [BUF; 2]: StaticWriteBuffer<Word = u8>,

Source

pub fn new(buf: &'static mut [BUF; 2], rx: RxDma2) -> Self
where BUF: AsMutSlice<Element = u8>,

Creates a new RxStream from the specified buffers and DMA transmitter.

Source

pub fn release(self) -> (&'static mut [BUF; 2], RxDma2)

Releases the buffers and DMA transmitter.

Trait Implementations§

Source§

impl<BUF> FusedStream for RxStream2<BUF>
where BUF: Clone,

Source§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
Source§

impl<BUF> Stream for RxStream2<BUF>
where BUF: Clone,

Source§

type Item = Result<BUF, Error>

Values yielded by the stream.
Source§

fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more