#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/fcntl.h>
#include <linux/compiler.h>
#include <linux/comedi/comedi_usb.h>
#define USBDUX_FIRMWARE …
#define USBDUX_FIRMWARE_MAX_LEN …
#define USBDUX_FIRMWARE_CMD …
#define VENDOR_DIR_IN …
#define VENDOR_DIR_OUT …
#define USBDUX_CPU_CS …
#define USBDUX_CMD_MULT_AI …
#define USBDUX_CMD_AO …
#define USBDUX_CMD_DIO_CFG …
#define USBDUX_CMD_DIO_BITS …
#define USBDUX_CMD_SINGLE_AI …
#define USBDUX_CMD_TIMER_RD …
#define USBDUX_CMD_TIMER_WR …
#define USBDUX_CMD_PWM_ON …
#define USBDUX_CMD_PWM_OFF …
#define BULK_TIMEOUT …
#define MIN_PWM_PERIOD …
#define PWM_DEFAULT_PERIOD …
#define SIZEADIN …
#define SIZEINBUF …
#define SIZEINSNBUF …
#define SIZEDAOUT …
#define SIZEOUTBUF …
#define SIZEOFDUXBUFFER …
#define NUMOFINBUFFERSFULL …
#define NUMOFOUTBUFFERSFULL …
#define NUMOFINBUFFERSHIGH …
#define NUMOFOUTBUFFERSHIGH …
#define RETRIES …
static const struct comedi_lrange range_usbdux_ai_range = …;
static const struct comedi_lrange range_usbdux_ao_range = …;
struct usbdux_private { … };
static void usbdux_unlink_urbs(struct urb **urbs, int num_urbs)
{ … }
static void usbdux_ai_stop(struct comedi_device *dev, int do_unlink)
{ … }
static int usbdux_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbduxsub_ai_handle_urb(struct comedi_device *dev,
struct comedi_subdevice *s,
struct urb *urb)
{ … }
static void usbduxsub_ai_isoc_irq(struct urb *urb)
{ … }
static void usbdux_ao_stop(struct comedi_device *dev, int do_unlink)
{ … }
static int usbdux_ao_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbduxsub_ao_handle_urb(struct comedi_device *dev,
struct comedi_subdevice *s,
struct urb *urb)
{ … }
static void usbduxsub_ao_isoc_irq(struct urb *urb)
{ … }
static int usbdux_submit_urbs(struct comedi_device *dev,
struct urb **urbs, int num_urbs,
int input_urb)
{ … }
static int usbdux_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{ … }
static u8 create_adc_command(unsigned int chan, unsigned int range)
{ … }
static int send_dux_commands(struct comedi_device *dev, unsigned int cmd_type)
{ … }
static int receive_dux_commands(struct comedi_device *dev, unsigned int command)
{ … }
static int usbdux_ai_inttrig(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int trig_num)
{ … }
static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int usbdux_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_ao_inttrig(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int trig_num)
{ … }
static int usbdux_ao_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{ … }
static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int usbdux_dio_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_counter_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_counter_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_counter_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{ … }
static void usbduxsub_unlink_pwm_urbs(struct comedi_device *dev)
{ … }
static void usbdux_pwm_stop(struct comedi_device *dev, int do_unlink)
{ … }
static int usbdux_pwm_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbduxsub_pwm_irq(struct urb *urb)
{ … }
static int usbduxsub_submit_pwm_urbs(struct comedi_device *dev)
{ … }
static int usbdux_pwm_period(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int period)
{ … }
static int usbdux_pwm_start(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbdux_pwm_pattern(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int chan,
unsigned int value,
unsigned int sign)
{ … }
static int usbdux_pwm_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_pwm_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbdux_firmware_upload(struct comedi_device *dev,
const u8 *data, size_t size,
unsigned long context)
{ … }
static int usbdux_alloc_usb_buffers(struct comedi_device *dev)
{ … }
static void usbdux_free_usb_buffers(struct comedi_device *dev)
{ … }
static int usbdux_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{ … }
static void usbdux_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver usbdux_driver = …;
static int usbdux_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static const struct usb_device_id usbdux_usb_table[] = …;
MODULE_DEVICE_TABLE(usb, usbdux_usb_table);
static struct usb_driver usbdux_usb_driver = …;
module_comedi_usb_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);