aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/xinput/USB_XInput_API.cpp
diff options
context:
space:
mode:
authorDavid Madison <dmadison@users.noreply.github.com>2019-02-21 15:07:53 -0500
committerDavid Madison <dmadison@users.noreply.github.com>2019-02-21 15:07:53 -0500
commit1580d392e9662b25161c88681e1e274526109921 (patch)
tree9bebcd23f448aea0a73f4882d1d8a0e8e5f2fe32 /cores/arduino/xinput/USB_XInput_API.cpp
parentfc18d5330ee7f3b7dc3ebc3f7e12a876464182ad (diff)
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...
Diffstat (limited to 'cores/arduino/xinput/USB_XInput_API.cpp')
-rw-r--r--cores/arduino/xinput/USB_XInput_API.cpp2
1 files changed, 1 insertions, 1 deletions
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() {