This commit is contained in:
Nico 2015-03-01 14:23:49 +01:00
parent 2289569e7d
commit e9748a7a8f
2 changed files with 11 additions and 9 deletions

View file

@ -28,3 +28,12 @@ THE SOFTWARE.
//================================================================================
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));
}

View file

@ -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();
}