From 64aa1808d21efc36ebb638030466e78355f0019d Mon Sep 17 00:00:00 2001 From: sigil-03 Date: Fri, 14 Nov 2025 15:15:03 -0700 Subject: [PATCH] change direction of the USB detect input --- ch32v-insert-coin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch32v-insert-coin/src/main.rs b/ch32v-insert-coin/src/main.rs index 8e8a6dc..3414329 100644 --- a/ch32v-insert-coin/src/main.rs +++ b/ch32v-insert-coin/src/main.rs @@ -289,7 +289,7 @@ fn app_main(mut p: hal::Peripherals) -> ! { // adc2 // let mut usb_detect_dc = hal::adc::Adc::new(p.ADC1, Default::default()); let mut usb_detect_pin = p.PD5; - let usb_detect_input = Input::new(usb_detect_pin, Pull::Down); + let usb_detect_input = Input::new(usb_detect_pin, Pull::Up); let usb = Usb::new(usb_detect_input); // println!("ADC_PIN CHANNEL: {}", adc_pin.channel().channel());