From e88f73bf81011341c29f12a518d3f02f6ed22641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael?= <40151420+ldericher@users.noreply.github.com> Date: Mon, 25 Mar 2024 00:55:55 +0000 Subject: [PATCH] dmx::TxDMA::new signature --- bluepill-rs/src/dmx.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bluepill-rs/src/dmx.rs b/bluepill-rs/src/dmx.rs index 3a2b5a6..43e4c3d 100644 --- a/bluepill-rs/src/dmx.rs +++ b/bluepill-rs/src/dmx.rs @@ -19,8 +19,8 @@ enum TxDMA { } impl TxDMA { - fn new(tx: TxDma, buffer: DMXUniverse) -> Self { - TxDMA::Idle(Some(TxDMAIdle { tx, buffer })) + fn new(idle: TxDMAIdle) -> Self { + TxDMA::Idle(Some(idle)) } fn start_sending(&mut self, tx_universe: &[u8]) { @@ -125,7 +125,10 @@ impl DMX { Self { tx_universe, - sender: TxDMA::new(serial.tx.with_dma(dma_channel), tx_buffer), + sender: TxDMA::new(TxDMAIdle { + tx: serial.tx.with_dma(dma_channel), + buffer: tx_buffer, + }), } }