Commit f503070a authored by Pino Toscano's avatar Pino Toscano
Browse files

usb: use uint16_t for vendor/product IDS

Match the types used by libusb.
parent 1d0ec918
......@@ -94,7 +94,7 @@ USBDB::USBDB() {
}
}
QString USBDB::vendor(int id) const {
QString USBDB::vendor(uint16_t id) const {
QString s = _ids.value(QStringLiteral("%1").arg(id));
if (id != 0) {
return s;
......@@ -102,7 +102,7 @@ QString USBDB::vendor(int id) const {
return QString();
}
QString USBDB::device(int vendor, int id) const {
QString USBDB::device(uint16_t vendor, uint16_t id) const {
QString s = _ids.value(QStringLiteral("%1-%2").arg(vendor).arg(id));
if ((id != 0) && (vendor != 0))
return s;
......
......@@ -21,8 +21,8 @@ public:
USBDB();
QString vendor(int id) const;
QString device(int vendor, int id) const;
QString vendor(uint16_t id) const;
QString device(uint16_t vendor, uint16_t id) const;
QString cls(uint8_t cls) const;
QString subclass(uint8_t cls, uint8_t sub) const;
......
......@@ -64,7 +64,7 @@ private:
uint8_t _class, _sub, _prot;
unsigned int _maxPacketSize;
unsigned int _vendorID, _prodID;
uint16_t _vendorID, _prodID;
void collectDataSys(libusb_device *dev);
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment