Skip to content

Commit

Permalink
Fix spi transfer struct naming
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Scheuren <[email protected]>
  • Loading branch information
systec-ms committed Nov 18, 2021
1 parent fbdeb92 commit 87eaaa5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ where
dma_tx: &dma::Handle<<Tx<I> as dma::Target>::Instance, state::Enabled>,
rx: <Rx<I> as dma::Target>::Stream,
tx: <Tx<I> as dma::Target>::Stream,
) -> transfer<Word, I, P, B, Rx<I>, Tx<I>, dma::Ready>
) -> Transfer<Word, I, P, B, Rx<I>, Tx<I>, dma::Ready>
where
Rx<I>: dma::Target,
Tx<I>: dma::Target,
Expand Down Expand Up @@ -163,7 +163,7 @@ where
)
};

transfer {
Transfer {
buffer,
target: self,

Expand Down Expand Up @@ -629,7 +629,7 @@ pub struct Tx<I>(PhantomData<I>);
/// Since DMA can send and receive at the same time, using two DMA transfers and
/// two DMA streams, we need this type to represent this operation and wrap the
/// underlying [`dma::Transfer`] instances.
pub struct transfer<Word: SupportedWordSize, I, P, Buffer, Rx: dma::Target, Tx: dma::Target, State>
pub struct Transfer<Word: SupportedWordSize, I, P, Buffer, Rx: dma::Target, Tx: dma::Target, State>
{
buffer: Pin<Buffer>,
target: Spi<I, P, Enabled<Word>>,
Expand All @@ -638,7 +638,7 @@ pub struct transfer<Word: SupportedWordSize, I, P, Buffer, Rx: dma::Target, Tx:
_state: State,
}

impl<Word, I, P, Buffer, Rx, Tx> transfer<Word, I, P, Buffer, Rx, Tx, dma::Ready>
impl<Word, I, P, Buffer, Rx, Tx> Transfer<Word, I, P, Buffer, Rx, Tx, dma::Ready>
where
Rx: dma::Target,
Tx: dma::Target,
Expand Down Expand Up @@ -667,8 +667,8 @@ where
self,
rx_handle: &dma::Handle<Rx::Instance, state::Enabled>,
tx_handle: &dma::Handle<Tx::Instance, state::Enabled>,
) -> transfer<Word, I, P, Buffer, Rx, Tx, dma::Started> {
transfer {
) -> Transfer<Word, I, P, Buffer, Rx, Tx, dma::Started> {
Transfer {
buffer: self.buffer,
target: self.target,
rx: self.rx.start(rx_handle),
Expand All @@ -678,7 +678,7 @@ where
}
}

impl<Word, I, P, Buffer, Rx, Tx> transfer<Word, I, P, Buffer, Rx, Tx, dma::Started>
impl<Word, I, P, Buffer, Rx, Tx> Transfer<Word, I, P, Buffer, Rx, Tx, dma::Started>
where
Rx: dma::Target,
Tx: dma::Target,
Expand Down

0 comments on commit 87eaaa5

Please sign in to comment.