diff --git a/BTD.cpp b/BTD.cpp index 42cf3d62..dbed9115 100755 --- a/BTD.cpp +++ b/BTD.cpp @@ -1343,7 +1343,7 @@ void BTD::setBdaddr(uint8_t* bdaddr) { buf[i + 2] = bdaddr[5 - i]; // Copy into buffer, has to be written reversed, so it is MSB first // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0xF5), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data - pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL); } void BTD::setMoveBdaddr(uint8_t* bdaddr) { @@ -1359,5 +1359,5 @@ void BTD::setMoveBdaddr(uint8_t* bdaddr) { buf[i + 1] = bdaddr[i]; // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x05), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data - pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x05, 0x03, 0x00, 11, 11, buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0x05, 0x03, 0x00, 11, 11, buf, NULL); } diff --git a/BTD.h b/BTD.h index 9949af15..b7683f65 100755 --- a/BTD.h +++ b/BTD.h @@ -19,7 +19,7 @@ #define _btd_h_ #include "Usb.h" -#include "Hid.h" +#include "hid.h" //PID and VID of the Sony PS3 devices #define PS3_VID 0x054C // Sony Corporation diff --git a/PS3USB.cpp b/PS3USB.cpp index c3217538..ee3a8d74 100644 --- a/PS3USB.cpp +++ b/PS3USB.cpp @@ -398,7 +398,7 @@ void PS3USB::printStatusString() { /* Playstation Sixaxis Dualshock and Navigation Controller commands */ void PS3USB::PS3_Command(uint8_t *data, uint16_t nbytes) { // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x01), Report Type (Output 0x02), interface (0x00), datalength, datalength, data) - pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x01, 0x02, 0x00, nbytes, nbytes, data, NULL); + pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0x01, 0x02, 0x00, nbytes, nbytes, data, NULL); } void PS3USB::setAllOff() { @@ -470,14 +470,14 @@ void PS3USB::setBdaddr(uint8_t *bdaddr) { buf[i + 2] = bdaddr[5 - i]; // Copy into buffer, has to be written reversed, so it is MSB first // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0xF5), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data - pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL); } void PS3USB::getBdaddr(uint8_t *bdaddr) { uint8_t buf[8]; // bmRequest = Device to host (0x80) | Class (0x20) | Interface (0x01) = 0xA1, bRequest = Get Report (0x01), Report ID (0xF5), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data - pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HID_IN, HID_REQUEST_GET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HIDIN, HID_REQUEST_GET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL); for(uint8_t i = 0; i < 6; i++) bdaddr[5 - i] = buf[i + 2]; // Copy into buffer reversed, so it is LSB first @@ -491,7 +491,7 @@ void PS3USB::enable_sixaxis() { // Command used to enable the Dualshock 3 and Na cmd_buf[3] = 0x00; // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0xF4), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data) - pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0xF4, 0x03, 0x00, 4, 4, cmd_buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0xF4, 0x03, 0x00, 4, 4, cmd_buf, NULL); } /* Playstation Move Controller commands */ @@ -535,14 +535,14 @@ void PS3USB::setMoveBdaddr(uint8_t *bdaddr) { buf[i + 1] = bdaddr[i]; // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x05), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data - pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x05, 0x03, 0x00, 11, 11, buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0x05, 0x03, 0x00, 11, 11, buf, NULL); } void PS3USB::getMoveBdaddr(uint8_t *bdaddr) { uint8_t buf[16]; // bmRequest = Device to host (0x80) | Class (0x20) | Interface (0x01) = 0xA1, bRequest = Get Report (0x01), Report ID (0x04), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data - pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HID_IN, HID_REQUEST_GET_REPORT, 0x04, 0x03, 0x00, 16, 16, buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HIDIN, HID_REQUEST_GET_REPORT, 0x04, 0x03, 0x00, 16, 16, buf, NULL); for(uint8_t i = 0; i < 6; i++) bdaddr[i] = buf[10 + i]; @@ -553,7 +553,7 @@ void PS3USB::getMoveCalibration(uint8_t *data) { for(uint8_t i = 0; i < 3; i++) { // bmRequest = Device to host (0x80) | Class (0x20) | Interface (0x01) = 0xA1, bRequest = Get Report (0x01), Report ID (0x10), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data - pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HID_IN, HID_REQUEST_GET_REPORT, 0x10, 0x03, 0x00, 49, 49, buf, NULL); + pUsb->ctrlReq(bAddress, epInfo[PS3_CONTROL_PIPE].epAddr, bmREQ_HIDIN, HID_REQUEST_GET_REPORT, 0x10, 0x03, 0x00, 49, 49, buf, NULL); for(byte j = 0; j < 49; j++) data[49 * i + j] = buf[j]; diff --git a/PS3USB.h b/PS3USB.h index ee8f8935..2eba9258 100644 --- a/PS3USB.h +++ b/PS3USB.h @@ -19,7 +19,7 @@ #define _ps3usb_h_ #include "Usb.h" -#include "Hid.h" +#include "hid.h" #include "PS3Enums.h" /* PS3 data taken from descriptors */ diff --git a/PSBuzz.cpp b/PSBuzz.cpp index 53023bf1..cc1cc464 100644 --- a/PSBuzz.cpp +++ b/PSBuzz.cpp @@ -78,10 +78,5 @@ void PSBuzz::setLedRaw(bool value, uint8_t controller) { void PSBuzz::PSBuzz_Command(uint8_t *data, uint16_t nbytes) { // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x00), Report Type (Output 0x02), interface (0x00), datalength, datalength, data) -<<<<<<< HEAD pUsb->ctrlReq(bAddress, epInfo[0].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0x00, 0x02, 0x00, nbytes, nbytes, data, NULL); }; -======= - pUsb->ctrlReq(bAddress, epInfo[0].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x00, 0x02, 0x00, nbytes, nbytes, data, NULL); -}; ->>>>>>> master diff --git a/XBOXOLD.cpp b/XBOXOLD.cpp index 78e6e9a5..990b67ca 100644 --- a/XBOXOLD.cpp +++ b/XBOXOLD.cpp @@ -320,7 +320,7 @@ int16_t XBOXOLD::getAnalogHat(AnalogHatEnum a) { /* Xbox Controller commands */ void XBOXOLD::XboxCommand(uint8_t* data, uint16_t nbytes) { //bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x00), Report Type (Output 0x02), interface (0x00), datalength, datalength, data) - pUsb->ctrlReq(bAddress, epInfo[XBOX_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x00, 0x02, 0x00, nbytes, nbytes, data, NULL); + pUsb->ctrlReq(bAddress, epInfo[XBOX_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0x00, 0x02, 0x00, nbytes, nbytes, data, NULL); } void XBOXOLD::setRumbleOn(uint8_t lValue, uint8_t rValue) { diff --git a/XBOXOLD.h b/XBOXOLD.h index 0219c5a4..9a36b5cc 100644 --- a/XBOXOLD.h +++ b/XBOXOLD.h @@ -19,7 +19,7 @@ #define _xboxold_h_ #include "Usb.h" -#include "Hid.h" +#include "hid.h" #include "controllerEnums.h" /* Data Xbox taken from descriptors */ diff --git a/XBOXUSB.cpp b/XBOXUSB.cpp index ddece21b..ee0536e2 100644 --- a/XBOXUSB.cpp +++ b/XBOXUSB.cpp @@ -314,7 +314,7 @@ int16_t XBOXUSB::getAnalogHat(AnalogHatEnum a) { /* Xbox Controller commands */ void XBOXUSB::XboxCommand(uint8_t* data, uint16_t nbytes) { //bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x00), Report Type (Output 0x02), interface (0x00), datalength, datalength, data) - pUsb->ctrlReq(bAddress, epInfo[XBOX_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x00, 0x02, 0x00, nbytes, nbytes, data, NULL); + pUsb->ctrlReq(bAddress, epInfo[XBOX_CONTROL_PIPE].epAddr, bmREQ_HIDOUT, HID_REQUEST_SET_REPORT, 0x00, 0x02, 0x00, nbytes, nbytes, data, NULL); } void XBOXUSB::setLedRaw(uint8_t value) { diff --git a/XBOXUSB.h b/XBOXUSB.h index de814489..1ab37851 100644 --- a/XBOXUSB.h +++ b/XBOXUSB.h @@ -19,7 +19,7 @@ #define _xboxusb_h_ #include "Usb.h" -#include "Hid.h" +#include "hid.h" #include "xboxEnums.h" /* Data Xbox 360 taken from descriptors */