Commit Graph

60 Commits

Author SHA1 Message Date
Pete Batard 0fc4348172 r94: removed the need for DDK includes + minor fixes 2010-01-21 01:34:53 +00:00
Pete Batard 5590301e7f r93: HID part 2 (WIP)
- added composite HID device support in xusb.c
- fixed signed/unsigned bug in windows_compat.c (Orin Eman)
- added support for synchronous completion of async requests
- composite HID device support (ClassGUID fallback for driver unavail., read interface number from MI_##, extra path for HID)
- generic interface_by_endpoint and get_valid_interface
- added HID struct in priv
- HID submit_control_transfer
2010-01-20 20:29:45 +00:00
Pete Batard e158221159 r90: more compilation environment fixes:
- added Visual Studio 2005 (MSVC8) solution and project files (Orin Eman)
- renamed VS 2008 solution and project files
- fixed "warning: undefined symbols not allowed" for MinGW/cygwin in configure.ac
2010-01-19 00:55:30 +00:00
Pete Batard 7a8f7d1826 r89: extended API support
- composite devices as a separate backend API
- mutidriver support in composite devices interface
- HID: device interface path, open/close (WIP)
- added HID test in xusb.c
- fixed Windows version and DDK support
- smaller fixes
2010-01-18 20:32:38 +00:00
Pete Batard a93cef02ff r85: fixed MSVC warnings for x64 and reverted ssize_t to int for libusb_get_device_list change introduced with r52. Added definition on ssize_t in libusb.h for MSVC platforms. 2010-01-16 01:20:45 +00:00
Pete Batard 5f46b891de r82: added x64 support for MSVC and finalized directory structure.
Also amended README_MSVC.txt to reflect a better setup for the required DDK directories
2010-01-15 20:59:54 +00:00
Pete Batard b96e16e75f r80: workaround for interface macro redefinition on Windows (removes the need for #undef interface in end user sources) 2010-01-15 12:35:02 +00:00
Pete Batard 1626ee0042 r75: fixed missing <stdarg.h> include in xusb.c for UNIX platforms 2010-01-14 15:50:39 +00:00
Pete Batard 40e8e4185a r74: fixes CR/LF conversions introduced with previous changes 2010-01-14 15:44:47 +00:00
Pete Batard e6ef1694db r73: moved -pthread option to CFLAGS for platforms that need it 2010-01-14 14:09:46 +00:00
Pete Batard e452335742 Fix CR/LF inconsistencies 2010-01-14 12:57:07 +00:00
Pete Batard cc67a67e8f svn r64:
- added .def file for MSVC6 dll build (Michael Plante)
- prevented conflicts with pdb and HTML logs for lsusb & xusb
2010-01-14 01:41:28 +00:00
Pete Batard 83b01ba2dd svn r63: - updated Visual Studio 2008 projects files (fixed missing options for Debug) 2010-01-14 01:40:09 +00:00
Pete Batard fdcf676350 svn r62: More MSVC6 compatibility
- perr() without variadic in xusb.c (Michael Plante)
- dropped LOOP_CONTINUE variadic in windows_usb.c
2010-01-14 01:39:29 +00:00
Pete Batard 71613013b9 svn r54: - fixes missing config_msvc.h 2010-01-14 01:34:40 +00:00
Pete Batard a32c101a47 svn r52: MSVC compatibility update:
- changed ssize_t to int for libusb_get_device_list (do we really expect that
many devices?). Also in lsusb.c
- redefined inline to __inline in libusb.h
- remove the unistd.h include for OS_WINDOWS
- api/ vs ddk/ for ddk includes
- changed variadics using ,fmt... to ,... and __VA_ARGS__
- list_for_each_entry now requires a type parameter
- libusb_cpu_to_le16 as inline
- time.h vs sys/time.h
- harmonization of #ifdef vs #if defined() within individual files
- defined an empty __drv_preferredFunction(func,why) before #include
<cfgmgr32.h>, as it only applies to obsolete functions
- excluded USB_HUB_CAPS redefinition from MSVC
- new msvc top directory for includes (stdint.h inttypes.h and pthread)
- new config_msvc.h file
- new README_MSVC and MSVC project files
- removed various warnings (signed/unsigned comparisons, cast, etc)
2010-01-14 01:31:38 +00:00
Pete Batard 762989c9ba svn r44:
- fixed configure.ac for libusb handled timeouts
- fixed crash on invalid fds in windows_compat.c
- xusb improvements for mass storage test
2010-01-14 01:26:34 +00:00
Pete Batard 191930f700 svn r42:
- code cleanup
- device reset improvement (tentative)
- inquiry request for Mass Storage in xusb.c
2010-01-14 01:26:01 +00:00
Pete Batard 0cf1a367fa svn r40:
- feature complete!
- added transfer cancellation
- added device reset
- additional code cleanup
2010-01-14 01:25:18 +00:00
Pete Batard 055b0136bf svn r38:
- bulk/interrupt I/O at last!
- endpoint handling
- minor code improvements
2010-01-14 01:24:28 +00:00
Pete Batard 434caf7c49 svn r37:
- windows_set_interface_altsetting (untested)
- windows_set_configuration (untested)
- updated xusb.c test program, with comprehensive XBox Controller test and
preparation for bulk transfers test on Mass Storage device
2010-01-14 01:23:19 +00:00
Pete Batard bdcbace881 svn r25:
- WinUSB composite device support (with DeviceClasses registry lookup)
- better interface handling
- other minor improvements
2010-01-14 01:16:33 +00:00
Pete Batard eacdaf7c21 svn r22: Partial async I/O (control only) with custom poll and OVERLAPPED pointers as fds. Should read device strings. Also some provisions for composite devices. 2010-01-14 01:15:20 +00:00
Pete Batard f47443958e svn r18: basic open/close & claim/release interface + detection of WinUSB and driverless devices (priv->driver) 2010-01-14 01:14:09 +00:00
Pete Batard 0768325f83 svn r13: add winusb to the mix: query first interface and pipes on device open 2010-01-14 01:12:45 +00:00
Pete Batard 967842d93c svn r11: remove dpfp compilation (doesn't work on Windows) and add the xusb test program 2010-01-14 01:11:25 +00:00
Ludovic Rousseau 8392ff2213 lsusb example: make print_devs() static
lsusb.c:26: warning: no previous prototype for ‘print_devs’
2009-11-21 17:12:17 +00:00
Daniel Drake 1df713d622 Introduce contexts to the API
Suggested by David Zeuthen. This allows multiple libraries in the same
process to independently use libusb without interfering.
2008-06-26 22:42:59 -05:00
Daniel Drake fec7c84163 Handle hot-unplugging
This involved moving from select() to poll() because there is no way to
distinguish usbfs's POLLERR condition with select().
2008-05-11 20:47:27 +01:00
Daniel Drake fe4adcc99e Rework configuration handling
libusb no longer caches descriptors in libusb_device but backends are
intended to be able to provide copies from memory. In the common linux
case we can use sysfs.
2008-05-09 19:33:33 +01:00
Daniel Drake 5741bfe01a libusb_get_device_list() can return negative error code 2008-05-09 14:36:14 +01:00
Daniel Drake 5878daa85e Fix libusb_get_device_list return value
It was documented to return the list length, but was returning 0.
2008-05-04 00:51:59 +01:00
Daniel Drake 3675e978fb Expose bus number and device address 2008-05-02 12:28:31 +01:00
Daniel Drake 7ac0a405b4 Remove libusb_cancel_transfer_sync
This wasn't a particularly nice API. Cancellation should be handled by
the completion handler.
2008-04-29 12:08:35 +01:00
Daniel Drake e12618c79d add threaded example program 2008-04-19 16:24:21 +01:00
Daniel Drake d9b2ce2894 Constify some return data
Make it clear that apps should not mess with these structures
2008-04-01 23:30:49 +01:00
Daniel Drake 8d809854e2 Rename libusb_poll() to libusb_handle_events() 2008-03-30 22:19:00 +01:00
Daniel Drake 211f80c9f2 Isochronous endpoint I/O
Due to variable-sized structures, this involved changing allocation
mechanism. All transfers must now be allocated and freed through
libusb.

A synchronous function is missing, and I could do with writing a few
more helper functions to simplify things.
2008-03-30 22:17:34 +01:00
Daniel Drake ead09cde68 API documentation
Hopefully mostly complete. Some constants were renamed and move into
enums.
2008-03-20 21:19:45 +00:00
Daniel Drake c0c9432d38 Beginnings of cross-platform abstraction
This also includes a libusb_get_pollfds API change
2008-03-13 12:46:08 +00:00
Daniel Drake de4c5341d1 Add transfer flags 2008-03-10 18:38:15 +00:00
Daniel Drake aae05f688d Simplify libusb_fill_control_transfer()
Transfer length can be inferred from the setup packet.
2008-03-10 11:32:15 +00:00
Daniel Drake 7c5ea95297 get_device fixup
Rename API away from "devh" and fix implementation to match header
2008-03-10 11:29:24 +00:00
Daniel Drake 9e89d1aa82 Rename descriptor-getting functions
Based on feedback from Tim Roberts
2008-03-09 16:27:42 +00:00
Daniel Drake 283ae96c3c Simplify cancellation API
No need to provide the device here.
2008-03-09 16:15:02 +00:00
Daniel Drake ebad1c7968 Rename libusb_dev_handle to libusb_device_handle 2008-03-09 16:12:08 +00:00
Daniel Drake 66348c90ea 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...)
2008-03-09 00:58:09 +00:00
Daniel Drake d21ebe47ce 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.
2008-03-08 12:58:32 +00:00
Daniel Drake f3fdf44791 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.
2008-03-08 12:58:29 +00:00
Daniel Drake 23f8fb8baf 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.
2008-03-06 23:43:57 +00:00