mirror of
https://github.com/CTCaer/hidapi.git
synced 2024-11-26 19:50:32 +00:00
all: Fix a few typos
This commit is contained in:
parent
1f615efdbe
commit
a6a622ffb6
@ -316,7 +316,7 @@ static int get_usage(uint8_t *report_descriptor, size_t size,
|
||||
#if defined(__FreeBSD__) && __FreeBSD__ < 10
|
||||
/* The libusb version included in FreeBSD < 10 doesn't have this function. In
|
||||
mainline libusb, it's inlined in libusb.h. This function will bear a striking
|
||||
resemblence to that one, because there's about one way to code it.
|
||||
resemblance to that one, because there's about one way to code it.
|
||||
|
||||
Note that the data parameter is Unicode in UTF-16LE encoding.
|
||||
Return value is the number of bytes in data, or LIBUSB_ERROR_*.
|
||||
@ -849,7 +849,7 @@ static void *read_thread(void *param)
|
||||
/* Now that the read thread is stopping, Wake any threads which are
|
||||
waiting on data (in hid_read_timeout()). Do this under a mutex to
|
||||
make sure that a thread which is about to go to sleep waiting on
|
||||
the condition acutally will go to sleep before the condition is
|
||||
the condition actually will go to sleep before the condition is
|
||||
signaled. */
|
||||
pthread_mutex_lock(&dev->mutex);
|
||||
pthread_cond_broadcast(&dev->condition);
|
||||
@ -958,7 +958,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path)
|
||||
(ep->bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK)
|
||||
== LIBUSB_ENDPOINT_IN;
|
||||
|
||||
/* Decide whether to use it for intput or output. */
|
||||
/* Decide whether to use it for input or output. */
|
||||
if (dev->input_endpoint == 0 &&
|
||||
is_interrupt && is_input) {
|
||||
/* Use this endpoint for INPUT */
|
||||
@ -1014,7 +1014,7 @@ int HID_API_EXPORT hid_write(hid_device *dev, const unsigned char *data, size_t
|
||||
|
||||
|
||||
if (dev->output_endpoint <= 0) {
|
||||
/* No interrput out endpoint. Use the Control Endpoint */
|
||||
/* No interrupt out endpoint. Use the Control Endpoint */
|
||||
res = libusb_control_transfer(dev->device_handle,
|
||||
LIBUSB_REQUEST_TYPE_CLASS|LIBUSB_RECIPIENT_INTERFACE|LIBUSB_ENDPOINT_OUT,
|
||||
0x09/*HID Set_Report*/,
|
||||
|
@ -16,7 +16,7 @@ application and build using the build parameters in the Makefile.
|
||||
Libusb Implementation notes
|
||||
----------------------------
|
||||
For the libusb implementation, libusb-1.0 must be installed. Libusb 1.0 is
|
||||
different than the legacy libusb 0.1 which is installed on many systems. To
|
||||
different than the legacy libusb 0.1 which is installed on many systems. To
|
||||
install libusb-1.0 on Ubuntu and other Debian-based systems, run:
|
||||
sudo apt-get install libusb-1.0-0-dev
|
||||
|
||||
|
@ -601,7 +601,7 @@ static void hid_report_callback(void *context, IOReturn result, void *sender,
|
||||
|
||||
}
|
||||
|
||||
/* This gets called when the read_thred's run loop gets signaled by
|
||||
/* This gets called when the read_thread's run loop gets signaled by
|
||||
hid_close(), and serves to stop the read_thread's run loop. */
|
||||
static void perform_signal_callback(void *context)
|
||||
{
|
||||
@ -659,7 +659,7 @@ static void *read_thread(void *param)
|
||||
/* Now that the read thread is stopping, Wake any threads which are
|
||||
waiting on data (in hid_read_timeout()). Do this under a mutex to
|
||||
make sure that a thread which is about to go to sleep waiting on
|
||||
the condition acutally will go to sleep before the condition is
|
||||
the condition actually will go to sleep before the condition is
|
||||
signaled. */
|
||||
pthread_mutex_lock(&dev->mutex);
|
||||
pthread_cond_broadcast(&dev->condition);
|
||||
|
@ -155,7 +155,7 @@ static hid_device *new_hid_device()
|
||||
dev->read_pending = FALSE;
|
||||
dev->read_buf = NULL;
|
||||
memset(&dev->ol, 0, sizeof(dev->ol));
|
||||
dev->ol.hEvent = CreateEvent(NULL, FALSE, FALSE /*inital state f=nonsignaled*/, NULL);
|
||||
dev->ol.hEvent = CreateEvent(NULL, FALSE, FALSE /*initial state f=nonsignaled*/, NULL);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user