#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/unaligned.h>
#include <linux/comedi/comedi_usb.h>
#define BULK_TIMEOUT …
#define FIRMWARE …
#define FIRMWARE_MAX_LEN …
#define USBDUXSUB_FIRMWARE …
#define VENDOR_DIR_IN …
#define VENDOR_DIR_OUT …
#define USBDUXSUB_CPUCS …
#define MIN_PWM_PERIOD …
#define PWM_DEFAULT_PERIOD …
#define NUMCHANNELS …
#define SIZEADIN …
#define SIZEINBUF …
#define SIZEINSNBUF …
#define NUMOUTCHANNELS …
#define SIZEDAOUT …
#define SIZEOUTBUF …
#define SIZEOFDUXBUFFER …
#define NUMOFINBUFFERSFULL …
#define NUMOFOUTBUFFERSFULL …
#define NUMOFINBUFFERSHIGH …
#define NUMOFOUTBUFFERSHIGH …
#define RETRIES …
#define USBBUXSIGMA_AD_CMD …
#define USBDUXSIGMA_DA_CMD …
#define USBDUXSIGMA_DIO_CFG_CMD …
#define USBDUXSIGMA_DIO_BITS_CMD …
#define USBDUXSIGMA_SINGLE_AD_CMD …
#define USBDUXSIGMA_PWM_ON_CMD …
#define USBDUXSIGMA_PWM_OFF_CMD …
static const struct comedi_lrange usbduxsigma_ai_range = …;
struct usbduxsigma_private { … };
static void usbduxsigma_unlink_urbs(struct urb **urbs, int num_urbs)
{ … }
static void usbduxsigma_ai_stop(struct comedi_device *dev, int do_unlink)
{ … }
static int usbduxsigma_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbduxsigma_ai_handle_urb(struct comedi_device *dev,
struct comedi_subdevice *s,
struct urb *urb)
{ … }
static void usbduxsigma_ai_urb_complete(struct urb *urb)
{ … }
static void usbduxsigma_ao_stop(struct comedi_device *dev, int do_unlink)
{ … }
static int usbduxsigma_ao_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbduxsigma_ao_handle_urb(struct comedi_device *dev,
struct comedi_subdevice *s,
struct urb *urb)
{ … }
static void usbduxsigma_ao_urb_complete(struct urb *urb)
{ … }
static int usbduxsigma_submit_urbs(struct comedi_device *dev,
struct urb **urbs, int num_urbs,
int input_urb)
{ … }
static int usbduxsigma_chans_to_interval(int num_chan)
{ … }
static int usbduxsigma_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static void create_adc_command(unsigned int chan,
u8 *muxsg0, u8 *muxsg1)
{ … }
static int usbbuxsigma_send_cmd(struct comedi_device *dev, int cmd_type)
{ … }
static int usbduxsigma_receive_cmd(struct comedi_device *dev, int command)
{ … }
static int usbduxsigma_ai_inttrig(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int trig_num)
{ … }
static int usbduxsigma_ai_cmd(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int usbduxsigma_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbduxsigma_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbduxsigma_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbduxsigma_ao_inttrig(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int trig_num)
{ … }
static int usbduxsigma_ao_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int usbduxsigma_ao_cmd(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int usbduxsigma_dio_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbduxsigma_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static void usbduxsigma_pwm_stop(struct comedi_device *dev, int do_unlink)
{ … }
static int usbduxsigma_pwm_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbduxsigma_pwm_urb_complete(struct urb *urb)
{ … }
static int usbduxsigma_submit_pwm_urb(struct comedi_device *dev)
{ … }
static int usbduxsigma_pwm_period(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int period)
{ … }
static int usbduxsigma_pwm_start(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void usbduxsigma_pwm_pattern(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int chan,
unsigned int value,
unsigned int sign)
{ … }
static int usbduxsigma_pwm_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbduxsigma_pwm_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int usbduxsigma_getstatusinfo(struct comedi_device *dev, int chan)
{ … }
static int usbduxsigma_firmware_upload(struct comedi_device *dev,
const u8 *data, size_t size,
unsigned long context)
{ … }
static int usbduxsigma_alloc_usb_buffers(struct comedi_device *dev)
{ … }
static void usbduxsigma_free_usb_buffers(struct comedi_device *dev)
{ … }
static int usbduxsigma_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{ … }
static void usbduxsigma_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver usbduxsigma_driver = …;
static int usbduxsigma_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static const struct usb_device_id usbduxsigma_usb_table[] = …;
MODULE_DEVICE_TABLE(usb, usbduxsigma_usb_table);
static struct usb_driver usbduxsigma_usb_driver = …;
module_comedi_usb_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);