mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Added DEVCLASSOK and VIDPIDOK to some drivers
This commit is contained in:
parent
47b9b257d6
commit
1a1c2a18d3
5 changed files with 52 additions and 0 deletions
17
BTD.h
17
BTD.h
|
@ -194,6 +194,23 @@ public:
|
|||
virtual bool isReady() {
|
||||
return bPollEnable;
|
||||
};
|
||||
/**
|
||||
* Used by the USB core to check what this driver support.
|
||||
* @param klass The device's USB class.
|
||||
* @return Returns true if the device's USB class matches this driver.
|
||||
*/
|
||||
virtual boolean DEVCLASSOK(uint8_t klass) { return (klass == USB_CLASS_WIRELESS_CTRL); }
|
||||
|
||||
/**
|
||||
* Used by the USB core to check what this driver support.
|
||||
* Used to set the Bluetooth address into the PS3 controllers.
|
||||
* @param vid The device's VID.
|
||||
* @param pid The device's PID.
|
||||
* @return Returns true if the device's VID and PID matches this driver.
|
||||
*/
|
||||
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||
return (vid == PS3_VID && (pid == PS3_PID || pid == PS3NAVIGATION_PID || pid == PS3MOVE_PID));
|
||||
};
|
||||
/**@}*/
|
||||
|
||||
/** @name UsbConfigXtracter implementation */
|
||||
|
|
10
PS3USB.h
10
PS3USB.h
|
@ -104,6 +104,16 @@ public:
|
|||
virtual bool isReady() {
|
||||
return bPollEnable;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by the USB core to check what this driver support.
|
||||
* @param vid The device's VID.
|
||||
* @param pid The device's PID.
|
||||
* @return Returns true if the device's VID and PID matches this driver.
|
||||
*/
|
||||
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||
return (vid == PS3_VID && (pid == PS3_PID || pid == PS3NAVIGATION_PID || pid == PS3MOVE_PID));
|
||||
};
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
|
|
11
XBOXRECV.h
11
XBOXRECV.h
|
@ -52,6 +52,7 @@
|
|||
#define XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID 0x0291 // Third party Wireless Gaming Receiver
|
||||
|
||||
#define MADCATZ_VID 0x1BAD // For unofficial Mad Catz receivers
|
||||
#define JOYTECH_VID 0x162E // For unofficial Joytech controllers
|
||||
|
||||
#define XBOX_MAX_ENDPOINTS 9
|
||||
|
||||
|
@ -103,6 +104,16 @@ public:
|
|||
virtual bool isReady() {
|
||||
return bPollEnable;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by the USB core to check what this driver support.
|
||||
* @param vid The device's VID.
|
||||
* @param pid The device's PID.
|
||||
* @return Returns true if the device's VID and PID matches this driver.
|
||||
*/
|
||||
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||
return ((vid == XBOX_VID || vid == MADCATZ_VID || vid == JOYTECH_VID) && (pid == XBOX_WIRELESS_RECEIVER_PID || pid == XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID));
|
||||
};
|
||||
/**@}*/
|
||||
|
||||
/** @name Xbox Controller functions */
|
||||
|
|
10
XBOXUSB.h
10
XBOXUSB.h
|
@ -99,6 +99,16 @@ public:
|
|||
virtual bool isReady() {
|
||||
return bPollEnable;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by the USB core to check what this driver support.
|
||||
* @param vid The device's VID.
|
||||
* @param pid The device's PID.
|
||||
* @return Returns true if the device's VID and PID matches this driver.
|
||||
*/
|
||||
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||
return ((vid == XBOX_VID || vid == MADCATZ_VID || vid == JOYTECH_VID) && pid != XBOX_WIRELESS_RECEIVER_PID && pid != XBOX_WIRELESS_RECEIVER_THIRD_PARTY_PID);
|
||||
};
|
||||
/**@}*/
|
||||
|
||||
/** @name Xbox Controller functions */
|
||||
|
|
4
adk.h
4
adk.h
|
@ -126,6 +126,10 @@ public:
|
|||
return ready;
|
||||
};
|
||||
|
||||
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||
return (vid == ADK_VID && (pid == ADK_PID || pid == ADB_PID));
|
||||
};
|
||||
|
||||
//UsbConfigXtracter implementation
|
||||
virtual void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep);
|
||||
}; //class ADK : public USBDeviceConfig ...
|
||||
|
|
Loading…
Reference in a new issue