diff --git a/ch32v-insert-coin/src/debounced_gpio.rs b/ch32v-insert-coin/src/debounced_gpio.rs index baec633..784c3fd 100644 --- a/ch32v-insert-coin/src/debounced_gpio.rs +++ b/ch32v-insert-coin/src/debounced_gpio.rs @@ -17,7 +17,7 @@ impl<'a> DebouncedGPIO<'a> { pub fn new(pin: AnyPin, system_tick_rate_hz: usize, debounce_time_ms: usize) -> Self { // coin debounce timer (100ms) Self { - input: Input::new(pin, Pull::Up), + input: Input::new(pin, Pull::None), value: false, ready: false, active: false, diff --git a/ch32v-insert-coin/src/main.rs b/ch32v-insert-coin/src/main.rs index 3414329..c4e404f 100644 --- a/ch32v-insert-coin/src/main.rs +++ b/ch32v-insert-coin/src/main.rs @@ -55,6 +55,12 @@ impl Usb { pub fn powered(&self) -> bool { self.usb_pin.is_high() } + // pub fn enable(&mut self) { + // self.usb_pin.set_as_input(Pull::Up); + // } + // pub fn disable(&mut self) { + // self.usb_pin.set_as_input(Pull::None); + // } } pub struct Amplifier {