git-svn-id: svn://db.shs.com.ru/pip@283 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
#include "piconfig.h"
|
||||
|
||||
#ifdef PIP_USB
|
||||
# ifdef WINDOWS
|
||||
# include <lusb0_usb.h>
|
||||
# else
|
||||
# include <usb.h>
|
||||
# endif
|
||||
# ifdef WINDOWS
|
||||
# include <lusb0_usb.h>
|
||||
# else
|
||||
# include <usb.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
REGISTER_DEVICE(PIUSB);
|
||||
REGISTER_DEVICE(PIUSB)
|
||||
|
||||
|
||||
PIUSB::PIUSB(ushort vid, ushort pid): PIIODevice("", ReadWrite) {
|
||||
@@ -218,7 +218,7 @@ bool PIUSB::openDevice() {
|
||||
}
|
||||
if (!desc_.configurations.isEmpty())
|
||||
conf_ = desc_.configurations.front();
|
||||
|
||||
|
||||
struct usb_interface_descriptor * is = dev->config->interface->altsetting;
|
||||
int epn = is->bNumEndpoints;
|
||||
eps.clear();
|
||||
@@ -229,7 +229,7 @@ bool PIUSB::openDevice() {
|
||||
if (eps.back().direction == Endpoint::Write && (eps.back().address == ep_write.address || ep_write.address == 0)) ep_write = eps.back();
|
||||
if (eps.back().direction == Endpoint::Read && (eps.back().address == ep_read.address || ep_read.address == 0)) ep_read = eps.back();
|
||||
}
|
||||
|
||||
|
||||
//piCoutObj << "Device found at address:" << "Bus: " << dev->bus->dirname << ", Device: " << dev->filename;
|
||||
found = true;
|
||||
break;
|
||||
@@ -249,7 +249,7 @@ bool PIUSB::openDevice() {
|
||||
return false;
|
||||
}// else piCoutObj << "ok";
|
||||
//usb_reset(hdev);
|
||||
|
||||
|
||||
//usb_set_configuration(hdev, 1);
|
||||
//usb_set_altinterface(hdev, 0);
|
||||
|
||||
@@ -272,7 +272,7 @@ bool PIUSB::openDevice() {
|
||||
return false;
|
||||
} // else piCoutObj << "ok";
|
||||
interface_claimed = intefrace_;
|
||||
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user