diff options
Diffstat (limited to 'hid/src/outputs.h')
-rw-r--r-- | hid/src/outputs.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hid/src/outputs.h b/hid/src/outputs.h index c4bef624..7c3fb18c 100644 --- a/hid/src/outputs.h +++ b/hid/src/outputs.h @@ -19,9 +19,11 @@ # # *****************************************************************************/ + #include "factory.h" #include "proto.h" + class Outputs { public: void writeOutputs(uint8_t mask, uint8_t outputs, bool force) { @@ -40,16 +42,15 @@ class Outputs { } void initOutputs() { - int outputs; # ifdef HID_DYNAMIC _storage = DRIVERS::Factory::makeStorage(DRIVERS::NON_VOLATILE_STORAGE); # else _storage = DRIVERS::Factory::makeStorage(DRIVERS::DUMMY); # endif - outputs = _readOutputs(); + + uint8_t outputs = _readOutputs(); if (outputs < 0) { outputs = 0; - # if defined(HID_WITH_USB) && defined(HID_SET_USB_KBD) outputs |= PROTO::OUTPUTS1::KEYBOARD::USB; # elif defined(HID_WITH_PS2) && defined(HID_SET_PS2_KBD) @@ -95,9 +96,11 @@ class Outputs { mouse = DRIVERS::Factory::makeMouse(DRIVERS::DUMMY); break; } + # ifdef ARDUINO_ARCH_AVR USBDevice.attach(); # endif + kbd->begin(); mouse->begin(); } |