Hello,

This is a follow-on for :
http://www.mail-archive.com/freebsd-usb%40freebsd.org/msg04000.html,
where a code snippet was posted to use the new USB stack.

I've just recompiled my old experiment (which used to work at the time), and 
it does not seem to work with today's current (I made the cosmetic changes 
due to the change of name for the libusb, so the compile at least is OK).

the issue is that the following loop (copied from the previous archived post) 
is never executed :
--------------------
        while ( ( pdev = libusb20_be_device_foreach ( pbe, pdev ) ) )
        {
                ddesc = libusb20_dev_get_device_desc ( pdev );
                printf("vendor %x prod %x\n", ddesc->idVendor, 
ddesc->idProduct);

                /* stop with the first found device */
                if ( ddesc->idVendor == MY_VENDOR_ID )
                {
                        libusb20_be_dequeue_device ( pbe, pdev );
                        break;
                }
        }
--------------------

pdev is always NULL at the end of the loop (even though a USB device has been 
plugged, has been detected by the USB stack and is correctly seen, as per 
usbconfig, with the expected idVendor).

I have not followed the recent developments on the USB stack : maybe some 
change is needed in my code ?

        Cheers

        TfH
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to