usb_descriptor_header etc, aren't functions. They are C-structs.
This function "usb_init()" initializes the library, which, according to the docs, you call *first*.
"usb_find_busses()" looks like it returns a count of busses... and "usb_find_devices()" looks to return a count of devices... etc.
Since it's LGPL, you may wish to rather link to a DLL/.so/.dylib, rather than compile in or statically link to the library - unless your code is in-house or GPL'd.
If you have, say, a pointer to this struct, you could retrieve the "length" field with something like :
length = Byte Ptr(headerPtr)[0]
.. and for the descriptor type :
descType = Byte Ptr(headerPtr)[1]
, since they both appear to be byte-size values.
Things like :
inside another struct, is a pointer to a struct of "usb_interface", which itself might contain pointers to other structs.
The two ways you might go about accessing all this information is either via the Ptr access like I've mentioned above, or by writing glue c/cpp code which makes your BlitzMax code easier to manage.
This function "usb_init()" initializes the library, which, according to the docs, you call *first*.
"usb_find_busses()" looks like it returns a count of busses... and "usb_find_devices()" looks to return a count of devices... etc.
Since it's LGPL, you may wish to rather link to a DLL/.so/.dylib, rather than compile in or statically link to the library - unless your code is in-house or GPL'd.
struct usb_descriptor_header { u_int8_t bLength; u_int8_t bDescriptorType; };
If you have, say, a pointer to this struct, you could retrieve the "length" field with something like :
length = Byte Ptr(headerPtr)[0]
.. and for the descriptor type :
descType = Byte Ptr(headerPtr)[1]
, since they both appear to be byte-size values.
Things like :
struct usb_interface *interface;
inside another struct, is a pointer to a struct of "usb_interface", which itself might contain pointers to other structs.
The two ways you might go about accessing all this information is either via the Ptr access like I've mentioned above, or by writing glue c/cpp code which makes your BlitzMax code easier to manage.