commit
16f78b1fb2
@ -357,7 +357,7 @@ where
|
|||||||
TX: Tx,
|
TX: Tx,
|
||||||
{
|
{
|
||||||
/// Write I2S.
|
/// Write I2S.
|
||||||
/// Returns [I2sWriteDmaTransfer] which represents the in-ptrogress DMA
|
/// Returns [I2sWriteDmaTransfer] which represents the in-progress DMA
|
||||||
/// transfer
|
/// transfer
|
||||||
fn write_dma(self, words: TXBUF) -> Result<I2sWriteDmaTransfer<T, P, TX, TXBUF>, Error>
|
fn write_dma(self, words: TXBUF) -> Result<I2sWriteDmaTransfer<T, P, TX, TXBUF>, Error>
|
||||||
where
|
where
|
||||||
@ -366,8 +366,8 @@ where
|
|||||||
TX: Tx,
|
TX: Tx,
|
||||||
TXBUF: ReadBuffer<Word = u8>;
|
TXBUF: ReadBuffer<Word = u8>;
|
||||||
|
|
||||||
/// Continously write to I2S. Returns [I2sWriteDmaTransfer] which represents
|
/// Continuously write to I2S. Returns [I2sWriteDmaTransfer] which
|
||||||
/// the in-ptrogress DMA transfer
|
/// represents the in-progress DMA transfer
|
||||||
fn write_dma_circular(
|
fn write_dma_circular(
|
||||||
self,
|
self,
|
||||||
words: TXBUF,
|
words: TXBUF,
|
||||||
@ -396,7 +396,7 @@ where
|
|||||||
P: I2sRxPins,
|
P: I2sRxPins,
|
||||||
RX: Rx,
|
RX: Rx,
|
||||||
{
|
{
|
||||||
/// Amount of bytes which can be poped
|
/// Amount of bytes which can be popped
|
||||||
pub fn available(&mut self) -> usize {
|
pub fn available(&mut self) -> usize {
|
||||||
self.i2s_rx.rx_channel.available()
|
self.i2s_rx.rx_channel.available()
|
||||||
}
|
}
|
||||||
@ -479,7 +479,7 @@ pub trait I2sRead<W> {
|
|||||||
fn read(&mut self, words: &mut [W]) -> Result<(), Error>;
|
fn read(&mut self, words: &mut [W]) -> Result<(), Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initate a DMA rx transfer
|
/// Initiate a DMA rx transfer
|
||||||
pub trait I2sReadDma<'d, T, P, RX, RXBUF>
|
pub trait I2sReadDma<'d, T, P, RX, RXBUF>
|
||||||
where
|
where
|
||||||
T: RegisterAccess,
|
T: RegisterAccess,
|
||||||
@ -487,7 +487,7 @@ where
|
|||||||
RX: Rx,
|
RX: Rx,
|
||||||
{
|
{
|
||||||
/// Read I2S.
|
/// Read I2S.
|
||||||
/// Returns [I2sReadDmaTransfer] which represents the in-ptrogress DMA
|
/// Returns [I2sReadDmaTransfer] which represents the in-progress DMA
|
||||||
/// transfer
|
/// transfer
|
||||||
fn read_dma(self, words: RXBUF) -> Result<I2sReadDmaTransfer<T, P, RX, RXBUF>, Error>
|
fn read_dma(self, words: RXBUF) -> Result<I2sReadDmaTransfer<T, P, RX, RXBUF>, Error>
|
||||||
where
|
where
|
||||||
@ -496,8 +496,8 @@ where
|
|||||||
RX: Rx,
|
RX: Rx,
|
||||||
RXBUF: WriteBuffer<Word = u8>;
|
RXBUF: WriteBuffer<Word = u8>;
|
||||||
|
|
||||||
/// Continously read from I2S.
|
/// Continuously read from I2S.
|
||||||
/// Returns [I2sReadDmaTransfer] which represents the in-ptrogress DMA
|
/// Returns [I2sReadDmaTransfer] which represents the in-progress DMA
|
||||||
/// transfer
|
/// transfer
|
||||||
fn read_dma_circular(self, words: RXBUF) -> Result<I2sReadDmaTransfer<T, P, RX, RXBUF>, Error>
|
fn read_dma_circular(self, words: RXBUF) -> Result<I2sReadDmaTransfer<T, P, RX, RXBUF>, Error>
|
||||||
where
|
where
|
||||||
@ -589,7 +589,6 @@ where
|
|||||||
TX: Tx,
|
TX: Tx,
|
||||||
RX: Rx,
|
RX: Rx,
|
||||||
IP: I2sPeripheral + I2s0Peripheral,
|
IP: I2sPeripheral + I2s0Peripheral,
|
||||||
RX: Rx,
|
|
||||||
{
|
{
|
||||||
fn new(
|
fn new(
|
||||||
i2s: impl Peripheral<P = I> + 'd,
|
i2s: impl Peripheral<P = I> + 'd,
|
||||||
@ -645,7 +644,6 @@ where
|
|||||||
TX: Tx,
|
TX: Tx,
|
||||||
RX: Rx,
|
RX: Rx,
|
||||||
IP: I2sPeripheral + I2s1Peripheral,
|
IP: I2sPeripheral + I2s1Peripheral,
|
||||||
RX: Rx,
|
|
||||||
{
|
{
|
||||||
fn new(
|
fn new(
|
||||||
i2s: impl Peripheral<P = I> + 'd,
|
i2s: impl Peripheral<P = I> + 'd,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user