From f5c4b5faff9cf1441bfc7c6a91f109d75a49b7bf 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 14:49:27 +0000 Subject: [PATCH] dd tx_pulldown pin --- bluepill-rs/src/dmx.rs | 3 +++ bluepill-rs/src/main.rs | 1 + 2 files changed, 4 insertions(+) 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,