pub struct CircBuffer<BUFFER, PAYLOAD>where
BUFFER: 'static,{ /* private fields */ }Implementations§
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C1>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C1>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C1>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C1>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C2>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C2>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C2>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C2>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C3>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C3>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C3>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C3>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C4>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C4>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C4>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C4>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C5>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C5>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C5>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C5>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C6>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C6>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C6>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C6>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C7>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C7>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C7>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C7>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C1>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C1>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C1>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C1>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C2>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C2>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C2>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C2>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C3>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C3>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C3>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C3>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C4>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C4>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C4>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C4>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C5>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C5>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C5>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C5>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C6>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C6>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C6>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C6>)
Stops the transfer and returns the underlying buffer and RxDma
Source§impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C7>>
impl<B, PAYLOAD> CircBuffer<B, RxDma<PAYLOAD, C7>>
Sourcepub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
pub fn read<T>(&mut self, buf: &mut [T]) -> Result<usize, Error>
Reads and removes the available contents of the dma buffer into buf.
Returns Err(Error::Overrun) if an overrun is detected but there is no
guarantee that every overrun can be detected.
On success, returns the number of words written to buf.
Sourcepub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C7>)
pub fn stop(self) -> (&'static mut B, RxDma<PAYLOAD, C7>)
Stops the transfer and returns the underlying buffer and RxDma