added bool operator
This commit is contained in:
parent
7acc31ca75
commit
60bd43e0a1
2 changed files with 11 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ class HID_
|
|||
{
|
||||
public:
|
||||
HID_(void);
|
||||
operator bool();
|
||||
|
||||
// Only access this class via the HIDDevice
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in a new issue