Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <asm/uaccess.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/poll.h>
Go to the source code of this file.
Data Structures | |
struct | ld_usb |
Macros | |
#define | USB_VENDOR_ID_LD 0x0f11 /* USB Vendor ID of LD Didactic GmbH */ |
#define | USB_DEVICE_ID_LD_CASSY 0x1000 /* USB Product ID of CASSY-S modules with 8 bytes endpoint size */ |
#define | USB_DEVICE_ID_LD_CASSY2 0x1001 /* USB Product ID of CASSY-S modules with 64 bytes endpoint size */ |
#define | USB_DEVICE_ID_LD_POCKETCASSY 0x1010 /* USB Product ID of Pocket-CASSY */ |
#define | USB_DEVICE_ID_LD_POCKETCASSY2 0x1011 /* USB Product ID of Pocket-CASSY 2 (reserved) */ |
#define | USB_DEVICE_ID_LD_MOBILECASSY 0x1020 /* USB Product ID of Mobile-CASSY */ |
#define | USB_DEVICE_ID_LD_MOBILECASSY2 0x1021 /* USB Product ID of Mobile-CASSY 2 (reserved) */ |
#define | USB_DEVICE_ID_LD_MICROCASSYVOLTAGE 0x1031 /* USB Product ID of Micro-CASSY Voltage */ |
#define | USB_DEVICE_ID_LD_MICROCASSYCURRENT 0x1032 /* USB Product ID of Micro-CASSY Current */ |
#define | USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033 /* USB Product ID of Micro-CASSY Time (reserved) */ |
#define | USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035 /* USB Product ID of Micro-CASSY Temperature */ |
#define | USB_DEVICE_ID_LD_MICROCASSYPH 0x1038 /* USB Product ID of Micro-CASSY pH */ |
#define | USB_DEVICE_ID_LD_JWM 0x1080 /* USB Product ID of Joule and Wattmeter */ |
#define | USB_DEVICE_ID_LD_DMMP 0x1081 /* USB Product ID of Digital Multimeter P (reserved) */ |
#define | USB_DEVICE_ID_LD_UMIP 0x1090 /* USB Product ID of UMI P */ |
#define | USB_DEVICE_ID_LD_UMIC 0x10A0 /* USB Product ID of UMI C */ |
#define | USB_DEVICE_ID_LD_UMIB 0x10B0 /* USB Product ID of UMI B */ |
#define | USB_DEVICE_ID_LD_XRAY 0x1100 /* USB Product ID of X-Ray Apparatus 55481 */ |
#define | USB_DEVICE_ID_LD_XRAY2 0x1101 /* USB Product ID of X-Ray Apparatus 554800 */ |
#define | USB_DEVICE_ID_LD_XRAYCT 0x1110 /* USB Product ID of X-Ray Apparatus CT 554821*/ |
#define | USB_DEVICE_ID_LD_VIDEOCOM 0x1200 /* USB Product ID of VideoCom */ |
#define | USB_DEVICE_ID_LD_MOTOR 0x1210 /* USB Product ID of Motor (reserved) */ |
#define | USB_DEVICE_ID_LD_COM3LAB 0x2000 /* USB Product ID of COM3LAB */ |
#define | USB_DEVICE_ID_LD_TELEPORT 0x2010 /* USB Product ID of Terminal Adapter */ |
#define | USB_DEVICE_ID_LD_NETWORKANALYSER 0x2020 /* USB Product ID of Network Analyser */ |
#define | USB_DEVICE_ID_LD_POWERCONTROL 0x2030 /* USB Product ID of Converter Control Unit */ |
#define | USB_DEVICE_ID_LD_MACHINETEST 0x2040 /* USB Product ID of Machine Test System */ |
#define | USB_DEVICE_ID_LD_MOSTANALYSER 0x2050 /* USB Product ID of MOST Protocol Analyser */ |
#define | USB_DEVICE_ID_LD_MOSTANALYSER2 0x2051 /* USB Product ID of MOST Protocol Analyser 2 */ |
#define | USB_DEVICE_ID_LD_ABSESP 0x2060 /* USB Product ID of ABS ESP */ |
#define | USB_DEVICE_ID_LD_AUTODATABUS 0x2070 /* USB Product ID of Automotive Data Buses */ |
#define | USB_DEVICE_ID_LD_MCT 0x2080 /* USB Product ID of Microcontroller technique */ |
#define | USB_DEVICE_ID_LD_HYBRID 0x2090 /* USB Product ID of Automotive Hybrid */ |
#define | USB_DEVICE_ID_LD_HEATCONTROL 0x20A0 /* USB Product ID of Heat control */ |
#define | USB_VENDOR_ID_VERNIER 0x08f7 |
#define | USB_DEVICE_ID_VERNIER_GOTEMP 0x0002 |
#define | USB_DEVICE_ID_VERNIER_SKIP 0x0003 |
#define | USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004 |
#define | USB_DEVICE_ID_VERNIER_LCSPEC 0x0006 |
#define | USB_LD_MINOR_BASE 176 |
#define | dbg_info(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0) |
Functions | |
MODULE_DEVICE_TABLE (usb, ld_usb_table) | |
MODULE_VERSION ("V0.14") | |
MODULE_AUTHOR ("Michael Hund <mhund@ld-didactic.de>") | |
MODULE_DESCRIPTION ("LD USB Driver") | |
MODULE_LICENSE ("GPL") | |
MODULE_SUPPORTED_DEVICE ("LD USB Devices") | |
module_param (debug, int, S_IRUGO|S_IWUSR) | |
MODULE_PARM_DESC (debug,"Debug enabled or not") | |
module_param (ring_buffer_size, int, 0) | |
MODULE_PARM_DESC (ring_buffer_size,"Read ring buffer size in reports") | |
module_param (write_buffer_size, int, 0) | |
MODULE_PARM_DESC (write_buffer_size,"Write buffer size in reports") | |
module_param (min_interrupt_in_interval, int, 0) | |
MODULE_PARM_DESC (min_interrupt_in_interval,"Minimum interrupt in interval in ms") | |
module_param (min_interrupt_out_interval, int, 0) | |
MODULE_PARM_DESC (min_interrupt_out_interval,"Minimum interrupt out interval in ms") | |
module_usb_driver (ld_usb_driver) | |
#define USB_DEVICE_ID_LD_ABSESP 0x2060 /* USB Product ID of ABS ESP */ |
#define USB_DEVICE_ID_LD_AUTODATABUS 0x2070 /* USB Product ID of Automotive Data Buses */ |
#define USB_DEVICE_ID_LD_CASSY 0x1000 /* USB Product ID of CASSY-S modules with 8 bytes endpoint size */ |
#define USB_DEVICE_ID_LD_CASSY2 0x1001 /* USB Product ID of CASSY-S modules with 64 bytes endpoint size */ |
#define USB_DEVICE_ID_LD_COM3LAB 0x2000 /* USB Product ID of COM3LAB */ |
#define USB_DEVICE_ID_LD_DMMP 0x1081 /* USB Product ID of Digital Multimeter P (reserved) */ |
#define USB_DEVICE_ID_LD_HEATCONTROL 0x20A0 /* USB Product ID of Heat control */ |
#define USB_DEVICE_ID_LD_HYBRID 0x2090 /* USB Product ID of Automotive Hybrid */ |
#define USB_DEVICE_ID_LD_JWM 0x1080 /* USB Product ID of Joule and Wattmeter */ |
#define USB_DEVICE_ID_LD_MACHINETEST 0x2040 /* USB Product ID of Machine Test System */ |
#define USB_DEVICE_ID_LD_MCT 0x2080 /* USB Product ID of Microcontroller technique */ |
#define USB_DEVICE_ID_LD_MICROCASSYCURRENT 0x1032 /* USB Product ID of Micro-CASSY Current */ |
#define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038 /* USB Product ID of Micro-CASSY pH */ |
#define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035 /* USB Product ID of Micro-CASSY Temperature */ |
#define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033 /* USB Product ID of Micro-CASSY Time (reserved) */ |
#define USB_DEVICE_ID_LD_MICROCASSYVOLTAGE 0x1031 /* USB Product ID of Micro-CASSY Voltage */ |
#define USB_DEVICE_ID_LD_MOBILECASSY 0x1020 /* USB Product ID of Mobile-CASSY */ |
#define USB_DEVICE_ID_LD_MOBILECASSY2 0x1021 /* USB Product ID of Mobile-CASSY 2 (reserved) */ |
#define USB_DEVICE_ID_LD_MOSTANALYSER 0x2050 /* USB Product ID of MOST Protocol Analyser */ |
#define USB_DEVICE_ID_LD_MOSTANALYSER2 0x2051 /* USB Product ID of MOST Protocol Analyser 2 */ |
#define USB_DEVICE_ID_LD_MOTOR 0x1210 /* USB Product ID of Motor (reserved) */ |
#define USB_DEVICE_ID_LD_NETWORKANALYSER 0x2020 /* USB Product ID of Network Analyser */ |
#define USB_DEVICE_ID_LD_POCKETCASSY 0x1010 /* USB Product ID of Pocket-CASSY */ |
#define USB_DEVICE_ID_LD_POCKETCASSY2 0x1011 /* USB Product ID of Pocket-CASSY 2 (reserved) */ |
#define USB_DEVICE_ID_LD_POWERCONTROL 0x2030 /* USB Product ID of Converter Control Unit */ |
#define USB_DEVICE_ID_LD_TELEPORT 0x2010 /* USB Product ID of Terminal Adapter */ |
#define USB_DEVICE_ID_LD_UMIB 0x10B0 /* USB Product ID of UMI B */ |
#define USB_DEVICE_ID_LD_UMIC 0x10A0 /* USB Product ID of UMI C */ |
#define USB_DEVICE_ID_LD_UMIP 0x1090 /* USB Product ID of UMI P */ |
#define USB_DEVICE_ID_LD_VIDEOCOM 0x1200 /* USB Product ID of VideoCom */ |
#define USB_DEVICE_ID_LD_XRAY 0x1100 /* USB Product ID of X-Ray Apparatus 55481 */ |
#define USB_DEVICE_ID_LD_XRAY2 0x1101 /* USB Product ID of X-Ray Apparatus 554800 */ |
#define USB_DEVICE_ID_LD_XRAYCT 0x1110 /* USB Product ID of X-Ray Apparatus CT 554821*/ |
#define USB_VENDOR_ID_LD 0x0f11 /* USB Vendor ID of LD Didactic GmbH */ |
Generic USB driver for report based interrupt in/out devices like LD Didactic's USB devices. LD Didactic's USB devices are HID devices which do not use HID report definitons (they use raw interrupt in and our reports only for communication).
This driver uses a ring buffer for time critical reading of interrupt in reports and provides read and write methods for raw interrupt reports (similar to the Windows HID driver). Devices based on the book USB COMPLETE by Jan Axelson may need such a compatibility to the Windows HID driver.
Copyright (C) 2005 Michael Hund mhund @ld- didac tic. de
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Derived from Lego USB Tower driver Copyright (C) 2003 David Glance advid 2001-2004 Juergen Stuber gsf@ sourc efor ge.ne tstarb lue@ users .sou rcefo rge. net
MODULE_AUTHOR | ( | "Michael Hund <mhund@ld-didactic.de>" | ) |
MODULE_DESCRIPTION | ( | "LD USB Driver" | ) |
MODULE_DEVICE_TABLE | ( | usb | , |
ld_usb_table | |||
) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param | ( | ring_buffer_size | , |
int | , | ||
0 | |||
) |
module_param | ( | write_buffer_size | , |
int | , | ||
0 | |||
) |
module_param | ( | min_interrupt_in_interval | , |
int | , | ||
0 | |||
) |
module_param | ( | min_interrupt_out_interval | , |
int | , | ||
0 | |||
) |
MODULE_PARM_DESC | ( | ring_buffer_size | , |
"Read ring buffer size in reports" | |||
) |
MODULE_SUPPORTED_DEVICE | ( | "LD USB Devices" | ) |
module_usb_driver | ( | ld_usb_driver | ) |
MODULE_VERSION | ( | "V0.14" | ) |