summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)AuthorFilesLines
2008-03-08Rework URB API namingDaniel Drake1-35/+35
Now refer to everything as "transfers" as consistent with the USB spec libusb_transfer is now a kind of transfer handle. To reduce confusion with libusb_bulk_transfer and libusb_control_transfer, those have been renamed to libusb_{control,bulk}_transfer_request.
2008-03-08Persistent libusb_device storageDaniel Drake1-1/+1
Devices are now assigned a session ID (currently busnum:devaddr) which is used to distinguish unique devices. Now multiple callers of libusb_get_device_list will get the same libusb_device structure instances.
2008-03-06Add convenience function to find and open a device by USB VID+PIDDaniel Drake1-30/+2
Lots of libusb apps I write are simple test apps not intended to be real apps. Having a function available to quickly locate my device will be handy in such situations.
2008-03-06Rework device discovery APIDaniel Drake2-27/+41
libusb_find_devices and libusb_get_devices are no more libusb_get_device_list obtains a list of libusb_device structures for all known devices in the system. Each libusb_device now has a reference count, defaulting to 1 on instantiation. The reference count of 1 refers to the fact that it is present in the list in this scenario. Opening a device adds a pointer to the libusb_device structure in the handle, so that also adds a reference. Closing the device removes that reference. The function to free the device list can optionally unref all the devices inside. In future we will make the libusb_device instances all "global" so that if the app calls get_device_list twice it actually gets the same libusb_device structure references back. This way we can start to track disconnects, and we can investigate adding a unique "session ID" to each libusb_device, an identifier guaranteed to be unique to that device until reboot.
2008-01-30Remove timers and signalfdDaniel Drake2-2/+7
Instead of timers, add a mechanism for informing the parent app when the next timeout is due to happen, so that it can call us at that time. As we no longer use signals, signalfd has also been removed.
2008-01-26Fix dpfp example compilationDaniel Drake1-3/+3
2008-01-04Rename some _devh_ functionsDaniel Drake1-4/+4
Decided against naming functions in this style based on advice from Tim Roberts. Still not really sure about devh naming in general.
2008-01-04Use "transfer" instead of "msg"Daniel Drake1-16/+17
Based on a discussion with Tim Roberts.
2008-01-04API renaming: remove fpi and usb_ stuffDaniel Drake2-7/+7
fpi changed to usbi. We should not expose structures with prefix "usb_" in the public namespace as it is quite likely there will be some conflict somewhere. Instead, using "libusb_" should be safer.
2008-01-04Rename to libusb-1.0Daniel Drake3-60/+60
I've taken over the libusb project, and what was previously known as fpusb will eventually be released as libusb-1.0.
2007-12-12Don't pass ctrl_msg/bulk_msg structures through async pathsDaniel Drake1-7/+7
These are easiest to construct on the stack, but in the async case it is likely that the submitting function returns (hence stack is destroyed) before URB completion.
2007-12-03Rename fpusb_device_handle functions to devhDaniel Drake1-4/+4
Prevents confusion with functions that work on fpusb_dev structures.
2007-12-02Initial commitDaniel Drake3-0/+611
Basic library structure which supports enumerating detected USB devices