diff options
-rw-r--r-- | hid/lib/drivers-avr/factory.cpp | 5 | ||||
-rw-r--r-- | hid/lib/drivers/spi.h (renamed from hid/lib/drivers-avr/spi.h) | 0 | ||||
-rw-r--r-- | hid/lib/drivers/storage.h | 1 | ||||
-rw-r--r-- | hid/src/main.cpp | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/hid/lib/drivers-avr/factory.cpp b/hid/lib/drivers-avr/factory.cpp index 989f4e2b..ccd1612c 100644 --- a/hid/lib/drivers-avr/factory.cpp +++ b/hid/lib/drivers-avr/factory.cpp @@ -21,10 +21,15 @@ #include "usb/hid.h" +#ifdef HID_WITH_PS2 #include "ps2/hid.h" +#endif #include "factory.h" #include "eeprom.h" +#ifndef ARDUINO_ARCH_AVR + #error "Only AVR is supported" +#endif namespace DRIVERS { Keyboard *Factory::makeKeyboard(type _type) { diff --git a/hid/lib/drivers-avr/spi.h b/hid/lib/drivers/spi.h index 6a8e9e8c..6a8e9e8c 100644 --- a/hid/lib/drivers-avr/spi.h +++ b/hid/lib/drivers/spi.h diff --git a/hid/lib/drivers/storage.h b/hid/lib/drivers/storage.h index 4f04f3c1..6af582d8 100644 --- a/hid/lib/drivers/storage.h +++ b/hid/lib/drivers/storage.h @@ -23,6 +23,7 @@ #pragma once #include "driver.h" +#include "stdlib.h" namespace DRIVERS { diff --git a/hid/src/main.cpp b/hid/src/main.cpp index 6f84fbc2..83a8d7f7 100644 --- a/hid/src/main.cpp +++ b/hid/src/main.cpp @@ -135,7 +135,9 @@ static void _initOutputs() { break; } +#ifdef ARDUINO_ARCH_AVR USBDevice.attach(); +#endif _kbd->begin(); _mouse->begin(); |