dmx::TxDMA::new signature

This commit is contained in:
Jörn-Michael Miehe 2024-03-25 00:55:55 +00:00
parent 98d4d3a715
commit e88f73bf81

View file

@ -19,8 +19,8 @@ enum TxDMA<const DMX_LEN: usize> {
} }
impl<const DMX_LEN: usize> TxDMA<DMX_LEN> { impl<const DMX_LEN: usize> TxDMA<DMX_LEN> {
fn new(tx: TxDma, buffer: DMXUniverse<DMX_LEN>) -> Self { fn new(idle: TxDMAIdle<DMX_LEN>) -> Self {
TxDMA::Idle(Some(TxDMAIdle { tx, buffer })) TxDMA::Idle(Some(idle))
} }
fn start_sending(&mut self, tx_universe: &[u8]) { fn start_sending(&mut self, tx_universe: &[u8]) {
@ -125,7 +125,10 @@ impl<const DMX_LEN: usize> DMX<DMX_LEN> {
Self { Self {
tx_universe, 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,
}),
} }
} }