Device-LabJack
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
linux-labjack/INSTALL view on Meta::CPAN
Finally, run the test application:
# ./firmware-revision or
# ./analog-outs or
# ./list-all
HID NOTE: If the hid module is loaded (use lsmod to view the modules and
look for "hid"), the provided labjack driver will not work correctly.
Since the Labjack is classified as a HID device, the hid driver will
claim the device. However, the hid driver does not support the "Interrupt"
out endpoint used by the Labjack and thus cannot communicate with the
Labjack. You must remove the hid driver prior to loading the labjack
driver. The following command, as root, should suffice:
# modprobe -r hid
If you absolutely must have the hid device driver loaded, it is possible
to add the Labjack to the HID blacklist. Add the Labjack USB vendor
(0x0cd5) and product (0x0001) IDs to the hid_blacklist structure in hid-core.c
in the drivers/usb directory. An example of the line to insert into the
hid_blacklist structure would be:
linux-labjack/driver/linux-2.4/labjack.c view on Meta::CPAN
int open_count; /* number of times this port has been opened */
char* read_buffer;
int read_buffer_length;
wait_queue_head_t read_wait;
wait_queue_head_t write_wait;
char* interrupt_in_buffer;
struct usb_endpoint_descriptor* interrupt_in_endpoint;
struct urb* interrupt_in_urb;
char* interrupt_out_buffer;
struct usb_endpoint_descriptor* interrupt_out_endpoint;
struct urb* interrupt_out_urb;
int read_timeout;
int write_timeout;
};
/* Note that no locking is needed:
* read_buffer is arbitrated by read_buffer_length == 0
* interrupt_out_buffer is arbitrated by interrupt_out_urb->status == -EINPROGRESS
* interrupt_in_buffer belongs to urb alone and is overwritten on overflow
linux-labjack/liblabjack/ljackul.c view on Meta::CPAN
// ReadLabJack
// CloseAll
//
// The LabJack U12 is an HID V1.1 device. Input and Output reports
// are both 8 bytes (although Windows throws on an extra byte
// at the beginning). Feature reports are used to transfer stream
// and burst data from the LabJack to the PC, and are 16*8 or 128
// bytes (plus the extra Windows byte at the beginning).
//
// The first time after enumeration that the LabJack is supposed to
// write 8 bytes to the interrupt IN endpoint, the write does not
// happen. Windows reads nothing. This initial non-response provides
// a good test of the thread timeout we use in our Windows HID
// read function. You will probably see this behavior on other
// operating systems.
//
//----------------------------------------------------------------------
//
// Changes
//
// (08/18/2005) Fixed problem in OpenLabJack when *idnum is 0. Updated
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.422 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )