fx2lafw: Corrected check_conf_profile checks
This commit is contained in:
parent
dba024420f
commit
9031ce63f3
|
@ -117,18 +117,13 @@ static gboolean check_conf_profile(libusb_device *dev)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
intf_dsc = &(conf_dsc->interface[0].altsetting[0]);
|
intf_dsc = &(conf_dsc->interface[0].altsetting[0]);
|
||||||
if (intf_dsc->bNumEndpoints != 3)
|
if (intf_dsc->bNumEndpoints != 2)
|
||||||
/* Need exactly 3 end points. */
|
/* Need exactly 2 end points. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((intf_dsc->endpoint[0].bEndpointAddress & 0x8f) !=
|
if ((intf_dsc->endpoint[0].bEndpointAddress & 0x8f) !=
|
||||||
(1 | LIBUSB_ENDPOINT_OUT))
|
(2 | LIBUSB_ENDPOINT_IN)) // 0x82
|
||||||
/* The first endpoint should be 1 (outbound). */
|
/* The first endpoint should be 2 (inbound). */
|
||||||
break;
|
|
||||||
|
|
||||||
if ((intf_dsc->endpoint[1].bEndpointAddress & 0x8f) !=
|
|
||||||
(2 | LIBUSB_ENDPOINT_IN))
|
|
||||||
/* The second endpoint should be 2 (inbound). */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* TODO: Check the debug channel... */
|
/* TODO: Check the debug channel... */
|
||||||
|
|
Loading…
Reference in New Issue