summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-08-18 15:49:22 -0700
committerChris Dickens <christopher.a.dickens@gmail.com>2020-08-18 15:49:22 -0700
commit0abebc57a553ee3851e2ad8ff1a9794d943aca34 (patch)
treeaa2b184e7b718da990f8130998afa40f6f771005
parent5671fc4dbe691786280f78323533cb1ebd7702dd (diff)
downloadlibusb-0abebc57a553ee3851e2ad8ff1a9794d943aca34.tar.gz
Fix typos detected by codespell and manual inspection
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r--examples/hotplugtest.c2
-rw-r--r--examples/sam3u_benchmark.c2
-rw-r--r--libusb/core.c8
-rw-r--r--libusb/descriptor.c2
-rw-r--r--libusb/hotplug.c4
-rw-r--r--libusb/io.c18
-rw-r--r--libusb/libusb-1.0.rc2
-rw-r--r--libusb/libusb.h6
-rw-r--r--libusb/libusbi.h2
-rw-r--r--libusb/os/darwin_usb.c4
-rw-r--r--libusb/os/linux_usbfs.c2
-rw-r--r--libusb/os/sunos_usb.c2
-rw-r--r--libusb/os/windows_common.c6
-rw-r--r--libusb/os/windows_winusb.c6
-rw-r--r--libusb/sync.c6
-rw-r--r--libusb/version_nano.h2
16 files changed, 37 insertions, 37 deletions
diff --git a/examples/hotplugtest.c b/examples/hotplugtest.c
index 4d0db5e..94f7e56 100644
--- a/examples/hotplugtest.c
+++ b/examples/hotplugtest.c
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
}
if (!libusb_has_capability (LIBUSB_CAP_HAS_HOTPLUG)) {
- printf ("Hotplug capabilites are not supported on this platform\n");
+ printf ("Hotplug capabilities are not supported on this platform\n");
libusb_exit (NULL);
return EXIT_FAILURE;
}
diff --git a/examples/sam3u_benchmark.c b/examples/sam3u_benchmark.c
index b362106..68c157d 100644
--- a/examples/sam3u_benchmark.c
+++ b/examples/sam3u_benchmark.c
@@ -132,7 +132,7 @@ static void measure(void)
diff_msec = (tv_stop.tv_sec - tv_start.tv_sec) * 1000L;
diff_msec += (tv_stop.tv_usec - tv_start.tv_usec) / 1000L;
- printf("%lu transfers (total %lu bytes) in %lu miliseconds => %lu bytes/sec\n",
+ printf("%lu transfers (total %lu bytes) in %lu milliseconds => %lu bytes/sec\n",
num_xfer, num_bytes, diff_msec, (num_bytes * 1000L) / diff_msec);
}
diff --git a/libusb/core.c b/libusb/core.c
index 4218496..58d43fa 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -53,7 +53,7 @@ struct list_head active_contexts_list;
* \section intro Introduction
*
* libusb is an open source library that allows you to communicate with USB
- * devices from userspace. For more info, see the
+ * devices from user space. For more info, see the
* <a href="http://libusb.info">libusb homepage</a>.
*
* This documentation is aimed at application developers wishing to
@@ -213,12 +213,12 @@ struct list_head active_contexts_list;
* you when this has happened, so if someone else resets your device it will
* not be clear to your own program why the device state has changed.
*
- * Ultimately, this is a limitation of writing drivers in userspace.
+ * Ultimately, this is a limitation of writing drivers in user space.
* Separation from the USB stack in the underlying kernel makes it difficult
* for the operating system to deliver such notifications to your program.
* The Linux kernel USB stack allows such reset notifications to be delivered
* to in-kernel USB drivers, but it is not clear how such notifications could
- * be delivered to second-class drivers that live in userspace.
+ * be delivered to second-class drivers that live in user space.
*
* \section blockonly Blocking-only functionality
*
@@ -1927,7 +1927,7 @@ int API_EXPORTED libusb_free_streams(libusb_device_handle *dev_handle,
* the same cache lines) when a transfer is in progress, although it is legal
* to have several transfers going on within the same memory block.
*
- * Will return NULL on failure. Many systems do not support such zerocopy
+ * Will return NULL on failure. Many systems do not support such zero-copy
* and will always return NULL. Memory allocated with this function must be
* freed with \ref libusb_dev_mem_free. Specifically, this means that the
* flag \ref LIBUSB_TRANSFER_FREE_BUFFER cannot be used to free memory allocated
diff --git a/libusb/descriptor.c b/libusb/descriptor.c
index bae201d..cda3afd 100644
--- a/libusb/descriptor.c
+++ b/libusb/descriptor.c
@@ -735,7 +735,7 @@ int API_EXPORTED libusb_get_ss_endpoint_companion_descriptor(
header = (struct usbi_descriptor_header *)buffer;
if (header->bDescriptorType != LIBUSB_DT_SS_ENDPOINT_COMPANION) {
if (header->bLength < DESC_HEADER_LENGTH) {
- usbi_err(ctx, "invalid desciptor length %u",
+ usbi_err(ctx, "invalid descriptor length %u",
header->bLength);
return LIBUSB_ERROR_IO;
}
diff --git a/libusb/hotplug.c b/libusb/hotplug.c
index 1b654e3..e3e5e76 100644
--- a/libusb/hotplug.c
+++ b/libusb/hotplug.c
@@ -50,8 +50,8 @@
* expecting additional events. Returning 0 will rearm the callback and 1 will cause
* the callback to be deregistered. Note that when callbacks are called from
* libusb_hotplug_register_callback() because of the \ref LIBUSB_HOTPLUG_ENUMERATE
- * flag, the callback return value is ignored, iow you cannot cause a callback
- * to be deregistered by returning 1 when it is called from
+ * flag, the callback return value is ignored. In other words, you cannot cause a
+ * callback to be deregistered by returning 1 when it is called from
* libusb_hotplug_register_callback().
*
* Callbacks for a particular context are automatically deregistered by libusb_exit().
diff --git a/libusb/io.c b/libusb/io.c
index 54bef8a..48e964d 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -75,7 +75,7 @@
* a single function call. When the function call returns, the transfer has
* completed and you can parse the results.
*
- * If you have used the libusb-0.1 before, this I/O style will seem familar to
+ * If you have used the libusb-0.1 before, this I/O style will seem familiar to
* you. libusb-0.1 only offered a synchronous interface.
*
* In our input device example, to read button presses you might write code
@@ -101,7 +101,7 @@ if (r == 0 && actual_length == sizeof(data)) {
* sleeping for that long. Execution will be tied up inside the library -
* the entire thread will be useless for that duration.
*
- * Another issue is that by tieing up the thread with that single transaction
+ * Another issue is that by tying up the thread with that single transaction
* there is no possibility of performing I/O with multiple endpoints and/or
* multiple devices simultaneously, unless you resort to creating one thread
* per transaction.
@@ -410,7 +410,7 @@ if (r == 0 && actual_length == sizeof(data)) {
* wLength of the setup packet, rather than the size of the data buffer. So,
* if your wLength was 4, your transfer's <tt>length</tt> was 12, then you
* should expect an <tt>actual_length</tt> of 4 to indicate that the data was
- * transferred in entirity.
+ * transferred in entirety.
*
* To simplify parsing of setup packets and obtaining the data from the
* correct offset, you may wish to use the libusb_control_transfer_get_data()
@@ -572,7 +572,7 @@ if (r == 0 && actual_length == sizeof(data)) {
*
* Lets begin with stating the obvious: If you're going to use a separate
* thread for libusb event handling, your callback functions MUST be
- * threadsafe.
+ * thread-safe.
*
* Other then that doing event handling from a separate thread, is mostly
* simple. You can use an event thread function as follows:
@@ -812,7 +812,7 @@ while (user has not requested application exit) {
* system calls. This is directly exposed at the
* \ref libusb_asyncio "asynchronous interface" but it is important to note that the
* \ref libusb_syncio "synchronous interface" is implemented on top of the
- * asynchonrous interface, therefore the same considerations apply.
+ * asynchronous interface, therefore the same considerations apply.
*
* The issue is that if two or more threads are concurrently calling poll()
* or select() on libusb's file descriptors then only one of those threads
@@ -1022,7 +1022,7 @@ printf("completed!\n");
* event handling), because the event waiter seems to have taken the event
* waiters lock while waiting for an event. However, the system does support
* multiple event waiters, because libusb_wait_for_event() actually drops
- * the lock while waiting, and reaquires it before continuing.
+ * the lock while waiting, and reacquires it before continuing.
*
* We have now implemented code which can dynamically handle situations where
* nobody is handling events (so we should do it ourselves), and it can also
@@ -1954,7 +1954,7 @@ void API_EXPORTED libusb_interrupt_event_handler(libusb_context *ctx)
*
* You only need to use this lock if you are developing an application
* which calls poll() or select() on libusb's file descriptors directly,
- * <b>and</b> may potentially be handling events from 2 threads simultaenously.
+ * <b>and</b> may potentially be handling events from 2 threads simultaneously.
* If you stick to libusb's event handling loop functions (e.g.
* libusb_handle_events()) then you do not need to be concerned with this
* locking.
@@ -2399,7 +2399,7 @@ int API_EXPORTED libusb_handle_events_timeout(libusb_context *ctx,
/** \ingroup libusb_poll
* Handle any pending events in blocking mode. There is currently a timeout
- * hardcoded at 60 seconds but we plan to make it unlimited in future. For
+ * hard-coded at 60 seconds but we plan to make it unlimited in future. For
* finer control over whether this function is blocking or non-blocking, or
* for control over the timeout, use libusb_handle_events_timeout_completed()
* instead.
@@ -2561,7 +2561,7 @@ int API_EXPORTED libusb_get_next_timeout(libusb_context *ctx,
if (itransfer->timeout_flags & (USBI_TRANSFER_TIMEOUT_HANDLED | USBI_TRANSFER_OS_HANDLES_TIMEOUT))
continue;
- /* if we've reached transfers of infinte timeout, we're done looking */
+ /* if we've reached transfers of infinite timeout, we're done looking */
if (!TIMESPEC_IS_SET(&itransfer->timeout))
break;
diff --git a/libusb/libusb-1.0.rc b/libusb/libusb-1.0.rc
index 9cdecd0..bcb10fa 100644
--- a/libusb/libusb-1.0.rc
+++ b/libusb/libusb-1.0.rc
@@ -1,5 +1,5 @@
/*
- * For Windows: input this file to the Resoure Compiler to produce a binary
+ * For Windows: input this file to the Resource Compiler to produce a binary
* .res file. This is then embedded in the resultant library (like any other
* compilation object).
* The information can then be queried using standard APIs and can also be
diff --git a/libusb/libusb.h b/libusb/libusb.h
index e9f5253..3931d60 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -1325,10 +1325,10 @@ enum libusb_log_level {
* \see libusb_set_log_cb()
*/
enum libusb_log_cb_mode {
- /** Callback function handling all log mesages. */
+ /** Callback function handling all log messages. */
LIBUSB_LOG_CB_GLOBAL = (1 << 0),
- /** Callback function handling context related log mesages. */
+ /** Callback function handling context related log messages. */
LIBUSB_LOG_CB_CONTEXT = (1 << 1)
};
@@ -1921,7 +1921,7 @@ void LIBUSB_CALL libusb_set_pollfd_notifiers(libusb_context *ctx,
* Callbacks handles are generated by libusb_hotplug_register_callback()
* and can be used to deregister callbacks. Callback handles are unique
* per libusb_context and it is safe to call libusb_hotplug_deregister_callback()
- * on an already deregisted callback.
+ * on an already deregistered callback.
*
* Since version 1.0.16, \ref LIBUSB_API_VERSION >= 0x01000102
*
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index 4a3e9d5..b5b4a2a 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -1081,7 +1081,7 @@ struct usbi_os_backend {
* completes, assuming that the device descriptors did not change during
* reset and all previous interface state can be restored.
*
- * If something changes, or you cannot easily locate/verify the resetted
+ * If something changes, or you cannot easily locate/verify the reset
* device, return LIBUSB_ERROR_NOT_FOUND. This prompts the application
* to close the old handle and re-enumerate the device.
*
diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
index 5f5e71b..13d7218 100644
--- a/libusb/os/darwin_usb.c
+++ b/libusb/os/darwin_usb.c
@@ -381,7 +381,7 @@ static void darwin_devices_detached (void *ptr, io_iterator_t rem_devices) {
if (old_device->in_reenumerate) {
/* device is re-enumerating. do not dereference the device at this time. libusb_reset_device()
* will deref if needed. */
- usbi_dbg ("detected device detatched due to re-enumeration");
+ usbi_dbg ("detected device detached due to re-enumeration");
/* the device object is no longer usable so go ahead and release it */
if (old_device->device) {
@@ -2215,7 +2215,7 @@ static int darwin_alloc_streams (struct libusb_device_handle *dev_handle, uint32
uint8_t pipeRef;
int rc, i;
- /* find the mimimum number of supported streams on the endpoint list */
+ /* find the minimum number of supported streams on the endpoint list */
for (i = 0 ; i < num_endpoints ; ++i) {
if (0 != (rc = ep_to_pipeRef (dev_handle, endpoints[i], &pipeRef, NULL, &cInterface))) {
return rc;
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
index c2980d0..61b5b18 100644
--- a/libusb/os/linux_usbfs.c
+++ b/libusb/os/linux_usbfs.c
@@ -1846,7 +1846,7 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer)
* a time, but there is a big performance gain doing it this way.
*
* Newer versions lift the 16k limit (USBFS_CAP_NO_PACKET_SIZE_LIM),
- * using arbritary large transfers can still be a bad idea though, as
+ * using arbitrary large transfers can still be a bad idea though, as
* the kernel needs to allocate physical contiguous memory for this,
* which may fail for large buffers.
*
diff --git a/libusb/os/sunos_usb.c b/libusb/os/sunos_usb.c
index 73b96da..42a8254 100644
--- a/libusb/os/sunos_usb.c
+++ b/libusb/os/sunos_usb.c
@@ -620,7 +620,7 @@ sunos_add_devices(di_devlink_t link, void *arg)
if (sunos_fill_in_dev_info(dn, dev) != LIBUSB_SUCCESS) {
libusb_unref_device(dev);
- usbi_dbg("get infomation fail");
+ usbi_dbg("get information fail");
continue;
}
if (usbi_sanitize_device(dev) < 0) {
diff --git a/libusb/os/windows_common.c b/libusb/os/windows_common.c
index 2f79928..917d24d 100644
--- a/libusb/os/windows_common.c
+++ b/libusb/os/windows_common.c
@@ -125,7 +125,7 @@ static unsigned long htab_filled;
static bool htab_create(struct libusb_context *ctx)
{
if (htab_table != NULL) {
- usbi_err(ctx, "program assertion falied - hash table already allocated");
+ usbi_err(ctx, "program assertion failed - hash table already allocated");
return true;
}
@@ -459,7 +459,7 @@ static int windows_init(struct libusb_context *ctx)
}
// A successful wait gives this thread ownership of the mutex
- // => any concurent wait stalls until the mutex is released
+ // => any concurrent wait stalls until the mutex is released
if (WaitForSingleObject(mutex, INFINITE) != WAIT_OBJECT_0) {
usbi_err(ctx, "failure to access mutex: %s", windows_error_str(0));
CloseHandle(mutex);
@@ -553,7 +553,7 @@ static void windows_exit(struct libusb_context *ctx)
return;
// A successful wait gives this thread ownership of the mutex
- // => any concurent wait stalls until the mutex is released
+ // => any concurrent wait stalls until the mutex is released
if (WaitForSingleObject(mutex, INFINITE) != WAIT_OBJECT_0) {
usbi_err(ctx, "failed to access mutex: %s", windows_error_str(0));
CloseHandle(mutex);
diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c
index 39ba3e7..1b982ed 100644
--- a/libusb/os/windows_winusb.c
+++ b/libusb/os/windows_winusb.c
@@ -1243,7 +1243,7 @@ static void get_api_type(HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data,
// MULTI_SZ is a pain to work with. Turn it into something much more manageable
// NB: none of the driver names we check against contain LIST_SEPARATOR,
- // (currently ';'), so even if an unsuported one does, it's not an issue
+ // (currently ';'), so even if an unsupported one does, it's not an issue
for (l = 0; (lookup[k].list[l] != 0) || (lookup[k].list[l + 1] != 0); l++) {
if (lookup[k].list[l] == 0)
lookup[k].list[l] = LIST_SEPARATOR;
@@ -2932,7 +2932,7 @@ static int winusbx_submit_iso_transfer(int sub_api, struct usbi_transfer *itrans
}
// Important note: the WinUSB_Read/WriteIsochPipeAsap API requires a ContinueStream parameter that tells whether the isochronous
- // stream must be continued or if the WinUSB driver can schedule the transfer at its conveniance. Profiling subsequent transfers
+ // stream must be continued or if the WinUSB driver can schedule the transfer at its convenience. Profiling subsequent transfers
// with ContinueStream = FALSE showed that 5 frames, i.e. about 5 milliseconds, were left empty between each transfer. This
// is critical as this greatly diminish the achievable isochronous bandwidth. We solved the problem using the following strategy:
// - Transfers are first scheduled with ContinueStream = TRUE and with winusbx_iso_transfer_continue_stream_callback as user callback.
@@ -3645,7 +3645,7 @@ static int hid_open(int sub_api, struct libusb_device_handle *dev_handle)
CHECK_HID_AVAILABLE;
if (priv->hid == NULL) {
- usbi_err(HANDLE_CTX(dev_handle), "program assertion failed - private HID structure is unitialized");
+ usbi_err(HANDLE_CTX(dev_handle), "program assertion failed - private HID structure is uninitialized");
return LIBUSB_ERROR_NOT_FOUND;
}
diff --git a/libusb/sync.c b/libusb/sync.c
index 95be3d9..adc95b4 100644
--- a/libusb/sync.c
+++ b/libusb/sync.c
@@ -81,7 +81,7 @@ static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)
* (depending on direction bits within bmRequestType)
* \param wLength the length field for the setup packet. The data buffer should
* be at least this size.
- * \param timeout timeout (in millseconds) that this function should wait
+ * \param timeout timeout (in milliseconds) that this function should wait
* before giving up due to no response being received. For an unlimited
* timeout, use value 0.
* \returns on success, the number of bytes actually transferred
@@ -255,7 +255,7 @@ static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle,
* transferred. Since version 1.0.21 (\ref LIBUSB_API_VERSION >= 0x01000105),
* it is legal to pass a NULL pointer if you do not wish to receive this
* information.
- * \param timeout timeout (in millseconds) that this function should wait
+ * \param timeout timeout (in milliseconds) that this function should wait
* before giving up due to no response being received. For an unlimited
* timeout, use value 0.
*
@@ -310,7 +310,7 @@ int API_EXPORTED libusb_bulk_transfer(libusb_device_handle *dev_handle,
* transferred. Since version 1.0.21 (\ref LIBUSB_API_VERSION >= 0x01000105),
* it is legal to pass a NULL pointer if you do not wish to receive this
* information.
- * \param timeout timeout (in millseconds) that this function should wait
+ * \param timeout timeout (in milliseconds) that this function should wait
* before giving up due to no response being received. For an unlimited
* timeout, use value 0.
*
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 0ffc182..b9b5917 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11547
+#define LIBUSB_NANO 11548