diff --git a/bluepill-rs/src/dmx.rs b/bluepill-rs/src/dmx.rs index 43e4c3d..a114c1e 100644 --- a/bluepill-rs/src/dmx.rs +++ b/bluepill-rs/src/dmx.rs @@ -76,6 +76,7 @@ impl TxDMA { #[allow(clippy::upper_case_acronyms)] pub struct DMX { tx_universe: DMXUniverse, + tx_pulldown: gpio::PA8>, sender: TxDMA, } @@ -84,6 +85,7 @@ impl DMX { pub fn new( mem: &'static mut [u8], mut dma_channel: dma::dma1::C4, + pa8: gpio::PA8, pa9: gpio::PA9, pa10: gpio::PA10, acrh: &mut gpio::Cr<'A', true>, @@ -125,6 +127,7 @@ impl DMX { Self { tx_universe, + tx_pulldown: pa8.into_open_drain_output_with_state(acrh, gpio::PinState::High), sender: TxDMA::new(TxDMAIdle { tx: serial.tx.with_dma(dma_channel), buffer: tx_buffer, diff --git a/bluepill-rs/src/main.rs b/bluepill-rs/src/main.rs index 56814ad..0baf714 100644 --- a/bluepill-rs/src/main.rs +++ b/bluepill-rs/src/main.rs @@ -82,6 +82,7 @@ mod app { dmx: DMX::new( cx.local.buffer, dma1.4, + gpioa.pa8, gpioa.pa9, gpioa.pa10, &mut gpioa.crh,