diff options
Diffstat (limited to 'hid/lib/drivers-avr/factory.cpp')
-rw-r--r-- | hid/lib/drivers-avr/factory.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/hid/lib/drivers-avr/factory.cpp b/hid/lib/drivers-avr/factory.cpp index d58e6c96..26f10583 100644 --- a/hid/lib/drivers-avr/factory.cpp +++ b/hid/lib/drivers-avr/factory.cpp @@ -19,43 +19,41 @@ # # *****************************************************************************/ + #include "usb/hid.h" #include "ps2/hid.h" #include "factory.h" -namespace DRIVERS -{ +namespace DRIVERS { Keyboard *Factory::makeKeyboard(type _type) { switch (_type) { - -# ifdef HID_WITH_USB +# ifdef HID_WITH_USB case USB_KEYBOARD: return new UsbKeyboard(); -# endif +# endif -# ifdef HID_WITH_PS2 +# ifdef HID_WITH_PS2 case PS2_KEYBOARD: return new Ps2Keyboard(); -# endif +# endif + default: return new Keyboard(DUMMY); } } Mouse *Factory::makeMouse(type _type) { - switch(_type) - { -# ifdef HID_WITH_USB + switch (_type) { +# ifdef HID_WITH_USB case USB_MOUSE_ABSOLUTE: case USB_MOUSE_ABSOLUTE_WIN98: return new UsbMouseAbsolute(_type); case USB_MOUSE_RELATIVE: return new UsbMouseRelative(); -# endif +# endif default: return new Mouse(DRIVERS::DUMMY); } } - } |