From 77188a3eaad667d702fca0f78734216b92b92ad7 Mon Sep 17 00:00:00 2001 From: sigil-03 Date: Mon, 11 Aug 2025 18:46:54 -0600 Subject: [PATCH] update main to do a repeated sweep --- ch32v-insert-coin/src/main.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ch32v-insert-coin/src/main.rs b/ch32v-insert-coin/src/main.rs index 3ff6126..5d05bcc 100644 --- a/ch32v-insert-coin/src/main.rs +++ b/ch32v-insert-coin/src/main.rs @@ -125,7 +125,7 @@ fn main() -> ! { // let b1 = Input::new(p.PA2, Pull::Up); // p.EXTI4 - let ei = hal::exti::ExtiInput::new(p.PD4, p.EXTI4, Pull::Up); + // let ei = hal::exti::ExtiInput::new(p.PD4, p.EXTI4, Pull::Up); // let led_pin = PwmPin::new_ch4::<0>(p.PD0); // let ch = hal::timer::Channel::Ch4; @@ -195,17 +195,18 @@ fn main() -> ! { let mut tick: usize = 0; loop{ // handle IRQ flags - unsafe { - if(IRQ1_FLAG) { - led1_need_service = true; - // led_active = true; - IRQ1_FLAG = false; - } - } + // unsafe { + // if(IRQ1_FLAG) { + // led1_need_service = true; + // // led_active = true; + // IRQ1_FLAG = false; + // } + // } let dac_need_service = ((tick % dac_tick_per_service) == 0); if(dac_need_service && dac_active) { - dac_active = dac.output_next(); + // dac_active = dac.output_next(); + dac.output_next(); } let led_need_service = ((tick % led_tick_per_service) == 0);