diff options
author | David Madison <dmadison@users.noreply.github.com> | 2019-03-09 16:01:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-09 16:01:44 -0500 |
commit | 2392695516160f6c826e2473ba9c480f2ae72cf0 (patch) | |
tree | c00c8ebca68ebfd0297248fa6a1ae97d39f0e797 /cores/arduino | |
parent | 14f191ed94534fcde7db0b859231fbde93192e3a (diff) | |
parent | 55cf0e1003a3a53b8f9948a4aa95275687b46ab4 (diff) |
Merge pull request #3 from dmadison/api
Unsigned 'available' API
Diffstat (limited to 'cores/arduino')
-rw-r--r-- | cores/arduino/xinput/USB_XInput_API.cpp | 2 | ||||
-rw-r--r-- | cores/arduino/xinput/USB_XInput_API.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cores/arduino/xinput/USB_XInput_API.cpp b/cores/arduino/xinput/USB_XInput_API.cpp index 678692d..ffd818c 100644 --- a/cores/arduino/xinput/USB_XInput_API.cpp +++ b/cores/arduino/xinput/USB_XInput_API.cpp @@ -34,7 +34,7 @@ boolean XInputUSB::connected() { return USBDevice.configured(); } -int XInputUSB::available() { +uint8_t XInputUSB::available() { return USB_Available(XINPUT_RX_ENDPOINT); } diff --git a/cores/arduino/xinput/USB_XInput_API.h b/cores/arduino/xinput/USB_XInput_API.h index 0a8fa43..11fa100 100644 --- a/cores/arduino/xinput/USB_XInput_API.h +++ b/cores/arduino/xinput/USB_XInput_API.h @@ -37,9 +37,9 @@ class XInputUSB { public: // API static bool connected(void); - static int available(void); - static int recv(void *buffer, uint8_t nbytes); - static int send(const void *buffer, uint8_t nbytes); + static uint8_t available(void); + static int send(const void *buffer, uint8_t nbytes); + static int recv(void *buffer, uint8_t nbytes); static void setRecvCallback(void(*callback)(void)); // Non-API Data |