Fix serial flag usage

This commit is contained in:
hodasemi 2023-03-22 21:03:39 +01:00
parent cce29eb3ba
commit 3494ee5bd8

View file

@ -57,14 +57,6 @@ fn main() -> ! {
let peripheral_clock = clocks.peripheral_clock.freq();
let mut hid: Box<dyn MouseInfoSender> = 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