dmx::TxDMA::new signature
This commit is contained in:
parent
98d4d3a715
commit
e88f73bf81
1 changed files with 6 additions and 3 deletions
|
@ -19,8 +19,8 @@ enum TxDMA<const DMX_LEN: usize> {
|
|||
}
|
||||
|
||||
impl<const DMX_LEN: usize> TxDMA<DMX_LEN> {
|
||||
fn new(tx: TxDma, buffer: DMXUniverse<DMX_LEN>) -> Self {
|
||||
TxDMA::Idle(Some(TxDMAIdle { tx, buffer }))
|
||||
fn new(idle: TxDMAIdle<DMX_LEN>) -> Self {
|
||||
TxDMA::Idle(Some(idle))
|
||||
}
|
||||
|
||||
fn start_sending(&mut self, tx_universe: &[u8]) {
|
||||
|
@ -125,7 +125,10 @@ impl<const DMX_LEN: usize> DMX<DMX_LEN> {
|
|||
|
||||
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,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue