367 Commits

Author SHA1 Message Date
Pete Batard 73cdd86fe7 pipe communication between installer and other improvements a166 2010-03-12 02:15:51 +00:00
Pete Batard 53110b64d1 added Vista/7 privilege escalation (WIP) a165 2010-03-11 02:32:26 +00:00
Pete Batard 9d1d3d72ee fixed chkinf errors and warnings a164 2010-03-09 00:54:43 +00:00
Pete Batard b352189619 removed resource.h + add cfmgr32 DLL refs a163 2010-03-09 00:20:06 +00:00
Pete Batard cb781bf531 merged master's r201 a162 2010-03-08 23:40:38 +00:00
Pete Batard d4a736d822 merged r197 a161 2010-03-06 00:15:19 +00:00
Pete Batard d7aabf0bb0 fixed residuals of previous merge a160 2010-02-25 00:03:08 +00:00
Pete Batard 810785d970 merged with master's r175 a159 2010-02-24 23:41:45 +00:00
Pete Batard f2297884fa reverts some of the changes from dbd439/6c7a1e (r173) r175 2010-02-24 23:04:03 +00:00
Pete Batard 2745941df4 exclude dpfp_threaded if pthread is not available (MinGW) r174 2010-02-24 22:18:41 +00:00
Pete Batard 6c7a1e0ca4 includes simplification and cleanup (os) r173 2010-02-24 22:06:18 +00:00
Pete Batard dbd439fa2c includes simplification and cleanup (core) 2010-02-24 22:05:40 +00:00
Pete Batard 0a40fde82d renamed _libusb_ unistd calls to usbi_ r172 2010-02-24 19:04:06 +00:00
Pete Batard 921572e90b added unistd_posix.h r171 2010-02-24 18:05:11 +00:00
Pete Batard e49877a0bf moved standard calls redefinitions into a separate .h
This applies to read/write/close/poll/pipe -> unistd_posix.h
2010-02-24 17:51:05 +00:00
Pete Batard 8d4f2913ba fixed obsolete config_msvc.h and pthread-win32 references
also cleaned up msvc/config.h
r170
2010-02-24 16:36:48 +00:00
Pete Batard 8121a13b6a added dynamic resource handling for DDL extraction (WIP) a158 2010-02-24 12:46:41 +00:00
Pete Batard c83b94c78f merge abstraction for POSIX Threads and integration changes (Michael Plante, Peter Stuge)
v1.0.6 release

Darwin: support multiple calls to libusb_init
Credit to Orin Eman for finding this bug.

Darwin: use logging functions
Use usbi_warn, usbi_err, and usbi_info instead of _usbi_log.

Darwin: fix memory leak in process_device
Credit to Mike Colagrosso for finding this bug.

Add internal abstraction for POSIX Threads
This prepares for a Windows backend without dependency on pthreads-w32.

pthread_* is renamed to usbi_* and PTHREAD_* to USBI_*.

A usbi_mutex_static_t and usbi_mutex_static_lock() and _unlock() are
introduced for statically initialized mutexes, since they may be
implemented using other types when pthreads mutexes aren't used.

Move -pthread from libusb/Makefile.am to host-specific AM_CFLAGS in
configure.ac. AM_CFLAGS is already used in Makefile.am.

(Numerous merge conflicts resolved by Michael Plante)

misc fixes to pthreads abstraction
* windows_compat.h should not be directly included (use libusbi.h)
* windows_usb.c still had some references to pthread_mutex_[un]lock

Add libusb_strerror() to get short error message in English from enum
(Merge conflicts resolved by Michael Plante)

Better cleanup on errors, stricter types and some good casts
Avoid various memory leaks in error code paths and remove warnings. Also
add usbi_cond_destroy in os/threads_posix.h because it's used for cleanup
now.

(Merge conflicts resolved by Michael Plante)

Rename all interface parameters to usb_interface or interface_number
(Merge conflicts resolved by Michael Plante)

Add type parameter to the list_for_each_entry() and _safe() macros
(Merge conflicts resolved by Michael Plante)

VA_ARGS workaround for logging with MSVC6
(Merge conflicts resolved by Michael Plante)

Fix context memory leak in libusb_init()
* Now holds default_context_lock for duration of libusb_init
* Doesn't allocate it if not needed

Fix the last MSVC /W3 warning

removal of pthreads from MSVC and mingw
* removed pthread*.lib from linking in msvc6 (2005/8 not yet edited)
* added threads_windows.[ch] to all project files in msvc6
* added usbi_cond_signal to both threading versions, unused
* added native windows threading code, now used

removed redundant time.h includes

removed pthread-win32 informational solution files

updated MSVC 2005/2008 for thread abstraction

fixed DDK build

fixed cygwin's use of POSIX threads

fixed dpfp/dpfp_threaded for MinGW compatibility

config_msvc.h -> msvc/config.h

pthread abstraction for DLL project files

fixed bad reference to thread_windows in 2005 DLL vcproj

cygwin ifdef is not required in threads_windows.h - removed

fixed residuals from previous patches

