@@ -1405,7 +1405,27 @@ impl DmaRxStreamBufView {
14051405 }
14061406}
14071407
1408- /// A continuous DMA transfer buffer for Tx.
1408+ /// DMA Streaming Transmit Buffer.
1409+ ///
1410+ /// This is symmetric implementation to [DmaTxStreamBuf], used for continuously
1411+ /// streaming data to a peripheral's FIFO.
1412+ ///
1413+ /// The list starts out like so `A(full) -> B(full) -> C(full) -> D(full) -> NULL`.
1414+ ///
1415+ /// As the DMA writes to FIFO, the list progresses like so:
1416+ /// - `A(full) -> B(full) -> C(full) -> D(full) -> NULL`
1417+ /// - `A(empty) -> B(full) -> C(full) -> D(full) -> NULL`
1418+ /// - `A(empty) -> B(empty) -> C(full) -> D(full) -> NULL`
1419+ /// - `A(empty) -> B(empty) -> C(empty) -> D(full) -> NULL`
1420+ ///
1421+ /// As you call [DmaTxStreamBufView::push] the list (approximately) progresses like so:
1422+ /// - `A(empty) -> B(empty) -> C(empty) -> D(full) -> NULL`
1423+ /// - `B(empty) -> C(empty) -> D(full) -> A(full) -> NULL`
1424+ /// - `C(empty) -> D(full) -> A(full) -> B(full) -> NULL`
1425+ /// - `D(full) -> A(full) -> B(full) -> C(full) -> NULL`
1426+ ///
1427+ /// If all the descriptors fill up, the [DmaTxInterrupt::TotalEof] interrupt will fire and DMA
1428+ /// will stop writing, at which point it is up to you to resume/restart the transfer.
14091429pub struct DmaTxStreamBuf {
14101430 descriptors : & ' static mut [ DmaDescriptor ] ,
14111431 buffer : & ' static mut [ u8 ] ,
0 commit comments