From 1580d392e9662b25161c88681e1e274526109921 Mon Sep 17 00:00:00 2001 From: David Madison Date: Thu, 21 Feb 2019 15:07:53 -0500 Subject: Add USB connected API support Returns true if the device USB is configured. Although will still return true if the device has been configured and the USB data pins disconnected... --- cores/arduino/xinput/USB_XInput_API.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino/xinput') diff --git a/cores/arduino/xinput/USB_XInput_API.cpp b/cores/arduino/xinput/USB_XInput_API.cpp index 27a6670..678692d 100644 --- a/cores/arduino/xinput/USB_XInput_API.cpp +++ b/cores/arduino/xinput/USB_XInput_API.cpp @@ -31,7 +31,7 @@ void (*XInputUSB::RecvCallback)(void) = nullptr; boolean XInputUSB::connected() { - return true; // Need to implement + return USBDevice.configured(); } int XInputUSB::available() { -- cgit v1.2.3-18-g5258