From e9748a7a8fcae7e711fef88eda9e3185a1cfcb8c Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 1 Mar 2015 14:23:49 +0100 Subject: [PATCH] Fix issue #16 --- avr/cores/hid/USB-Core/System.cpp | 11 ++++++++++- avr/cores/hid/USB-Core/System.h | 9 +-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/avr/cores/hid/USB-Core/System.cpp b/avr/cores/hid/USB-Core/System.cpp index afc6c7f..b4fb6ae 100644 --- a/avr/cores/hid/USB-Core/System.cpp +++ b/avr/cores/hid/USB-Core/System.cpp @@ -27,4 +27,13 @@ THE SOFTWARE. // System //================================================================================ -System_ System; \ No newline at end of file +System_ System; + +void System_::press(uint8_t s){ +#ifdef USBCON + if (s == SYSTEM_WAKE_UP) + USBDevice.wakeupHost(); + else +#endif + HID_SendReport(HID_REPORTID_SYSTEMCONTROL, &s, sizeof(s)); +} \ No newline at end of file diff --git a/avr/cores/hid/USB-Core/System.h b/avr/cores/hid/USB-Core/System.h index 03dca7d..7e57389 100644 --- a/avr/cores/hid/USB-Core/System.h +++ b/avr/cores/hid/USB-Core/System.h @@ -58,14 +58,7 @@ public: press(s); release(); } - inline void press(uint8_t s){ -#ifdef USBCON - if (s == SYSTEM_WAKE_UP) - USBDevice.wakeupHost(); - else -#endif - HID_SendReport(HID_REPORTID_SYSTEMCONTROL, &s, sizeof(s)); - } + void press(uint8_t s); inline void release(void){ begin(); }