aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cores/arduino/xinput/USB_XInput_API.cpp2
-rw-r--r--cores/arduino/xinput/USB_XInput_API.h6
-rw-r--r--cores/arduino/xinput/USB_XInput_Descriptors.cpp14
3 files changed, 11 insertions, 11 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
diff --git a/cores/arduino/xinput/USB_XInput_Descriptors.cpp b/cores/arduino/xinput/USB_XInput_Descriptors.cpp
index ef9b9d8..f57c700 100644
--- a/cores/arduino/xinput/USB_XInput_Descriptors.cpp
+++ b/cores/arduino/xinput/USB_XInput_Descriptors.cpp
@@ -79,7 +79,7 @@ const u8 USB_ConfigDescriptor[] = {
0x08, // bMaxDataSize
0x00, 0x00, // ???
- // Endpoint 1: Control Data Out
+ // Endpoint 1: Control Surface Send
0x07, // bLength
0x05, // bDescriptorType (ENDPOINT)
0x81, // bEndpointAddress (IN, 1)
@@ -87,7 +87,7 @@ const u8 USB_ConfigDescriptor[] = {
0x20, 0x00, // wMaxPacketSize
0x04, // bInterval
- // Endpoint 1: Control Data In
+ // Endpoint 1: Control Surface Receive
0x07, // bLength
0x05, // bDescriptorType (ENDPOINT)
0x02, // bEndpointAddress (OUT, 2)
@@ -124,7 +124,7 @@ const u8 USB_ConfigDescriptor[] = {
0x00, // bMaxDataSize
0x00, 0x00, 0x00, 0x00, 0x00, // ???
- // Endpoint 2: Microphone Data Out
+ // Endpoint 2: Microphone Data Send
0x07, // bLength
0x05, // bDescriptorType (ENDPOINT)
0x83, // bEndpointAddress (IN, 3)
@@ -132,7 +132,7 @@ const u8 USB_ConfigDescriptor[] = {
0x20, 0x00, // wMaxPacketSize
0x02, // bInterval
- // Endpoint 2: Headset Audio In
+ // Endpoint 2: Headset Audio Receive
0x07, // bLength
0x05, // bDescriptorType (ENDPOINT)
0x04, // bEndpointAddress (OUT, 4)
@@ -140,7 +140,7 @@ const u8 USB_ConfigDescriptor[] = {
0x20, 0x00, // wMaxPacketSize
0x04, // bInterval
- // Endpoint 3: Unknown, Out
+ // Endpoint 3: Unknown, Send
0x07, // bLength
0x05, // bDescriptorType (ENDPOINT)
0x85, // bEndpointAddress (IN, 5)
@@ -148,7 +148,7 @@ const u8 USB_ConfigDescriptor[] = {
0x20, 0x00, // wMaxPacketSize
0x40, // bInterval
- // Endpoint 3: Unknown, In
+ // Endpoint 3: Unknown, Receive
0x07, // bLength
0x05, // bDescriptorType (ENDPOINT)
0x05, // bEndpointAddress (OUT, 5)
@@ -176,7 +176,7 @@ const u8 USB_ConfigDescriptor[] = {
0x07, // bMaxDataSize
0x00, // ???
- // Endpoint 4: Unknown, Out
+ // Endpoint 4: Unknown, Send
0x07, // bLength
0x05, // bDescriptorType (ENDPOINT)
0x86, // bEndpointAddress (IN, 6)