From 3494ee5bd836d1e592e54199fe9db937b9b7f97e Mon Sep 17 00:00:00 2001 From: hodasemi Date: Wed, 22 Mar 2023 21:03:39 +0100 Subject: [PATCH] Fix serial flag usage --- src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index d26ddfe..2f7f255 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,14 +57,6 @@ fn main() -> ! { let peripheral_clock = clocks.peripheral_clock.freq(); let mut hid: Box = if SERIAL { - Box::new(MouseHID::new( - pac.USBCTRL_REGS, - pac.USBCTRL_DPRAM, - &mut pac.RESETS, - core, - clocks, - )) - } else { Box::new(CustomHID::new( pac.USBCTRL_REGS, pac.USBCTRL_DPRAM, @@ -72,6 +64,14 @@ fn main() -> ! { clocks, 10, )) + } else { + Box::new(MouseHID::new( + pac.USBCTRL_REGS, + pac.USBCTRL_DPRAM, + &mut pac.RESETS, + core, + clocks, + )) }; // The single-cycle I/O block controls our GPIO pins