Skip to content

Commit 4a44c8f

Browse files
committed
Implemented VIDPIDOK in PS4USB
1 parent efeb808 commit 4a44c8f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

PS4USB.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ class PS4USB : public HIDUniversal, public PS4Parser {
112112
};
113113
/**@}*/
114114

115+
/** @name USBDeviceConfig implementation */
116+
/**
117+
* Used by the USB core to check what this driver support.
118+
* @param vid The device's VID.
119+
* @param pid The device's PID.
120+
* @return Returns true if the device's VID and PID matches this driver.
121+
*/
122+
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid) {
123+
return (vid == PS4_VID && pid == PS4_PID);
124+
};
125+
/**@}*/
126+
115127
private:
116128
void (*pFuncOnInit)(void); // Pointer to function called in onInit()
117129
};

0 commit comments

Comments
 (0)