From c87bc7ba9a94cbeca3b652ea068c4bdb38c76b6c Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 11 Dec 2018 00:01:57 +0100 Subject: Add USBDevice.isSuspended() Based on code originally by Rob van der Veer , this adds USBDevice.isSuspended(), so user sketches can run custom code in their `loop` methods after checking if the device is suspended or not. Signed-off-by: Gergely Nagy --- cores/arduino/USBAPI.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cores/arduino/USBAPI.h') diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index 479ced9..701a14f 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -65,6 +65,8 @@ public: void detach(); // Serial port goes down too... void poll(); bool wakeupHost(); // returns false, when wakeup cannot be processed + + bool isSuspended(); }; extern USBDevice_ USBDevice; -- cgit v1.2.3-18-g5258