summaryrefslogtreecommitdiff
path: root/libusb/libusb.h
Commit message (Collapse)AuthorAgeFilesLines
* merged latest changes from officialr227Pete Batard2010-03-251-0/+6
|
* removed trailing whitespaces (core)Peter Stuge2010-03-181-1/+1
|
* residual corrections from previous commits (Michael Plante)r189Pete Batard2010-03-031-1/+1
|
* reverts some of the changes from dbd439/6c7a1e (r173)r175Pete Batard2010-02-241-2/+2
|
* includes simplification and cleanup (core)Pete Batard2010-02-241-2/+2
|
* merge abstraction for POSIX Threads and integration changes (Michael Plante, ↵r169Pete Batard2010-02-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* r125: oops - fixed check for OS_WINDOWS in previous patchPete Batard2010-01-301-1/+1
|
* r124: removes #error on previous commit and fixes thing ourselvesPete Batard2010-01-301-11/+11
|
* r123: reverted the use of usb_interface in core and forced interface to be ↵Pete Batard2010-01-291-7/+12
| | | | undefined always on Windows
* r115: added libusb_strerror (Francesco Montorsi)Pete Batard2010-01-251-0/+6
|
* r86: VS2005 compatibility update and pthread-win32_x64 helpersPete Batard2010-01-161-1/+1
| | | | Minor comment clarification in libusb.h
* r85: fixed MSVC warnings for x64 and reverted ssize_t to int for ↵Pete Batard2010-01-161-1/+10
| | | | libusb_get_device_list change introduced with r52. Added definition on ssize_t in libusb.h for MSVC platforms.
* r81: amend previous workaround (should only apply to non Windows platforms)Pete Batard2010-01-151-9/+6
|
* r80: workaround for interface macro redefinition on Windows (removes the ↵Pete Batard2010-01-151-8/+19
| | | | need for #undef interface in end user sources)
* fixed MSVC warnings (/W4 or MSVC6)Pete Batard2010-01-141-2/+2
|
* Fix CR/LF inconsistenciesPete Batard2010-01-141-7/+7
|
* svn r54: - fixes missing config_msvc.hPete Batard2010-01-141-18/+23
|
* svn r4: revert back to using interface for variable names as in master branchPete Batard2010-01-141-6/+6
|
* mirror libusb-winusb git branch from 2009.12.03 part 2 - core filesPete Batard2010-01-141-6/+6
|
* Add libusb_get_max_iso_packet_size() to libusb.hLudovic Rousseau2009-11-071-0/+1
| | | | core.c:777: warning: no previous prototype for 'libusb_get_max_iso_packet_size'
* Use timerfd for timeout handlingDaniel Drake2009-11-071-0/+1
| | | | | | | | | | | | Use a new file descriptor from the timerfd system calls to handle timeouts. On supported systems, this means that there is less hassle figuring out when the poll() timeout should be, since libusb_get_next_timeout() will always return 0 and the timeout events will be triggered as regular activity on the file descriptor set. Add API function libusb_pollfds_handle_timeouts() to detect whether you're on a platform with the timing headache, and flesh out the surrounding documentation.
* Don't terminate enums with commasDaniel Drake2009-06-141-12/+12
| | | | | g++ -pedantic doesn't like this Reported by Eberhard Mattes
* Eliminate -Wsign-compare compiler warningsDaniel Drake2009-06-071-4/+22
| | | | | | This was due to an API inconsistency which can be safely worked around. Hopefully we'll remember to fix the API next time we come to break things.
* Make endianness macros endian-independentNathan Hjelm2009-02-161-14/+13
| | | | | Implementation suggested by David Moore. Needed for proper universal code support on Darwin.
* API docs: describe libusb_transfer_cb_fn typeHans Ulrich Niedermann2009-02-011-0/+9
| | | | | | | | Add some text describing the libusb_transfer_cb_fn function type with the semantics I have gathered from reading other parts of the API docs, referring to the proper section for more details. [dsd: tweaked the description slightly]
* Make empty array in struct compatible with C99Hans Ulrich Niedermann2009-02-011-1/+7
| | | | | | | | If the compiler is known to be running in C99 mode, use "flexible array members" ("foo[]"). If the compiler is running in any other mode, continue using the non-standard but widely common "foo[0]" syntax.
* EOL-whitespace fixesMikhail Gusarov2008-12-131-11/+11
| | | | Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.ent>
* Improvements to multi-threaded I/O systemDaniel Drake2008-11-211-0/+1
| | | | | | Documentation brushed up, and I realised that another function is needed for tight event handling loops -- they must be able to check if an open/close operation is trying to interrupt it.
* Add libusb_attach_kernel_driver()Bastien Nocera2008-11-031-0/+1
| | | | | | Add support for re-attaching a driver to a device under Linux. [dsd: fixed handling of return value, and added LIBUSB_ERROR_BUSY case]
* Async I/O documentation touchupsDaniel Drake2008-08-271-1/+4
|
* Add libusb_get_configuration prototypeDaniel Drake2008-08-101-0/+1
| | | | Pointed out by Lou
* Allow user data pointer to be passed through pollfd notification APIDaniel Drake2008-06-261-3/+8
|
* Introduce contexts to the APIDaniel Drake2008-06-261-20/+41
| | | | | Suggested by David Zeuthen. This allows multiple libraries in the same process to independently use libusb without interfering.
* Overflow handlingDaniel Drake2008-06-201-5/+11
|
* Implement serialization of event handlersDaniel Drake2008-05-251-5/+15
| | | | | | Now offers a mechanism to wait for events while another thread is doing the event handling. Complicates things for MT async apps, but then again it's a bit of a tricky combination to start with.
* don't print messages by defaultDaniel Drake2008-05-231-0/+1
| | | | | | | Add libusb_set_debug() API to set message verbosity. Ludovic Rousseau pointed out that applications may close stdout/stderr descriptors, which might then be reused.
* More informative libusb_open() return codeDaniel Drake2008-05-161-1/+1
| | | | Hopefully one of the last API tweaks...
* Handle hot-unpluggingDaniel Drake2008-05-111-7/+16
| | | | | This involved moving from select() to poll() because there is no way to distinguish usbfs's POLLERR condition with select().
* Documentation workDaniel Drake2008-05-111-0/+25
|
* Endianness of control setup packetsDaniel Drake2008-05-111-7/+39
| | | | | | | | Document behaviour where host-endian and bus-endian (little) should be used respectively. Also remove packed attribute from libusb_control_setup as all fields are naturally aligned.
* Support unconfigured devicesDaniel Drake2008-05-101-6/+6
|
* Fetch configurations by index (not value)Daniel Drake2008-05-101-1/+3
| | | | Otherwise there is no way to know which values to look for.
* Rework configuration handlingDaniel Drake2008-05-091-4/+8
| | | | | | 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.
* libusb_get_device_list() can return negative error codeDaniel Drake2008-05-091-1/+2
|
* documentation touchupsDaniel Drake2008-05-051-7/+24
|
* Isochronous transfer helper functionsDaniel Drake2008-05-051-3/+79
|
* Detect endpoint halts and unsupported control requestsDaniel Drake2008-05-051-3/+8
|
* add functionality for querying and detaching kernel driverDaniel Drake2008-05-041-1/+5
|
* Descriptor reading functionalityDaniel Drake2008-05-041-0/+45
|
* sanitized error returns from synchronous I/O functionsDaniel Drake2008-05-041-2/+3
|