summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Daniel Drake [Sun, 9 Mar 2008 16:15:02 +0000 (16:15 +0000)]
Simplify cancellation API
No need to provide the device here.
Daniel Drake [Sun, 9 Mar 2008 16:12:08 +0000 (16:12 +0000)]
Rename libusb_dev_handle to libusb_device_handle
Daniel Drake [Sun, 9 Mar 2008 01:01:57 +0000 (01:01 +0000)]
Move synchronous I/O implementation to its own file
Daniel Drake [Sun, 9 Mar 2008 00:58:09 +0000 (00:58 +0000)]
Separate transfer allocation and submission
Leads to some hefty API changes. Now we're much more similar to the
Linux kernel model.
Problems with dealing with asynchronous control transfers are passed
on to the user, basically you must allocate a buffer, start with the
setup, and put the data after. This won't make much sense until
documented (soon...)
Daniel Drake [Sat, 8 Mar 2008 12:48:35 +0000 (12:48 +0000)]
Rework URB API naming
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.
Daniel Drake [Sat, 8 Mar 2008 11:53:33 +0000 (11:53 +0000)]
Add fallback on /proc/bus/usb
/dev/bus/usb is a relatively new thing probably not present on every
system
Daniel Drake [Sat, 8 Mar 2008 00:10:16 +0000 (00:10 +0000)]
Persistent libusb_device storage
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.
Daniel Drake [Thu, 6 Mar 2008 23:43:57 +0000 (23:43 +0000)]
Add convenience function to find and open a device by USB VID+PID
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.
Daniel Drake [Thu, 6 Mar 2008 23:25:20 +0000 (23:25 +0000)]
Rework device discovery API
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.
Daniel Drake [Thu, 6 Mar 2008 17:05:04 +0000 (17:05 +0000)]
Remove ctrl debug code
This was unintentionally committed
Daniel Drake [Tue, 26 Feb 2008 22:11:34 +0000 (22:11 +0000)]
Notifications for changes to the fd set
Applications can now be notified when they should start and stop polling
new file descriptors.
Daniel Drake [Fri, 1 Feb 2008 12:20:20 +0000 (12:20 +0000)]
Fix header installation path
Daniel Drake [Wed, 30 Jan 2008 13:24:54 +0000 (13:24 +0000)]
TODO update
Daniel Drake [Wed, 30 Jan 2008 13:19:10 +0000 (13:19 +0000)]
Remove timers and signalfd
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.
Daniel Drake [Sat, 26 Jan 2008 18:16:56 +0000 (18:16 +0000)]
Poll usbfs descriptors directly
We don't need to use signalfd for this functionality because we can poll
the file descriptors for write events.
Daniel Drake [Sat, 26 Jan 2008 17:26:40 +0000 (17:26 +0000)]
Fix dpfp example compilation
Daniel Drake [Sat, 26 Jan 2008 17:22:53 +0000 (17:22 +0000)]
C++ header safety
Pointed out by JF
Daniel Drake [Sat, 26 Jan 2008 14:03:43 +0000 (14:03 +0000)]
Only use -fgnu89-inline when supported
J F pointed out that this option only works on gcc 4.3 and newer.
Daniel Drake [Sat, 5 Jan 2008 21:59:40 +0000 (21:59 +0000)]
Remove more fpusb remnants
Daniel Drake [Fri, 4 Jan 2008 01:19:07 +0000 (01:19 +0000)]
TODO update
Start listing the things I want to discuss/reconsider before 1.0 API
is final.
Daniel Drake [Fri, 4 Jan 2008 01:17:06 +0000 (01:17 +0000)]
Rename some _devh_ functions
Decided against naming functions in this style based on advice from
Tim Roberts. Still not really sure about devh naming in general.
Daniel Drake [Fri, 4 Jan 2008 01:13:25 +0000 (01:13 +0000)]
Use "transfer" instead of "msg"
Based on a discussion with Tim Roberts.
Daniel Drake [Fri, 4 Jan 2008 00:57:00 +0000 (00:57 +0000)]
Plural of bus is busses
SF #1633043
Daniel Drake [Fri, 4 Jan 2008 00:54:57 +0000 (00:54 +0000)]
API renaming: remove fpi and usb_ stuff
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.
Daniel Drake [Fri, 4 Jan 2008 00:40:49 +0000 (00:40 +0000)]
Rename to libusb-1.0
I've taken over the libusb project, and what was previously known as fpusb
will eventually be released as libusb-1.0.
Daniel Drake [Sun, 30 Dec 2007 22:09:50 +0000 (22:09 +0000)]
Compiler flags update
Also fix some warnings
Daniel Drake [Sun, 30 Dec 2007 22:05:17 +0000 (22:05 +0000)]
Fix signalfd structure size on x86
ptr is a 64-bit value
Daniel Drake [Wed, 12 Dec 2007 23:32:54 +0000 (23:32 +0000)]
Don't pass ctrl_msg/bulk_msg structures through async paths
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.
Daniel Drake [Mon, 3 Dec 2007 23:29:22 +0000 (23:29 +0000)]
Add functionality to access device descriptors
Daniel Drake [Mon, 3 Dec 2007 22:27:21 +0000 (22:27 +0000)]
Rename fpusb_device_handle functions to devh
Prevents confusion with functions that work on fpusb_dev structures.
Daniel Drake [Sun, 2 Dec 2007 23:16:57 +0000 (23:16 +0000)]
Add API to access poll fd
Almost forgot... :)
Daniel Drake [Wed, 28 Nov 2007 13:48:45 +0000 (13:48 +0000)]
Initial commit
Basic library structure which supports enumerating detected USB devices