added bool operator

This commit is contained in:
NicoHood 2015-09-19 17:28:36 +02:00
parent 7acc31ca75
commit 60bd43e0a1
2 changed files with 11 additions and 0 deletions

View file

@ -210,6 +210,16 @@ HID_::HID_(void)
HID_ENDPOINT_INT = PUSB_AddFunction(&node, &HID_INTERFACE);
}
HID_::operator bool() {
if(USBDevice.configured()){
delay(10);
return true;
}
else{
return false;
}
}
int HID_::begin(void)
{
}

View file

@ -70,6 +70,7 @@ class HID_
{
public:
HID_(void);
operator bool();
// Only access this class via the HIDDevice
private: