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, + }), } }