moved thread source detection into autotool scripts
r169
2010-02-24 11:29:43 +00:00
Pete Batard 1d8a2cc6ae improved HID feature reports r168 2010-02-22 16:45:18 +00:00
Pete Batard 71c795ca20 updated copyright notice and credits in source r167 2010-02-20 01:16:20 +00:00
Pete Batard 2e83188d9c added detection of uninitialized devices on open r166 2010-02-19 17:16:41 +00:00
Pete Batard 3a42fe7e65 fixed cygwin warning r165 2010-02-19 01:34:07 +00:00
Pete Batard 87b577fda7 fixed improper parent when reusing device + cosmetics fixes r164 2010-02-18 21:07:19 +00:00
Pete Batard 5276f2ab66 revert r102/f0d352: handle_timeouts() CORE modification r163 2010-02-18 00:55:07 +00:00
Pete Batard 60412cb33f xusb improvements (feature reports) r162 2010-02-18 00:22:50 +00:00
Pete Batard bd03584493 ERROR_SEM_TIMEOUT + FORCE_INSTANT_TIMEOUTS for cancellation
added ERROR_SEM_TIMEOUT case in windows_transfer_callback,
FORCE_INSTANT_TIMEOUTS compilation option + uint8_t fix for ddk_build
r161
2010-02-18 00:14:23 +00:00
Pete Batard c01d1df73c fixed HID feature reports r160 2010-02-17 23:25:12 +00:00
Pete Batard 857f2f9267 improved windows_set_configuration r159 2010-02-17 20:36:27 +00:00
Pete Batard 72cd345907 removed unofficial versioning from comments r158 2010-02-17 17:56:19 +00:00
Pete Batard 5427675261 fixed aggressive transfer cancellation r157 2010-02-17 16:28:52 +00:00
Pete Batard 00d87387ec revert back to call copy_transfer_data always in callback
previous change there was unnecessary and actually messed up control transfers
r156
2010-02-16 22:20:17 +00:00
Pete Batard 416c5d90af fixed HID interrupt transfers + HID cosmetics improvements r155 2010-02-16 16:26:43 +00:00
Pete Batard b16c22266b fixed a couple issues with driver-install vcproj a157 2010-02-15 23:49:31 +00:00
Pete Batard 3efb8b6f75 fixed libusb_strerror to be in line with core patch 6/7 r154 2010-02-15 21:08:00 +00:00
Pete Batard adf2a8e308 added inf generation and installation (WIP) a156 2010-02-15 19:24:27 +00:00
Pete Batard 0d6afe88a6 added missing vcproj a155 2010-02-15 18:10:05 +00:00
Pete Batard 2908c3cefa new winusb automated driver installation branch a154 2010-02-15 01:27:30 +00:00
Michael Plante 03e9371a46 fixed signed/unsigned comparison: int->size_t r153 2010-02-12 01:21:46 +00:00
Pete Batard fd30aa2f72 moved real-time functionality out of timer thread (Michael Plante)
also cleanup single-index arrays, remove unnecessary goto and
additional cleanup
r152
2010-02-12 00:56:16 +00:00
Michael Plante 8c605c7779 fix 2 timer-related bugs (unlikely)
* failed to check CreateSemaphore()
* index out of bounds on timer_index
r151
2010-02-12 00:06:50 +00:00
Pete Batard 1cda5082f8 added detection of HID report IDs for interrupt transfers
processing of HID report IDs in hid_open using HidP_GetValueCaps
added corresponding DLL call
r150
2010-02-11 21:02:54 +00:00
Pete Batard 9a8b0b9559 changed HID_USE_LAST_REPORTS to USE_HIDD_FOR_REPORTS
clarification for the compilation option above
r149
2010-02-11 19:29:15 +00:00
Pete Batard 6ba1e6cb46 fixed bad HID input report data when using control
removes the use of transfer->buffer as dest in hid_copy_transfer_data
uses private hid_dest copy from windows_transfer_priv instead
r148
2010-02-11 00:01:32 +00:00
Pete Batard 06f92a48c5 final fix for composite HID mouse and keyboard detection
introduces the use of multiple driver names in the USB API backends
r147
2010-02-10 23:06:54 +00:00
Pete Batard 36d76382a0 fixed memory leak dues to HID collections in set_composite_device r146 2010-02-10 00:51:54 +00:00
Pete Batard 36e4414a35 r145: fixed memory leak in _libusb_poll r145 2010-02-09 21:13:16 +00:00
Pete Batard 15e2be512b r144: preliminary fix for composite HID mouse and keyboard detection r144 2010-02-08 20:07:15 +00:00
Pete Batard fe8e7eff48 r143: fixed a couple of issues with HID r143 2010-02-08 01:52:00 +00:00
Pete Batard 54890a6104 r142: - fixed claiming of interfaces >0 for non-composite (Dave C.) + better autoclaim handling
- moved compilation options from config_msvc.h to windows_usb.c
- processed remaining TODOs
r142
2010-02-07 01:31:52 +00:00
Pete Batard dbd8c6a375 r141: HID I/O Overhaul:
- discard report ID from buffer (new hid_buffer in transfer_priv & new copy_transfer_data backend call)
- overflow detection
- extended HID xusb test
Also:
- fixed ill placed memset on composite device siblings detection
r141
2010-02-06 14:56:34 +00:00