BlitzMax Modules

BlitzMax Forums/BlitzMax Programming/BlitzMax Modules

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Much.

Have a look at testlibusb.c in the tests dir of libusb.
It shows how to access all the information.

Specifically :
  usb_init();

  usb_find_busses();
  usb_find_devices();

  for (bus = usb_busses; bus; bus = bus->next) {
    if (bus->root_dev && !verbose)
      print_device(bus->root_dev, 0);
    else {
      struct usb_device *dev;

      for (dev = bus->devices; dev; dev = dev->next)
        print_device(dev, 0);
    }
  }

"usb_busses" is a static variable, which you won't be able to access directly from BlitzMax. You'll need to add some C/C++ wrapping. The struct that it points to is a linked-list of buses, each of which has information on the devices that are connected to it.

:o)