vmod/vmodttl: fixed bug related to luns not ordered and/or not starting from zero.
[ht-drivers.git] / vmod / driver / vmod12e16drvr.h
blobd85f66eb51b5d3117bbbe6ee429addaf30121ec1
1 /**
2 * @file vmod12e16drvr.h
4 * @brief VMOD12E16 driver interface
6 * The VMOD12E16 mezzanine is a 12-bit resolution, 16 channel ADC for
7 * which this driver provides support if installed in a modulbus carrier
8 * board. So this file provides definitions for easy access to hardware
9 * register on both VMODIO/MOD-PCI carrier and VMOD12E16
11 * Copyright (c) 2009,2010 CERN
12 * @author Juan David Gonzalez Cobas <dcobas@cern.ch>
14 * @section license_sec License
15 * Released under the GPL v2. (and only v2, not any later version)
18 #ifndef _VMOD12E16DRVR_H_
19 #define _VMOD12E16DRVR_H_
21 #include <linux/types.h>
22 #include <linux/ioctl.h>
24 /**
25 * @brief user argument for ioctl VMOD12E16_IOCCONVERT
26 * defining channel, amplification factor, and the data to get in return
28 struct vmod12e16_conversion {
29 int amplification; /**< amplification factor (0..3 for 1, 10, 100 or 1000 amplification) */
30 int channel; /**< analog channel to convert from (0..15) */
31 int data; /**< digital value after conversion */
32 };
34 /* IOCTLS for this driver */
35 #define VMOD12E16_IOCMAGIC 'm'
36 #define VMOD12E16_IOCSELECT _IOW (VMOD12E16_IOCMAGIC, 1, struct vmod12e16_state)
37 #define VMOD12E16_IOCCONVERT _IOWR(VMOD12E16_IOCMAGIC, 2, struct vmod12e16_conversion)
39 #endif /* _VMOD12E16DRVR_H_ */