#define COMEDI_CMD _IOR(CIO, 9, struct comedi_cmd)
#define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd)
#define COMEDI_INSNLIST _IOR(CIO, 11, comedi_insnlist)
-#define COMEDI_INSN _IOR(CIO, 12, comedi_insn)
+#define COMEDI_INSN _IOR(CIO, 12, struct comedi_insn)
#define COMEDI_BUFCONFIG _IOR(CIO, 13, comedi_bufconfig)
#define COMEDI_BUFINFO _IOWR(CIO, 14, comedi_bufinfo)
#define COMEDI_POLL _IO(CIO, 15)
/* structures */
-typedef struct comedi_insn_struct comedi_insn;
typedef struct comedi_insnlist_struct comedi_insnlist;
typedef struct comedi_chaninfo_struct comedi_chaninfo;
typedef struct comedi_subdinfo_struct comedi_subdinfo;
unsigned int unused[3];
};
-struct comedi_insn_struct {
+struct comedi_insn {
unsigned int insn;
unsigned int n;
unsigned int *data;
struct comedi_insnlist_struct {
unsigned int n_insns;
- comedi_insn *insns;
+ struct comedi_insn *insns;
};
struct comedi_cmd {
struct comedi32_insnlist_struct {
unsigned int n_insns;
- compat_uptr_t insns; /* 32-bit 'comedi_insn *' */
+ compat_uptr_t insns; /* 32-bit 'struct comedi_insn *' */
};
/* Handle translated ioctl. */
}
/* Copy 32-bit insn structure to native insn structure. */
-static int get_compat_insn(comedi_insn __user *insn,
+static int get_compat_insn(struct comedi_insn __user *insn,
struct comedi32_insn_struct __user *insn32)
{
int err;
{
struct combined_insnlist {
comedi_insnlist insnlist;
- comedi_insn insn[1];
+ struct comedi_insn insn[1];
} __user *s;
struct comedi32_insnlist_struct __user *insnlist32;
struct comedi32_insn_struct __user *insn32;
/* Handle 32-bit COMEDI_INSN ioctl. */
static int compat_insn(struct file *file, unsigned long arg)
{
- comedi_insn __user *insn;
+ struct comedi_insn __user *insn;
struct comedi32_insn_struct __user *insn32;
int rc;
return 0;
}
-static int parse_insn(struct comedi_device *dev, comedi_insn *insn, unsigned int *data,
+static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data,
void *file);
/*
* COMEDI_INSNLIST
static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_insnlist insnlist;
- comedi_insn *insns = NULL;
+ struct comedi_insn *insns = NULL;
unsigned int *data = NULL;
int i = 0;
int ret = 0;
goto error;
}
- insns = kmalloc(sizeof(comedi_insn) * insnlist.n_insns, GFP_KERNEL);
+ insns = kmalloc(sizeof(struct comedi_insn) * insnlist.n_insns, GFP_KERNEL);
if (!insns) {
DPRINTK("kmalloc failed\n");
ret = -ENOMEM;
}
if (copy_from_user(insns, insnlist.insns,
- sizeof(comedi_insn) * insnlist.n_insns)) {
+ sizeof(struct comedi_insn) * insnlist.n_insns)) {
DPRINTK("copy_from_user failed\n");
ret = -EFAULT;
goto error;
return i;
}
-static int check_insn_config_length(comedi_insn *insn, unsigned int *data)
+static int check_insn_config_length(struct comedi_insn *insn, unsigned int *data)
{
if (insn->n < 1)
return -EINVAL;
return -EINVAL;
}
-static int parse_insn(struct comedi_device *dev, comedi_insn *insn, unsigned int *data,
+static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data,
void *file)
{
struct comedi_subdevice *s;
* pointer to insn
*
* reads:
- * comedi_insn struct at arg
+ * struct comedi_insn struct at arg
* data (for writes)
*
* writes:
*/
static int do_insn_ioctl(struct comedi_device *dev, void *arg, void *file)
{
- comedi_insn insn;
+ struct comedi_insn insn;
unsigned int *data = NULL;
int ret = 0;
goto error;
}
- if (copy_from_user(&insn, arg, sizeof(comedi_insn))) {
+ if (copy_from_user(&insn, arg, sizeof(struct comedi_insn))) {
ret = -EFAULT;
goto error;
}
unsigned int *chanlist; /* driver-owned chanlist (not used) */
- int (*insn_read) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+ int (*insn_read) (struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
- int (*insn_write) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+ int (*insn_write) (struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
- int (*insn_bits) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+ int (*insn_bits) (struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
- int (*insn_config) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+ int (*insn_config) (struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
int (*do_cmd) (struct comedi_device *, struct comedi_subdevice *);
unsigned bits);
unsigned comedi_get_subdevice_runflags(struct comedi_subdevice *s);
int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/* range stuff */
int chan);
int comedi_get_n_ranges(void *dev, unsigned int subdevice, unsigned int
chan);
-int comedi_do_insn(void *dev, comedi_insn *insn);
+int comedi_do_insn(void *dev, struct comedi_insn *insn);
int comedi_poll(void *dev, unsigned int subdev);
/* DEPRECATED functions */
int chan);
int comedi_get_n_ranges(unsigned int minor, unsigned int subdevice, unsigned int
chan);
-int comedi_do_insn(unsigned int minor, comedi_insn *insn);
+int comedi_do_insn(unsigned int minor, struct comedi_insn *insn);
int comedi_poll(unsigned int minor, unsigned int subdev);
/* DEPRECATED functions */
static int postconfig(struct comedi_device *dev);
static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static void *comedi_recognize(struct comedi_driver * driv, const char *name);
static void comedi_report_boards(struct comedi_driver *driv);
static int poll_invalid(struct comedi_device *dev, struct comedi_subdevice *s);
}
int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
return -EINVAL;
}
static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
- comedi_insn new_insn;
+ struct comedi_insn new_insn;
int ret;
static const unsigned channels_per_bitfield = 32;
}
static int subdev_8255_insn(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
s->state &= ~data[0];
}
static int subdev_8255_insn_config(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
unsigned int bits;
COMEDI_INITCLEANUP(driver_acl7225b);
static int acl7225b_do_insn(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int acl7225b_di_insn(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
| BYTE_ b_OutputLevel, |
| BYTE_ b_HardwareGateLevel)
INT i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data)
+ struct comedi_insn *insn,unsigned int *data)
|
+----------------------------------------------------------------------------+
| Task : Configure the Timer (b_TimerNbr) operating mode |
*/
INT i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
| BYTE_ b_TimerNbr, |
| BYTE_ b_InterruptEnable)
INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data) |
+ struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable OR Disable the Timer (b_TimerNbr) from selected module |
| (b_ModulNbr). You must calling the |
INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_DummyRead;
| BYTE_ b_ModulNbr, |
| PULONG_ pul_TimerValueArray)
INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data) |
+ struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the all timer values from selected timer |
| module (b_ModulNbr). |
*/
INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr, b_ReadType;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
-struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read write functions for Timer |
+----------------------------------------------------------------------------+
*/
INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
BYTE b_BitsType;
INT i_ReturnValue = 0;
* 82X54 TIMER INISIALISATION FUNCTION
*/
INT i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
* 82X54 READ FUNCTION
*/
INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
* 82X54 READ & WRITE FUNCTION
*/
INT i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
ULONG ul_TimerValue = 0;
| BYTE_ b_CycleMode, |
| BYTE_ b_InterruptEnable)
INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
-struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable the chronometer from selected module |
| (b_ModulNbr). You must calling the |
*/
INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr, b_CycleMode, b_InterruptEnable, b_Action;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnReadChrono(struct comedi_device *dev,struct comedi_subdevice *s,
-comedi_insn *insn,unsigned int *data) |
+struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read functions for Timer |
+----------------------------------------------------------------------------+
*/
INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
BYTE b_ReadType;
INT i_ReturnValue = insn->n;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data) |
+ struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Sets the output witch has been passed with the |
| parameter b_Channel. Setting an output means setting an|
*/
INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr, b_OutputChannel, b_InputChannel, b_IOType;
* CHRONOMETER INISIALISATION FUNCTION
*/
INT i_APCI1710_InsnConfigInitChrono(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/*
* CHRONOMETER READ FUNCTION
*/
INT i_APCI1710_InsnReadChrono(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_ChronoStatus);
* CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION
*/
INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, |
-| struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+| struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)|
+----------------------------------------------------------------------------+
| Task : Configure the digital I/O operating mode from selected |
| module (b_ModulNbr). You must calling this function be|
*/
INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
BYTE b_ModulNbr, b_ChannelAMode, b_ChannelBMode;
BYTE b_MemoryOnOff, b_ConfigType;
+----------------------------------------------------------------------------+
|INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device *dev,comedi_subdevice
-*s, comedi_insn *insn,unsigned int *data)
+*s, struct comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
| Task : Read the status from selected digital I/O digital input|
//
// PBYTE_ pb_ChannelStatus)
INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device
-|*dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+|*dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
| Task : Sets or resets the output witch has been passed with the |
// BYTE_ b_ModulNbr,
// BYTE_ b_OutputChannel)
INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_WriteValue = 0;
+----------------------------------------------------------------------------+
|INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device *dev,comedi_subdevice
- *s, comedi_insn *insn,unsigned int *data)
+ *s, struct comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
| Task : write:
Sets or resets one or several outputs from port. |
// BYTE_ b_ModulNbr,
// BYTE_ b_PortValue)
INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_WriteValue = 0;
* DIGITAL I/O INISIALISATION FUNCTION
*/
INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
* INPUT OUTPUT FUNCTIONS
*/
INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
+----------------------------------------------------------------------------+
| INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
-comedi_insn *insn,unsigned int *data)
+struct comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
| Task : Configuration function for INC_CPT |
*/
INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_ConfigType;
INT i_ReturnValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
-comedi_insn *insn,unsigned int *data) |
+struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Set & Clear Functions for INC_CPT |
+----------------------------------------------------------------------------+
*/
INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_BitsType;
INT i_ReturnValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
-comedi_insn *insn,unsigned int *data) |
+struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable Disable functions for INC_CPT |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_WriteType;
INT i_ReturnValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,struct comedi_subdevice *s,
-comedi_insn *insn,unsigned int *data) |
+struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read and Get functions for INC_CPT |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_ReadType;
INT i_ReturnValue = 0;
/************ Main Functions *************/
INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int * data);
+ struct comedi_insn *insn, unsigned int * data);
INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn *insn, unsigned int * data);
+ struct comedi_insn *insn, unsigned int * data);
INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn *insn, unsigned int * data);
+ struct comedi_insn *insn, unsigned int * data);
INT i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn *insn, unsigned int * data);
+ struct comedi_insn *insn, unsigned int * data);
/*********** Supplementary Functions********/
*/
INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_IntRegister;
*/
INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr;
PBYTE_ pb_Status)
*/
INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusRegister;
}
INT i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->s_InterruptParameters.
INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/*
*/
INT i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/*
*/
INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev,
-struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Pwm Init and Get Pwm Initialisation |
+----------------------------------------------------------------------------+
*/
INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
BYTE b_ConfigType;
INT i_ReturnValue = 0;
/*
+----------------------------------------------------------------------------+
| Function Name :INT i_APCI1710_InsnWritePWM(struct comedi_device *dev,
-struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Pwm Enable Disable and Set New Timing |
+----------------------------------------------------------------------------+
*/
INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
BYTE b_WriteType;
INT i_ReturnValue = 0;
*/
INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
}
INT i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->s_InterruptParameters.
s_FIFOInterruptParameters[devpriv->
#define APCI1710_PWM_NEWTIMING 2
INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InitPWM(struct comedi_device *dev,
BYTE b_ModulNbr,
PBYTE pb_InterruptEnable, PBYTE pb_Enable);
INT i_APCI1710_InsnWritePWM(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_EnablePWM(struct comedi_device *dev,
BYTE b_ModulNbr,
INT i_APCI1710_DisablePWM(struct comedi_device *dev, BYTE b_ModulNbr, BYTE b_PWM);
INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
*/
INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
UINT ui_TimerValue;
| PULONG_ pul_Position, |
| PULONG_ pul_TurnCpt)
INT i_APCI1710_ReadSSIValue(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data) |
+ struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :
*/
INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_Cpt;
*/
INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg;
* SSI INISIALISATION FUNCTION
*/
INT i_APCI1710_InsnConfigInitSSI(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
*/
INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
ULONG ul_TimerValue = 0;
*/
INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
*/
INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
*/
INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
*/
INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/*
* TOR_COUNTER READ FUNCTION
*/
INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
*/
INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
BYTE b_ModulNbr;
*/
INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device
-*dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+*dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read the status from all digital input ports |
| (port A, port B and port C) from selected TTL |
*/
INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg;
| BYTE_ b_ModulNbr, |
| BYTE_ b_OutputChannel)
INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data) |
+ struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Sets or resets the output witch has been passed with the |
| parameter b_Channel. Setting an output means setting |
*/
INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg = 0;
* TTL INISIALISATION FUNCTION
*/
INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
* TTL INPUT FUNCTION
*/
INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
* TTL OUTPUT FUNCTIONS
*/
INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
+----------------------------------------------------------------------------+
| Function name : |
|INT i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data)
+ struct comedi_insn *insn,unsigned int *data)
| |
+----------------------------------------------------------------------------+
| Task : Read 256 words from EEPROM |
| |
+----------------------------------------------------------------------------+
| Input Parameters :(struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data) |
+ struct comedi_insn *insn,unsigned int *data) |
| |
| |
+----------------------------------------------------------------------------+
*/
static int i_ADDIDATA_InsnReadEeprom(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
WORD w_Data;
WORD w_Address;
/* ANALOG INPUT */
int (*i_hwdrv_InsnConfigAnalogInput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnReadAnalogInput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteAnalogInput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsAnalogInput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_CommandTestAnalogInput)(struct comedi_device *dev,
struct comedi_subdevice *s,
/* Analog Output */
int (*i_hwdrv_InsnConfigAnalogOutput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteAnalogOutput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsAnalogOutput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/* Digital Input */
int (*i_hwdrv_InsnConfigDigitalInput) (struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnReadDigitalInput) (struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteDigitalInput) (struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsDigitalInput) (struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/* Digital Output */
int (*i_hwdrv_InsnConfigDigitalOutput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnWriteDigitalOutput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnBitsDigitalOutput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnReadDigitalOutput)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
/* TIMER */
int (*i_hwdrv_InsnConfigTimer)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int (*i_hwdrv_InsnWriteTimer)(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdrv_InsnReadTimer)(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int (*i_hwdrv_InsnBitsTimer)(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/* TTL IO */
int (*i_hwdr_ConfigInitTTLIO)(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdr_ReadTTLIOBits)(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int (*i_hwdr_ReadTTLIOAllPortValue)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int (*i_hwdr_WriteTTLIOChlOnOff)(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
} boardtype;
//MODULE INFO STRUCTURE
static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG);
static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ConfigTimerWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Status = 0;
UINT ui_Command = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_StartStopWriteTimerWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , or Watchdog |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Command = 0;
INT i_Count = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ReadTimerWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Status = 0; // Status register
i_WatchdogNbr = insn->unused[0];
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI035_ConfigAnalogInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Input Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
-| comedi_insn *insn : Insn Structure Pointer |
+| struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| data[0] : Warning delay value
+----------------------------------------------------------------------------+
*/
INT i_APCI035_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
devpriv->tsk_Current = current;
outl(0x200 | 0, devpriv->iobase + 128 + 0x4);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ReadAnalogInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI035_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_CommandRegister = 0;
/******************/
/* TIMER */
/* timer value is passed as u seconds */
INT i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI035_ReadTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/* Temperature Related Defines (Analog Input Subdevice) */
INT i_APCI035_ConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI035_ReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/* Interrupt */
static void v_APCI035_Interrupt(int irq, void *d);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_ConfigDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures the digital input Subdevice |
+----------------------------------------------------------------------------+
*/
INT i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_Read1DigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1032_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
UINT ui_Channel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_ReadMoreDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
*/
INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
UINT ui_Mask = 0;
// for di read
INT i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1032_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigDigitalInputEvent |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : An event can be generated for each port. |
| The first event is related to the first 8 channels |
*/
INT i_APCI1500_ConfigDigitalInputEvent(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i_PatternPolarity = 0, i_PatternTransition = 0, i_PatternMask = 0;
int i_MaxChannel = 0, i_Count = 0, i_EventMask = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_StartStopInputEvent |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Allows or disallows a port event |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i_Event1InterruptStatus = 0, i_Event2InterruptStatus =
0, i_RegValue;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_Initialisation |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1500_Initialisation(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i_DummyRead = 0;
/******************/
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadMoreDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
*/
INT i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[1];
UINT ui_Mask = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigDigitalOutputErrorInterrupt
- (struct comedi_device *dev,struct comedi_subdevice *s comedi_insn
+ (struct comedi_device *dev,struct comedi_subdevice *s struct comedi_insn
*insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| data[0] :1:Memory on |
| 0:Memory off |
data[1] :1 Enable the voltage error interrupt
+----------------------------------------------------------------------------+
*/
int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
return insn->n;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_WriteDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
*/
INT i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
static UINT ui_Temp = 0;
UINT ui_Temp1;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device
- *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+ *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)|
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status data[0] : 2 APCI1500_1_8_KHZ
| 1 APCI1500_3_6_KHZ |
| 0 APCI1500_115_KHZ
*/
int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i_TimerCounterMode, i_MasterConfiguration;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_StartStopTriggerTimerCounterWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data); |
+ struct comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop or trigger the timer counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
data[0] : 0 Counter1/Timer1
1 Counter2/Timer2
+----------------------------------------------------------------------------+
*/
int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i_CommandAndStatusValue;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadCounterTimerWatchdog |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
data[0] : 0 Counter1/Timer1
1 Counter2/Timer2
*/
int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i_CommandAndStatusValue;
switch (data[0]) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadInterruptMask |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read the interrupt mask |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
*/
int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = i_InterruptMask;
data[1] = i_InputChannel;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigureInterrupt |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Configures the interrupt registers |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer |
+----------------------------------------------------------------------------+
*/
int i_APCI1500_ConfigureInterrupt(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Status;
int i_RegValue;
/*----------DIGITAL INPUT----------------*/
static int i_APCI1500_Initialisation(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int i_APCI1500_ConfigDigitalInputEvent(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_StartStopInputEvent(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int i_APCI1500_ReadMoreDigitalInput(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*---------- DIGITAL OUTPUT------------*/
static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_WriteDigitalOutput(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*----------TIMER----------------*/
static int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
static int i_APCI1500_ReadInterruptMask(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*----------INTERRUPT HANDLER------*/
static void v_APCI1500_Interrupt(int irq, void *d);
static int i_APCI1500_ConfigureInterrupt(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*----------RESET---------------*/
static int i_APCI1500_Reset(struct comedi_device *dev);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_Read1DigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
*/
INT i_APCI1516_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
UINT ui_Channel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadMoreDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ConfigDigitalOutput (struct comedi_device *dev,
- struct comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| data[0] :1:Memory on |
| 0:Memory off |
| |
+----------------------------------------------------------------------------+
*/
int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
return insn->n;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_WriteDigitalOutput |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
INT i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadDigitalOutput |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
INT i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ConfigWatchdog(struct comedi_device *dev,
- struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
//Disable the watchdog
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_StartStopWriteWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data); |
+ struct comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
case 0: //stop the watchdog
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadWatchdog |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI1516_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = inw(devpriv->i_IobaseAddon + APCI1516_WATCHDOG_STATUS) & 0x1;
return insn->n;
//Digital Input
INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1516_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//Digital Output
int i_APCI1516_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1516_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1516_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
int i_APCI1516_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI1516_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI1516_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//reset
INT i_APCI1516_Reset(struct comedi_device *dev);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures the digital input Subdevice |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
devpriv->tsk_Current = current;
/*******************************/
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_Read1DigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
UINT ui_Channel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadMoreDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
UINT ui_Mask = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_WriteDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
UINT ui_NoOfChannel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
UINT ui_NoOfChannel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigTimerCounterWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
devpriv->tsk_Current = current;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_StartStopWriteTimerCounterWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadTimerCounterWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadInterruptStatus |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :Reads the interrupt status register |
+----------------------------------------------------------------------------+
*/
int i_APCI1564_ReadInterruptStatus(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
*data = ui_Type;
return insn->n;
//DI
// for di read
INT i_APCI1564_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1564_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//DO
int i_APCI1564_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1564_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI1564_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI1564_ReadInterruptStatus(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// INTERRUPT
static VOID v_APCI1564_Interrupt(int irq, void *d);
| Function Name : INT i_APCI16XX_InsnConfigInitTTLIO |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task APCI16XX_TTL_INIT (using defaults) : |
*/
int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
| Function Name : INT i_APCI16XX_InsnBitsReadTTLIO |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read the status from selected TTL digital input |
*/
int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
| Function Name : INT i_APCI16XX_InsnReadTTLIOAllPortValue |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read the status from all digital input ports |
*/
int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
BYTE b_Command = (BYTE) CR_AREF(insn->chanspec);
INT i_ReturnValue = insn->n;
| Function Name : INT i_APCI16XX_InsnBitsWriteTTLIO |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Set the state from selected TTL digital output |
*/
int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
*/
int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
/*
*/
int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
+----------------------------------------------------------------------------+
*/
int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
int i_APCI16XX_Reset(struct comedi_device *dev);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ConfigDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if ((data[0] != 0) && (data[0] != 1)) {
comedi_error(dev,
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_WriteDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_NoOfChannel;
UINT ui_Temp, ui_Temp1;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_BitsDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
UINT ui_NoOfChannel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ConfigWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure |
-| comedi_insn *insn :pointer to insn structure |
+| struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
*/
int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_StartStopWriteWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure |
-| comedi_insn *insn :pointer to insn structure |
+| struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
*/
int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ReadWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure |
-| comedi_insn *insn :pointer to insn structure |
+| struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI2016_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
udelay(5);
data[0] = inw(devpriv->i_IobaseAddon + APCI2016_WATCHDOG_STATUS) & 0x1;
//DO
int i_APCI2016_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2016_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2016_BitsDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
int i_APCI2016_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2016_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2016_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ConfigDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command = 0;
devpriv->tsk_Current = current;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_WriteDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
*/
INT i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
*/
INT i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
UINT ui_NoOfChannel;
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI2032_ConfigWatchdog(comedi_device
- *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+ *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)|
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
*/
INT i_APCI2032_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
//Disable the watchdog
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_StartStopWriteWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data); |
+ struct comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
case 0: //stop the watchdog
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadWatchdog |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI2032_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] =
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadInterruptStatus |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :Reads the interrupt status register |
+----------------------------------------------------------------------------+
*/
int i_APCI2032_ReadInterruptStatus(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
*data = ui_Type;
return insn->n;
//DO
int i_APCI2032_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI2032_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI2032_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2032_ReadInterruptStatus(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
INT i_APCI2032_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2032_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2032_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_Read1DigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
*/
INT i_APCI2200_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
UINT ui_Channel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadMoreDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ConfigDigitalOutput (struct comedi_device *dev,
- struct comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| data[0] :1:Memory on |
| 0:Memory off |
| |
+----------------------------------------------------------------------------+
*/
int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
return insn->n;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_WriteDigitalOutput |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
INT i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadDigitalOutput |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
INT i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ConfigWatchdog(struct comedi_device *dev,
- struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
//Disable the watchdog
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_StartStopWriteWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s,
- comedi_insn *insn,unsigned int *data); |
+ struct comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
case 0: //stop the watchdog
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadWatchdog |
-| (struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s, :pointer to subdevice structure
- comedi_insn *insn :pointer to insn structure |
+ struct comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
int i_APCI2200_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] =
inw(devpriv->iobase + APCI2200_WATCHDOG +
//Digital Input
INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI2200_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//Digital Output
int i_APCI2200_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI2200_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI2200_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// TIMER
int i_APCI2200_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2200_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI2200_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//reset
INT i_APCI2200_Reset(struct comedi_device *dev);
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev,|
-| struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Calls card specific function |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
| Return Value : |
*/
int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT i;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, |
-| struct comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
+| struct comedi_subdevice *s,struct comedi_insn *insn, unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : card specific function |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
| Return Value : |
*/
int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
USHORT us_ConvertTiming, us_TmpValue, i;
BYTE b_Tmp;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, |
-| struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task :Configure Timer 2 |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
| |
| data[0]= TIMER configure as timer |
*/
int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Timervalue2;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, |
-| struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : To start and stop the timer |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
| |
| data[0] = 1 (start) |
*/
int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Timervalue2 = 0;
/*
+----------------------------------------------------------------------------+
| Function name : int i_APCI3120_InsnReadTimer(struct comedi_device *dev, |
-| struct comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
+| struct comedi_subdevice *s,struct comedi_insn *insn, unsigned int *data) |
| |
| |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
| |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
BYTE b_Tmp;
USHORT us_TmpValue, us_TmpValue_2, us_StatusValue;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, |
-| struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data) |
| |
| |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
| Return Value : |
int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data)
{
UINT ui_Chan, ui_TmpValue;
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, |
-|struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+|struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Reads the value of the Digital input Port i.e.4channels|
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
| Return Value : |
+----------------------------------------------------------------------------+
*/
int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue;
ui_TmpValue = (UINT) inw(devpriv->iobase + APCI3120_RD_STATUS);
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device |
-| *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+| *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task :Configure the output memory ON or OFF |
+----------------------------------------------------------------------------+
| Input Parameters :struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
| Return Value : |
*/
int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
if ((data[0] != 0) && (data[0] != 1)) {
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, |
-| struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+| struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : write diatal output port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
data[0] Value to be written
data[1] :1 Set digital o/p ON
int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device * dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data)
{
if ((data[0] > this_board->i_DoMaxdata) || (data[0] < 0)) {
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev,|
-|struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+|struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Write digiatl output |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
data[0] Value to be written
data[1] :1 Set digital o/p ON
int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data)
{
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev,|
-|struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
+|struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Write analog output |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s |
-| comedi_insn *insn |
+| struct comedi_insn *insn |
| unsigned int *data |
+----------------------------------------------------------------------------+
| Return Value : |
int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data)
{
UINT ui_Range, ui_Channel;
// TIMER
int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI3120_InsnReadTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//DI
// for di read
int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//DO
//int i_APCI3120_WriteDigitalOutput(struct comedi_device *dev, BYTE data);
int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//AO
//int i_APCI3120_Write1AnalogValue(struct comedi_device *dev,UINT ui_Range,UINT ui_Channel,UINT data );
int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//AI HArdware layer
int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_cmd *cmd);
int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp = 0;
UINT ui_NoOfChannel = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ConfigDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if ((data[0] != 0) && (data[0] != 1)) {
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_WriteDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : writes To the digital Output Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
- | comedi_insn *insn : Insn Structure Pointer |
+ | struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| data[0] :Value to output
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp = 0, ui_Temp1 = 0;
UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
UINT ui_NoOfChannel;
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3200_ConfigAnalogInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Input Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
- | comedi_insn *insn : Insn Structure Pointer |
+ | struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ul_Config = 0, ul_Temp = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadAnalogInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_DummyValue = 0;
int i_ConvertCJCCalibration;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_Read1AnalogInputChannel |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI3200_Read1AnalogInputChannel(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
UINT ui_EOC = 0;
UINT ui_ChannelNo = 0;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCalibrationOffsetValue |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read calibration offset value of the selected channel|
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCalibrationGainValue |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read calibration gain value of the selected channel |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCValue |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC value of the selected channel |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCCalOffset |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC calibration offset value of the selected channel
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCGainValue |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC calibration gain value
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_InsnBits_AnalogInput_Test |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Tests the Selected Anlog Input Channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
- | comedi_insn *insn : Insn Structure Pointer |
+ | struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
|
*/
INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Configuration = 0;
INT i_Temp; //,i_TimeUnit;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_InsnWriteReleaseAnalogInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
- | comedi_insn *insn,unsigned int *data) |
+ | struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Resets the channels |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
- | comedi_insn *insn : Insn Structure Pointer |
+ | struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer
+----------------------------------------------------------------------------+
| Output Parameters : -- |
*/
INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
i_APCI3200_Reset(dev);
return insn->n;
//AI
INT i_APCI3200_ConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI3200_ReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
INT i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
INT i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_cmd *cmd);
INT i_APCI3200_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
INT i_APCI3200_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//Interrupt
void v_APCI3200_Interrupt(int irq, void *d);
int i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev, UINT *data);
int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev, UINT *data);
int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn,
+ struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev, unsigned int *data);
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadDigitalInput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
*/
INT i_APCI3501_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
UINT ui_NoOfChannel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if ((data[0] != 0) && (data[0] != 1)) {
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_WriteDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : writes To the digital Output Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
-| comedi_insn *insn : Insn Structure Pointer |
+| struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
INT i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadDigitalOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
UINT ui_NoOfChannel;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigAnalogOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Output Subdevice |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
-| comedi_insn *insn : Insn Structure Pointer |
+| struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
INT i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
outl(data[0],
devpriv->iobase + APCI3501_ANALOG_OUTPUT +
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_WriteAnalogOutput |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes To the Selected Anlog Output Channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
| struct comedi_subdevice *s : Subdevice Pointer |
-| comedi_insn *insn : Insn Structure Pointer |
+| struct comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
+----------------------------------------------------------------------------+
*/
INT i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0, ul_Channel_no, ul_Polarity, ul_DAC_Ready = 0;;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigTimerCounterWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
devpriv->tsk_Current = current;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_StartStopWriteTimerCounterWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
*/
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
int i_Temp;
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadTimerCounterWatchdog |
| (struct comedi_device *dev,struct comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
*/
int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
//AO
INT i_APCI3501_ConfigAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI3501_WriteAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//DI
// for di read
-//INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+//INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data);
INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//DO
int i_APCI3501_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI3501_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
INT i_APCI3501_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn,
+ struct comedi_insn *insn,
unsigned int *data);
int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device *dev,
struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
//Interrupt
void v_APCI3501_Interrupt(int irq, void *d);
| Function Name : INT i_APCI3XXX_AnalogInputConfigOperatingMode |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task Converting mode and convert time selection |
*/
int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_TimeBase = 0;
| Function Name : INT i_APCI3XXX_InsnConfigAnalogInput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task Converting mode and convert time selection |
*/
int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
| Function Name : INT i_APCI3XXX_InsnReadAnalogInput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task Read 1 analog input |
*/
int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Configuration = (BYTE) CR_RANGE(insn->chanspec);
| Function Name : INT i_APCI3XXX_InsnWriteAnalogOutput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task Read 1 analog input |
*/
int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
BYTE b_Range = (BYTE) CR_RANGE(insn->chanspec);
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
| Function Name : INT i_APCI3XXX_InsnConfigInitTTLIO |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task You must calling this function be |
*/
int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Command = 0;
| Function Name : INT i_APCI3XXX_InsnBitsTTLIO |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Write the selected output mask and read the status from|
*/
int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_ChannelCpt = 0;
| Function Name : INT i_APCI3XXX_InsnReadTTLIO |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read the status from selected channel |
*/
int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
INT i_ReturnValue = insn->n;
| Function Name : INT i_APCI3XXX_InsnWriteTTLIO |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Set the state from TTL output channel |
*/
int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
| Function name :int i_APCI3XXX_InsnReadDigitalInput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Reads the value of the specified Digital input channel |
*/
int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
| Function name :int i_APCI3XXX_InsnBitsDigitalInput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Reads the value of the Digital input Port i.e.4channels|
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
DWORD dw_Temp = 0;
| Function name :int i_APCI3XXX_InsnBitsDigitalOutput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Write the selected output mask and read the status from|
+----------------------------------------------------------------------------+
*/
int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_ChannelCpt = 0;
| Function name :int i_APCI3XXX_InsnWriteDigitalOutput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Set the state from digital output channel |
*/
int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = CR_CHAN(insn->chanspec);
| Function name :int i_APCI3XXX_InsnReadDigitalOutput |
| (struct comedi_device *dev, |
| struct comedi_subdevice *s, |
-| comedi_insn *insn, |
+| struct comedi_insn *insn, |
| unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read the state from digital output channel |
*/
int i_APCI3XXX_InsnReadDigitalOutput(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
BYTE b_Channel = CR_CHAN(insn->chanspec);
/*read/write functions*/
static int pci6208_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
//static int pci6208_dio_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s,
-// comedi_insn *insn,unsigned int *data);
+// struct comedi_insn *insn,unsigned int *data);
//static int pci6208_dio_insn_config(struct comedi_device *dev,struct comedi_subdevice *s,
-// comedi_insn *insn,unsigned int *data);
+// struct comedi_insn *insn,unsigned int *data);
/*
* Attach is called by the Comedi core to configure the driver
}
static int pci6208_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i = 0, Data_Read;
unsigned short chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
//static int pci6208_dio_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s,
-// comedi_insn *insn,unsigned int *data)
+// struct comedi_insn *insn,unsigned int *data)
//{
// if(insn->n!=2)return -EINVAL;
//}
//static int pci6208_dio_insn_config(struct comedi_device *dev,struct comedi_subdevice *s,
-// comedi_insn *insn,unsigned int *data)
+// struct comedi_insn *insn,unsigned int *data)
//{
// int chan=CR_CHAN(insn->chanspec);
/* Digital IO */
static int adl_pci7432_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/* */
}
static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
printk("comedi: pci7432_do_insn_bits called\n");
printk("comedi: data0: %8x data1: %8x\n", data[0], data[1]);
}
static int adl_pci7432_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
printk("comedi: pci7432_di_insn_bits called\n");
printk("comedi: data0: %8x data1: %8x\n", data[0], data[1]);
};
static int adl_pci8164_insn_read_msts(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_write_otp(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int adl_pci8164_attach(struct comedi_device * dev, comedi_devconfig * it)
{
}
static int adl_pci8164_insn_read_msts(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
char *axisname;
}
static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
char *axisname;
}
static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
char *axisname;
}
static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
}
static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int axis, axis_reg;
}
static int adl_pci8164_insn_write_otp(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
}
static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
}
static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
#undef AI_INSN_DEBUG
static int pci9111_ai_insn_read(struct comedi_device * dev,
- struct comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data)
{
int resolution =
((pci9111_board_struct *) dev->board_ptr)->ai_resolution;
static int
pci9111_ao_insn_write(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i;
//
static int pci9111_ao_insn_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i;
//
static int pci9111_di_insn_bits(struct comedi_device * dev,
- struct comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
//
static int pci9111_do_insn_bits(struct comedi_device * dev,
- struct comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
==============================================================================
*/
static int pci9118_insn_read_ai(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, timeout;
==============================================================================
*/
static int pci9118_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, chanreg, ch;
==============================================================================
*/
static int pci9118_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, chan;
==============================================================================
*/
static int pci9118_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[1] = inl(dev->iobase + PCI9118_DI) & 0xf;
==============================================================================
*/
static int pci9118_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
s->state &= ~data[0];
num_names: sizeof(adq12b_boards) / sizeof(adq12b_board),
};
-static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
-static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
-static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
+static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data);
+static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data);
+static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data);
/*
* Attach is called by the Comedi core to configure the driver
* mode.
*/
-static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
{
int n, i;
int range, channel;
}
-static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
+static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data)
{
/* only bits 0-4 have information about digital inputs */
}
-static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
+static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data)
{
int channel;
==============================================================================
*/
static int pci171x_insn_read_ai(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, timeout;
#ifdef PCI171x_PARANOIDCHECK
==============================================================================
*/
static int pci171x_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, chan, range, ofs;
==============================================================================
*/
static int pci171x_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, chan;
==============================================================================
*/
static int pci171x_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[1] = inw(dev->iobase + PCI171x_DI);
==============================================================================
*/
static int pci171x_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
s->state &= ~data[0];
==============================================================================
*/
static int pci171x_insn_counter_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int msb, lsb, ccntrl;
int i;
==============================================================================
*/
static int pci171x_insn_counter_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
uint msb, lsb, ccntrl, status;
==============================================================================
*/
static int pci171x_insn_counter_config(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
#ifdef unused
/* This doesn't work like a normal Comedi counter config */
==============================================================================
*/
static int pci1720_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, rangereg, chan;
}
static int pci1723_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, chan;
analog data output;
*/
static int pci1723_ao_write_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, chan;
chan = CR_CHAN(insn->chanspec);
digital i/o config/query
*/
static int pci1723_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
unsigned int bits;
digital i/o bits read/write
*/
static int pci1723_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
s->state &= ~data[0];
==============================================================================
*/
static int pci_dio_insn_bits_di_b(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
int i;
==============================================================================
*/
static int pci_dio_insn_bits_di_w(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
int i;
==============================================================================
*/
static int pci_dio_insn_bits_do_b(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
int i;
==============================================================================
*/
static int pci_dio_insn_bits_do_w(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
int i;
==============================================================================
*/
static int pci1760_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[1] = inb(dev->iobase + IMB3);
==============================================================================
*/
static int pci1760_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int ret;
unsigned char omb[4] = {
==============================================================================
*/
static int pci1760_insn_cnt_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int ret, n;
unsigned char omb[4] = {
==============================================================================
*/
static int pci1760_insn_cnt_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int ret;
unsigned char chan = CR_CHAN(insn->chanspec) & 0x07;
#define devpriv ((aio12_8_private *) dev->private)
static int aio_aio12_8_ai_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
unsigned char control =
}
static int aio_aio12_8_ao_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int val = devpriv->ao_readback[CR_CHAN(insn->chanspec)];
}
static int aio_aio12_8_ao_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
};
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int aio_iiro_16_attach(struct comedi_device * dev, comedi_devconfig * it)
{
}
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
*/
static int
dio200_subdev_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
dio200_subdev_intr *subpriv = s->private;
*/
static int
dio200_subdev_8254_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
int chan = CR_CHAN(insn->chanspec);
*/
static int
dio200_subdev_8254_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
int chan = CR_CHAN(insn->chanspec);
*/
static int
dio200_subdev_8254_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
int ret;
static void pc236_intr_enable(struct comedi_device * dev);
static int pc236_intr_check(struct comedi_device * dev);
static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static int pc236_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
* Copied from the comedi_parport driver.
*/
static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[1] = 0;
return 2;
static int pc263_request_region(unsigned minor, unsigned long from,
unsigned long extent);
static int pc263_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pc263_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/*
* This function looks for a PCI device matching the requested board name,
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int pc263_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int pc263_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 1)
return -EINVAL;
*/
static int
pci224_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan, range;
*/
static int
pci224_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan;
COMEDI_PCI_INITCLEANUP(driver_amplc_pci230, pci230_pci_table);
static int pci230_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pci230_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pci230_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static void pci230_ct_setup_ns_mode(struct comedi_device * dev, unsigned int ct,
unsigned int mode, uint64_t ns, unsigned int round);
static void pci230_ns_to_single_timer(unsigned int *ns, unsigned int round);
* COMEDI_SUBD_AI instruction;
*/
static int pci230_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int n, i;
unsigned int chan, range, aref;
* COMEDI_SUBD_AO instructions;
*/
static int pci230_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan, range;
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int pci230_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int c6xdigio_pwmo_insn_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
printk("c6xdigio_pwmo_insn_read %x\n", insn->n);
return insn->n;
}
static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
//static int c6xdigio_ei_init_insn_read(struct comedi_device *dev,
// struct comedi_subdevice *s,
-// comedi_insn *insn,
+// struct comedi_insn *insn,
// unsigned int *data)
//{
// printk("c6xdigio_ei_init_insn_read %x\n", insn->n);
//static int c6xdigio_ei_init_insn_write(struct comedi_device *dev,
// struct comedi_subdevice *s,
-// comedi_insn *insn,
+// struct comedi_insn *insn,
// unsigned int *data)
//{
// int i;
//}
static int c6xdigio_ei_insn_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
// printk("c6xdigio_ei__insn_read %x\n", insn->n);
int n;
static irqreturn_t das16cs_interrupt(int irq, void *d PT_REGS_ARG);
static int das16cs_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16cs_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16cs_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16cs_timer_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16cs_timer_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int get_prodid(struct comedi_device * dev, struct pcmcia_device *link)
{
* mode.
*/
static int das16cs_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int to;
}
static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int das16cs_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int das16cs_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
int bits;
}
static int das16cs_timer_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
return -EINVAL;
}
static int das16cs_timer_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
return -EINVAL;
}
};
static int cb_pcidas_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static void cb_pcidas_load_counters(struct comedi_device * dev, unsigned int *ns,
int round_flags);
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int caldac_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int caldac_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int trimpot_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int cb_pcidas_trimpot_write(struct comedi_device * dev, unsigned int channel,
unsigned int value);
static int trimpot_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dac08_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dac08_write(struct comedi_device * dev, unsigned int value);
static int dac08_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
uint8_t value);
static int trimpot_7376_write(struct comedi_device * dev, uint8_t value);
* mode.
*/
static int cb_pcidas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, i;
unsigned int bits;
}
static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int id = data[0];
// analog output insn for pcidas-1000 and 1200 series
static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel;
unsigned long flags;
// analog output insn for pcidas-1602 series
static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel;
unsigned long flags;
// analog output readback insn
// XXX loses track of analog output value back after an analog ouput command is executed
static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
}
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
uint8_t nvram_data;
int retval;
}
static int caldac_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
const unsigned int channel = CR_CHAN(insn->chanspec);
}
static int caldac_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldac_value[CR_CHAN(insn->chanspec)];
}
static int dac08_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
return dac08_write(dev, data[0]);
}
static int dac08_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->dac08_value;
}
static int trimpot_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
}
static int trimpot_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
};
static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static int dio_callback(int dir, int port, int data, unsigned long arg);
static int dio_callback_4020(int dir, int port, int data, unsigned long arg);
static int di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dio_60xx_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dio_60xx_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ad8402_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static void ad8402_write(struct comedi_device * dev, unsigned int channel,
unsigned int value);
static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static void check_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd);
static unsigned int get_divisor(unsigned int ns, unsigned int flags);
static void i2c_write(struct comedi_device * dev, unsigned int address,
}
static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int bits = 0, n, i;
unsigned int channel, range, aref;
}
static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int id = data[0];
}
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
int range = CR_RANGE(insn->chanspec);
}
static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = priv(dev)->ao_value[CR_CHAN(insn->chanspec)];
}
static int di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
}
static int do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] &= 0xf;
// zero bits we are going to change
}
static int dio_60xx_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
}
static int dio_60xx_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
s->state &= ~data[0];
}
static int calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
}
static int calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
/* for pci-das6402/16, channel 0 is analog input gain and channel 1 is offset */
static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
}
static int ad8402_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
}
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = read_eeprom(dev, CR_CHAN(insn->chanspec));
static int cb_pcidda_attach(struct comedi_device * dev, comedi_devconfig * it);
static int cb_pcidda_detach(struct comedi_device * dev);
-//static int cb_pcidda_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+//static int cb_pcidda_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data);
static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
//static int cb_pcidda_ai_cmd(struct comedi_device *dev,struct comedi_subdevice *s);
//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_cmd *cmd);
//static int cb_pcidda_ns_to_timer(unsigned int *ns,int round);
#endif
static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int command;
unsigned int channel, range;
};
static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int cb_pcimdas_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/*
* Attach is called by the Comedi core to configure the driver
* mode.
*/
static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, i;
unsigned int d;
}
static int cb_pcimdas_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
COMEDI_PCI_INITCLEANUP_NOMODULE(cb_pcimdda_driver, pci_table);
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/*---------------------------------------------------------------------------
HELPER FUNCTION DECLARATIONS
}
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
applications, I would imagine.
*/
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
};
static int bonding_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int bonding_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
/*
* Attach is called by the Comedi core to configure the driver
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int bonding_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
#define LSAMPL_BITS (sizeof(unsigned int)*8)
unsigned nchans = LSAMPL_BITS, num_done = 0, i;
}
static int bonding_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec), ret, io_bits = s->io_bits;
unsigned int io;
#define devpriv ((struct parport_private *)(dev->private))
static int parport_insn_a(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
devpriv->a_data &= ~data[0];
}
static int parport_insn_config_a(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
s->io_bits = 0xff;
}
static int parport_insn_b(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
/* should writes be ignored? */
}
static int parport_insn_c(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
data[0] &= 0x0f;
if (data[0]) {
}
static int parport_intr_insn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
if (insn->n < 1)
return -EINVAL;
}
static int timer_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
- comedi_insn xinsn = *insn;
+ struct comedi_insn xinsn = *insn;
xinsn.data = data;
xinsn.subdev = devpriv->subd;
static int waveform_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
static int waveform_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int waveform_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static short fake_sawtooth(struct comedi_device *dev, unsigned int range,
unsigned long current_time);
static short fake_squarewave(struct comedi_device *dev, unsigned int range,
}
static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i, chan = CR_CHAN(insn->chanspec);
}
static int waveform_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i, chan = CR_CHAN(insn->chanspec);
/* Classic digital IO */
static int contec_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
#if 0
static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
#endif
static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
printk("contec_do_insn_bits called\n");
}
static int contec_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
rt_printk("contec_di_insn_bits called\n");
}
static int daqboard2000_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
daqboard2000_hw *fpga = devpriv->daq;
}
static int daqboard2000_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int daqboard2000_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* gainlist same as _pgx_ below */
static int das08_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das08_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das08_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das08jr_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das08jr_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das08jr_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das08ao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static void i8254_set_mode_low(unsigned int base, int channel,
unsigned int mode);
#define TIMEOUT 100000
static int das08_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int chan;
}
static int das08_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = 0;
data[1] = DAS08_IP(inb(dev->iobase + DAS08_STATUS));
}
static int das08_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int wbits;
}
static int das08jr_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = 0;
data[1] = inb(dev->iobase + DAS08JR_DIO);
}
static int das08jr_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
// null bits we are going to set
devpriv->do_bits &= ~data[0];
}
static int das08jr_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int lsb, msb;
*
*/
static int das08ao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int lsb, msb;
}
static int das08_counter_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
}
static int das08_counter_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
}
static int das08_counter_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
};
static int das16_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
}
static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int range;
}
static int das16_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
}
static int das16_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
}
static int das16_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int lsb, msb;
};
static int das16m1_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16m1_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
}
static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int byte;
}
static int das16m1_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
}
static int das16m1_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
struct comedi_cmd * cmd);
static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das1800_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das1800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das1800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das1800_set_frequency(struct comedi_device * dev);
static unsigned int burst_convert_arg(unsigned int convert_arg, int round_mode);
/* read analog input */
static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int chan, range, aref, chan_range;
/* writes to an analog output channel */
static int das1800_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
// int range = CR_RANGE(insn->chanspec);
/* reads from digital input channels */
static int das1800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[1] = inb(dev->iobase + DAS1800_DIGITAL) & 0xf;
/* writes to digital output channels */
static int das1800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
struct comedi_cmd * cmd);
static int das800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int das800_probe(struct comedi_device * dev);
static int das800_set_frequency(struct comedi_device * dev);
}
static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int chan;
}
static int das800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
}
static int das800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int wbits;
unsigned long irq_flags;
/* prototypes for driver functions below */
static int dmm32at_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dmm32at_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dmm32at_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dmm32at_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
*/
static int dmm32at_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, i;
unsigned int d;
}
static int dmm32at_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int dmm32at_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int dmm32at_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned char diobits;
}
static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned char chanbit;
int chan = CR_CHAN(insn->chanspec);
#define devpriv ((dt2801_private *)dev->private)
static int dt2801_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2801_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2801_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2801_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2801_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/* These are the low-level routines:
writecommand: write a command to the board
}
static int dt2801_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int d;
int stat;
}
static int dt2801_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_readback[CR_CHAN(insn->chanspec)];
}
static int dt2801_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
dt2801_writecmd(dev, DT_C_WRITE_DAIM);
dt2801_writedata(dev, CR_CHAN(insn->chanspec));
}
static int dt2801_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int which = 0;
}
static int dt2801_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int which = 0;
COMEDI_INITCLEANUP(driver_dt2811);
static int dt2811_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2811_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2811_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2811_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dt2811_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
enum { card_2811_pgh, card_2811_pgl };
typedef struct {
}
static int dt2811_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
int timeout = DT2811_TIMEOUT;
#endif
static int dt2811_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan;
}
static int dt2811_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan;
}
static int dt2811_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int dt2811_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
#define DT2814_MAX_SPEED 100000 /* Arbitrary 10 khz limit */
static int dt2814_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, i, hi, lo;
int chan;
}
static int dt2815_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int dt2815_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
COMEDI_INITCLEANUP(driver_dt2817);
static int dt2817_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int mask;
int chan;
}
static int dt2817_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int changed;
* - trigger conversion and wait for it to finish
*/
static int dt282x_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
* data register, and performs the conversion.
*/
static int dt282x_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
}
static int dt282x_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
short d;
unsigned int chan;
}
static int dt282x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
s->state &= ~data[0];
}
static int dt282x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int mask;
}
static int dt3k_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
unsigned int chan, gain, aref;
}
static int dt3k_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
unsigned int chan;
}
static int dt3k_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
unsigned int chan;
}
static int dt3k_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int mask;
}
static int dt3k_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int dt3k_mem_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int addr = CR_CHAN(insn->chanspec);
int i;
}
static int dt9812_di_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n;
u8 bits = 0;
}
static int dt9812_do_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n;
u8 bits = 0;
}
static int dt9812_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n;
}
static int dt9812_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n;
u16 value;
}
static int dt9812_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n;
COMEDI_INITCLEANUP(driver_fl512);
static int fl512_ai_insn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int fl512_ao_insn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int fl512_ao_insn_readback(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
/*
* fl512_ai_insn : this is the analog input function
*/
static int fl512_ai_insn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int n;
unsigned int lo_byte, hi_byte;
* fl512_ao_insn : used to write to a DA port n times
*/
static int fl512_ao_insn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec); /* get chan to write */
* DA port
*/
static int fl512_ao_insn_readback(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
COMEDI_PCI_INITCLEANUP(driver_hpdi, hpdi_pci_table);
static int dio_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
case INSN_CONFIG_DIO_OUTPUT:
Parameters:
struct comedi_device *dev Pointer to current device structure
struct comedi_subdevice *s Pointer to current subdevice structure
- comedi_insn *insn Pointer to current comedi instruction
+ struct comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue input data
Returns:int Nmuber of instructions executed
==============================================================================
*/
static int icp_multi_insn_read_ai(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n, timeout;
Parameters:
struct comedi_device *dev Pointer to current device structure
struct comedi_subdevice *s Pointer to current subdevice structure
- comedi_insn *insn Pointer to current comedi instruction
+ struct comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
Returns:int Nmuber of instructions executed
==============================================================================
*/
static int icp_multi_insn_write_ao(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n, chan, range, timeout;
Parameters:
struct comedi_device *dev Pointer to current device structure
struct comedi_subdevice *s Pointer to current subdevice structure
- comedi_insn *insn Pointer to current comedi instruction
+ struct comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
Returns:int Nmuber of instructions executed
==============================================================================
*/
static int icp_multi_insn_read_ao(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n, chan;
Parameters:
struct comedi_device *dev Pointer to current device structure
struct comedi_subdevice *s Pointer to current subdevice structure
- comedi_insn *insn Pointer to current comedi instruction
+ struct comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
Returns:int Nmuber of instructions executed
==============================================================================
*/
static int icp_multi_insn_bits_di(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
data[1] = readw(devpriv->io_addr + ICP_MULTI_DI);
Parameters:
struct comedi_device *dev Pointer to current device structure
struct comedi_subdevice *s Pointer to current subdevice structure
- comedi_insn *insn Pointer to current comedi instruction
+ struct comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
Returns:int Nmuber of instructions executed
==============================================================================
*/
static int icp_multi_insn_bits_do(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
#ifdef ICP_MULTI_EXTDEBUG
printk("icp multi EDBG: BGN: icp_multi_insn_bits_do(...)\n");
Parameters:
struct comedi_device *dev Pointer to current device structure
struct comedi_subdevice *s Pointer to current subdevice structure
- comedi_insn *insn Pointer to current comedi instruction
+ struct comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to counter data
Returns:int Nmuber of instructions executed
==============================================================================
*/
static int icp_multi_insn_read_ctr(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
return 0;
}
Parameters:
struct comedi_device *dev Pointer to current device structure
struct comedi_subdevice *s Pointer to current subdevice structure
- comedi_insn *insn Pointer to current comedi instruction
+ struct comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to counter data
Returns:int Nmuber of instructions executed
==============================================================================
*/
static int icp_multi_insn_write_ctr(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
return 0;
}
/* pci20006m */
static int pci20006_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static const struct comedi_lrange *pci20006_range_list[] = {
&range_bipolar10,
}
static int pci20006_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
}
static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
int hi, lo;
/* PCI20341M */
static int pci20341_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static const int pci20341_timebase[] = { 0x00, 0x00, 0x00, 0x04 };
static const int pci20341_settling_time[] = { 0x58, 0x58, 0x93, 0x99 };
}
static int pci20341_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
unsigned int i = 0, j = 0;
static void pci20xxx_dio_config(struct comedi_device * dev, struct comedi_subdevice * s);
static int pci20xxx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pci20xxx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/* initialize pci20xxx_private */
static int pci20xxx_dio_init(struct comedi_device * dev, struct comedi_subdevice * s)
}
static int pci20xxx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int mask, bits;
}
static int pci20xxx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int mask = data[0];
}
static int jr3_pci_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int result;
jr3_pci_subdev_private *p;
/* This should be used only for resetting the counters; maybe it is better
to make a special command 'reset'. */
static int cnt_winsn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
/*-- counter read -----------------------------------------------------------*/
static int cnt_rinsn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
unsigned char a0, a1, a2, a3, a4;
int chan = CR_CHAN(insn->chanspec);
static int reset_board(struct comedi_device *dev);
static int me4000_dio_insn_bits(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int me4000_dio_insn_config(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int cnt_reset(struct comedi_device *dev, unsigned int channel);
unsigned int channel, unsigned int mode);
static int me4000_cnt_insn_config(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int me4000_cnt_insn_write(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int me4000_cnt_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int me4000_ai_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *subdevice, struct comedi_insn *insn, unsigned int *data);
static int me4000_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
static int me4000_ao_insn_write(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int me4000_ao_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
/*-----------------------------------------------------------------------------
Meilhaus inline functions
===========================================================================*/
static int me4000_ai_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *subdevice, struct comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
===========================================================================*/
static int me4000_ao_insn_write(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
}
static int me4000_ao_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
===========================================================================*/
static int me4000_dio_insn_bits(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
CALL_PDEBUG("In me4000_dio_insn_bits()\n");
}
static int me4000_dio_insn_config(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
unsigned long tmp;
int chan = CR_CHAN(insn->chanspec);
}
static int me4000_cnt_insn_config(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int err;
}
static int me4000_cnt_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
unsigned short tmp;
}
static int me4000_cnt_insn_write(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
unsigned short tmp;
* ------------------------------------------------------------------
*/
static int me_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int bits;
int mask = 1 << CR_CHAN(insn->chanspec);
/* Digital instant input/outputs */
static int me_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
unsigned int mask = data[0];
s->state &= ~mask;
/* Analog instant input */
static int me_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *subdevice,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
unsigned short value;
int chan = CR_CHAN((&insn->chanspec)[0]);
/* Analog instant output */
static int me_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int chan;
int rang;
/* Analog output readback */
static int me_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i;
//----------------------------------------------------------------------------
static int mpc624_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
//----------------------------------------------------------------------------
static int mpc624_attach(struct comedi_device * dev, comedi_devconfig * it)
{
#define TIMEOUT 200
static int mpc624_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, i;
unsigned long int data_in, data_out;
COMEDI_INITCLEANUP(driver_mpc8260cpm);
static int mpc8260cpm_dio_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int mpc8260cpm_dio_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int mpc8260cpm_attach(struct comedi_device * dev, comedi_devconfig * it)
{
}
static int mpc8260cpm_dio_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
unsigned int d;
}
static int mpc8260cpm_dio_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int port;
unsigned long *p;
#define devpriv ((struct multiq3_private *)dev->private)
static int multiq3_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int chan;
}
static int multiq3_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int multiq3_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int multiq3_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int multiq3_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int multiq3_encoder_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
static int ni6527_find_device(struct comedi_device * dev, int bus, int slot);
static int ni6527_di_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
unsigned int interval;
}
static int ni6527_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int ni6527_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int ni6527_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return -EINVAL;
}
static int ni6527_intr_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return -EINVAL;
static int ni_65xx_find_device(struct comedi_device * dev, int bus, int slot);
static int ni_65xx_config_filter(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
const unsigned chan = CR_CHAN(insn->chanspec);
const unsigned port =
}
static int ni_65xx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned port;
}
static int ni_65xx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned base_bitfield_channel;
const unsigned max_ports_per_bitfield = 5;
}
static int ni_65xx_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return -EINVAL;
}
static int ni_65xx_intr_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return -EINVAL;
/* Possible instructions for a GPCT */
static int ni_660x_GPCT_rinsn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int ni_660x_GPCT_insn_config(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int ni_660x_GPCT_winsn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
/* Possible instructions for Digital IO */
static int ni_660x_dio_insn_config(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int ni_660x_dio_insn_bits(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static inline unsigned ni_660x_num_counters(struct comedi_device * dev)
{
static int
ni_660x_GPCT_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
return ni_tio_rinsn(subdev_to_counter(s), insn, data);
}
static int
ni_660x_GPCT_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
return ni_tio_insn_config(subdev_to_counter(s), insn, data);
}
static int ni_660x_GPCT_winsn(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
return ni_tio_winsn(subdev_to_counter(s), insn, data);
}
}
static int ni_660x_dio_insn_bits(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
unsigned base_bitfield_channel = CR_CHAN(insn->chanspec);
}
static int ni_660x_dio_insn_config(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
static int ni_670x_find_device(struct comedi_device * dev, int bus, int slot);
static int ni_670x_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_670x_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_670x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_670x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_670x_attach(struct comedi_device * dev, comedi_devconfig * it)
{
}
static int ni_670x_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int ni_670x_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int ni_670x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int ni_670x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
struct comedi_cmd * cmd);
static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int a2150_get_timing(struct comedi_device * dev, unsigned int *period,
int flags);
static int a2150_probe(struct comedi_device * dev);
}
static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int i, n;
static const int timeout = 100000;
static void atao_reset(struct comedi_device * dev);
static int atao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int atao_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int atao_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int atao_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int atao_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int atao_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int atao_attach(struct comedi_device * dev, comedi_devconfig * it)
{
}
static int atao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int atao_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int atao_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int atao_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
unsigned int mask, bit;
* the caldacs, but we can guess.
*/
static int atao_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
for (i = 0; i < insn->n; i++) {
}
static int atao_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int bitstring, bit;
unsigned int chan = CR_CHAN(insn->chanspec);
/* Mode 0 is used to get a single conversion on demand */
static int atmio16d_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, t;
int chan;
}
static int atmio16d_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
#ifdef DEBUG1
}
static int atmio16d_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan;
}
static int atmio16d_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int atmio16d_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int mask;
}
static int subdev_700_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
s->state &= ~data[0];
}
static int subdev_700_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
struct comedi_cmd * cmd);
static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int labpc_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int labpc_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int labpc_calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int labpc_calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int labpc_eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd);
static void labpc_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd);
#ifdef CONFIG_COMEDI_PCI
}
static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int chan, range;
// analog output insn
static int labpc_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel, range;
unsigned long flags;
// analog output readback insn
static int labpc_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
}
static int labpc_calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldac[CR_CHAN(insn->chanspec)];
}
static int labpc_calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
}
static int labpc_eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->eeprom_data[CR_CHAN(insn->chanspec)];
}
static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
int ret;
};
static int ni_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static int ni_cdio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
unsigned int trignum);
static int ni_serial_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_serial_hw_readwrite8(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in);
static int ni_serial_sw_readwrite8(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in);
static int ni_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_eeprom_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_m_series_eeprom_insn_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int ni_pfi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_pfi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static unsigned ni_old_get_pfi_routing(struct comedi_device * dev, unsigned chan);
static void ni_rtsi_init(struct comedi_device * dev);
static int ni_rtsi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_rtsi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static void caldac_setup(struct comedi_device * dev, struct comedi_subdevice * s);
static int ni_read_eeprom(struct comedi_device * dev, int addr);
static int ni_8255_callback(int dir, int port, int data, unsigned long arg);
static int ni_gpct_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_gpct_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int ni_gpct_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static int init_cs5529(struct comedi_device * dev);
static int cs5529_do_conversion(struct comedi_device * dev, unsigned short *data);
static int cs5529_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
#ifdef NI_CS5529_DEBUG
static unsigned int cs5529_config_read(struct comedi_device * dev,
unsigned int reg_select_bits);
unsigned int reg_select_bits);
static int ni_m_series_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_6143_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_set_master_clock(struct comedi_device * dev, unsigned source,
unsigned period_ns);
}
static int ni_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
const unsigned int mask = (1 << boardtype.adbits) - 1;
}
static int ni_ai_config_analog_trig(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ni_ai_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
return -EINVAL;
}
static int ni_ai_config_analog_trig(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int a, b, modebits;
int err = 0;
return ni_old_ao_config_chanlist(dev, s, chanspec, n_chans);
}
static int ni_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
}
static int ni_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned int invert;
}
static int ni_ao_insn_write_671x(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned int invert;
}
static int ni_ao_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
case INSN_CONFIG_GET_HARDWARE_BUFFER_SIZE:
// digital io
static int ni_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
rt_printk("ni_dio_insn_config() chan=%d io=%d\n",
}
static int ni_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
rt_printk("ni_dio_insn_bits() mask=0x%x bits=0x%x\n", data[0], data[1]);
}
static int ni_m_series_dio_insn_config(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
rt_printk("ni_m_series_dio_insn_config() chan=%d io=%d\n",
}
static int ni_m_series_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
rt_printk("ni_m_series_dio_insn_bits() mask=0x%x bits=0x%x\n", data[0],
}
static int ni_serial_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int err = insn->n;
unsigned char byte_out, byte_in = 0;
}
static int ni_freq_out_insn_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->clock_and_fout & FOUT_Divider_mask;
return 1;
}
static int ni_freq_out_insn_write(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
devpriv->clock_and_fout &= ~FOUT_Enable;
devpriv->stc_writew(dev, devpriv->clock_and_fout,
}
static int ni_freq_out_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
case INSN_CONFIG_SET_CLOCK_SRC:
*/
static int ni_eeprom_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = ni_read_eeprom(dev, CR_CHAN(insn->chanspec));
}
static int ni_m_series_eeprom_insn_read(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->eeprom_buffer[CR_CHAN(insn->chanspec)];
}
static int ni_m_series_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned up_count, down_count;
switch (data[0]) {
}
static int ni_6143_pwm_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned up_count, down_count;
switch (data[0]) {
calibration subdevice
*/
static int ni_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
ni_write_caldac(dev, CR_CHAN(insn->chanspec), data[0]);
}
static int ni_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldacs[CR_CHAN(insn->chanspec)];
#endif
static int ni_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_insn_config(counter, insn, data);
}
static int ni_gpct_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_rinsn(counter, insn, data);
}
static int ni_gpct_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_winsn(counter, insn, data);
}
static int ni_pfi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if ((boardtype.reg_type & ni_reg_m_series_mask) == 0) {
return -ENOTSUPP;
}
static int ni_pfi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int chan;
}
static int ni_rtsi_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int ni_rtsi_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
switch (data[0]) {
}
static int cs5529_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, retval;
unsigned short sample;
#endif
static int ni_pcidio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 1)
return -EINVAL;
}
static int ni_pcidio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
int ni_tio_insn_config(struct ni_gpct *counter,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
case INSN_CONFIG_SET_COUNTER_MODE:
return -EINVAL;
}
-int ni_tio_rinsn(struct ni_gpct *counter, comedi_insn * insn, unsigned int * data)
+int ni_tio_rinsn(struct ni_gpct *counter, struct comedi_insn * insn, unsigned int * data)
{
struct ni_gpct_device *counter_dev = counter->counter_dev;
const unsigned channel = CR_CHAN(insn->chanspec);
}
}
-int ni_tio_winsn(struct ni_gpct *counter, comedi_insn * insn, unsigned int * data)
+int ni_tio_winsn(struct ni_gpct *counter, struct comedi_insn * insn, unsigned int * data)
{
struct ni_gpct_device *counter_dev = counter->counter_dev;
const unsigned channel = CR_CHAN(insn->chanspec);
extern void ni_gpct_device_destroy(struct ni_gpct_device *counter_dev);
extern void ni_tio_init_counter(struct ni_gpct *counter);
extern int ni_tio_rinsn(struct ni_gpct *counter,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
extern int ni_tio_insn_config(struct ni_gpct *counter,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
extern int ni_tio_winsn(struct ni_gpct *counter,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
extern int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async);
extern int ni_tio_cmdtest(struct ni_gpct *counter, struct comedi_cmd * cmd);
extern int ni_tio_cancel(struct ni_gpct *counter);
}
static int pcl711_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, n;
int hi, lo;
analog output
*/
static int pcl711_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
}
static int pcl711_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
/* Digital port read - Untested on 8112 */
static int pcl711_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
/* Digital port write - Untested on 8112 */
static int pcl711_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
*/
/*
* check_driver overrides:
- * comedi_insn
+ * struct comedi_insn
*/
#include "../comedidev.h"
COMEDI_INITCLEANUP(driver_pcl725);
static int pcl725_do_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int pcl725_di_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
#define devpriv ((pcl726_private *)dev->private)
static int pcl726_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int hi, lo;
int n;
}
static int pcl726_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
int n;
}
static int pcl726_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int pcl726_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
COMEDI_INITCLEANUP(driver_pcl730);
static int pcl730_do_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int pcl730_di_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
==============================================================================
*/
static int pcl812_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int timeout, hi;
==============================================================================
*/
static int acl8216_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int timeout;
==============================================================================
*/
static int pcl812_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
int i;
==============================================================================
*/
static int pcl812_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
int i;
==============================================================================
*/
static int pcl812_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
==============================================================================
*/
static int pcl812_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
ANALOG INPUT MODE0, 816 cards, slow version
*/
static int pcl816_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int timeout;
ANALOG INPUT MODE0, 818 cards, slow version
*/
static int pcl818_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int timeout;
only one sample per call is supported
*/
static int pcl818_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
}
static int pcl818_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
only one sample per call is supported
*/
static int pcl818_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
only one sample per call is supported
*/
static int pcl818_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
*/
/*
* check_driver overrides:
- * comedi_insn
+ * struct comedi_insn
*/
#include "../comedidev.h"
/* overriding the 8255 insn config */
static int subdev_3724_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
unsigned int bits;
COMEDI_INITCLEANUP(driver_pcm3730);
static int pcm3730_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int pcm3730_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
#define TIMEOUT 100
static int pcmad_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan;
};
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/*
* Attach is called by the Comedi core to configure the driver
}
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
This is useful for some control applications, I would imagine.
*/
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
#define PAGE_INT_ID 3
typedef int (*comedi_insn_fn_t) (struct comedi_device *, struct comedi_subdevice *,
- comedi_insn *, unsigned int *);
+ struct comedi_insn *, unsigned int *);
-static int ai_rinsn(struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+static int ai_rinsn(struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
-static int ao_rinsn(struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+static int ao_rinsn(struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
-static int ao_winsn(struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+static int ao_winsn(struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
/*
};
static int pcmmio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pcmmio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG);
static void pcmmio_stop_intr(struct comedi_device *, struct comedi_subdevice *);
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int pcmmio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int byte_no;
if (insn->n != 2)
* contains the channel to be changed, and data[0] contains the
* value COMEDI_INPUT or COMEDI_OUTPUT. */
static int pcmmio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec), byte_no = chan / 8, bit_no =
chan % 8;
/* All this is for AI and AO */
static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
unsigned long iobase = subpriv->iobase;
}
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
for (n = 0; n < insn->n; n++) {
}
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
unsigned iobase = subpriv->iobase, iooffset = 0;
};
static int pcmuio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pcmuio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static irqreturn_t interrupt_pcmuio(int irq, void *d PT_REGS_ARG);
static void pcmuio_stop_intr(struct comedi_device *, struct comedi_subdevice *);
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int pcmuio_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int byte_no;
if (insn->n != 2)
* contains the channel to be changed, and data[0] contains the
* value COMEDI_INPUT or COMEDI_OUTPUT. */
static int pcmuio_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec), byte_no = chan / 8, bit_no =
chan % 8;
static int poc_attach(struct comedi_device * dev, comedi_devconfig * it);
static int poc_detach(struct comedi_device * dev);
static int readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int dac02_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pcl733_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int pcl734_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
struct boarddef_struct {
const char *name;
int type;
int n_chan;
int n_bits;
- int (*winsn) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+ int (*winsn) (struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
- int (*rinsn) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+ int (*rinsn) (struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
- int (*insnbits) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
+ int (*insnbits) (struct comedi_device *, struct comedi_subdevice *, struct comedi_insn *,
unsigned int *);
const struct comedi_lrange *range;
};
}
static int readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan;
#define DAC02_MSB(a) (2 * a + 1)
static int dac02_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int temp;
int chan;
}
static int pcl733_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int pcl734_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
/* One-shot analog data acquisition routine */
static int daqp_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
int i;
/* Single-shot analog output routine */
static int daqp_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
int d;
/* Digital input routine */
static int daqp_di_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
/* Digital output routine */
static int daqp_do_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
};
static int rtd_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int rtd_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int rtd_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int rtd_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int rtd_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int rtd_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_cmd *cmd);
static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
select, delay, then read.
*/
static int rtd_ai_rinsn(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int n, ii;
int stat;
Output one (or more) analog values to a single port as fast as possible.
*/
static int rtd_ao_winsn(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int rtd_ao_rinsn(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
* comedi core can convert between insn_bits and insn_read/write
*/
static int rtd_dio_insn_bits(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
if (insn->n != 2)
return -EINVAL;
Configure one bit on a IO port as Input or Output (hence the name :-).
*/
static int rtd_dio_insn_config(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
static const int gaindelay[] = { 10, 20, 40, 80 };
static int rti800_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, t;
int status;
}
static int rti800_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int rti800_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
int d;
}
static int rti800_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int rti800_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
#define devpriv ((rti802_private *)dev->private)
static int rti802_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
}
static int rti802_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i, d;
int chan = CR_CHAN(insn->chanspec);
};
static int s526_gpct_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_gpct_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_ai_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int s526_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/*
* Attach is called by the Comedi core to configure the driver
}
static int s526_gpct_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i; // counts the Data
int counter_channel = CR_CHAN(insn->chanspec);
}
static int s526_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
int i;
}
static int s526_gpct_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
short value;
#define ISR_ADC_DONE 0x4
static int s526_ai_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int result = -EINVAL;
* mode.
*/
static int s526_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, i;
int chan = CR_CHAN(insn->chanspec);
}
static int s526_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int s526_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int s526_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int s526_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
short value;
/* ioctl routines */
static int s626_ai_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
-/* static int s626_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data); */
+ struct comedi_insn *insn, unsigned int *data);
+/* static int s626_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data); */
static int s626_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
static int s626_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_cmd *cmd);
static int s626_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int s626_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_dio_set_irq(struct comedi_device *dev, unsigned int chan);
static int s626_dio_reset_irq(struct comedi_device *dev, unsigned int gruop,
unsigned int mask);
static int s626_dio_clear_irq(struct comedi_device *dev);
static int s626_enc_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_enc_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_enc_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data);
+ struct comedi_insn *insn, unsigned int *data);
static int s626_ns_to_timer(int *nanosec, int round_mode);
static int s626_ai_load_polllist(uint8_t *ppl, struct comedi_cmd *cmd);
static int s626_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
/* TO COMPLETE, IF NECESSARY */
static int s626_ai_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
return -EINVAL;
}
-/* static int s626_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,comedi_insn *insn,unsigned int *data) */
+/* static int s626_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) */
/* { */
/* register uint8_t i; */
/* register int32_t *readaddr; */
/* } */
static int s626_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
uint16_t chan = CR_CHAN(insn->chanspec);
uint16_t range = CR_RANGE(insn->chanspec);
}
static int s626_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i;
}
static int s626_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i;
* core can convert between insn_bits and insn_read/write */
static int s626_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
/* Length of data must be 2 (mask and new data, see below) */
}
static int s626_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
switch (data[0]) {
and set the subdevice. To complete with trigger and interrupt
configuration */
static int s626_enc_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
uint16_t Setup = (LOADSRC_INDX << BF_LOADSRC) | /* Preload upon */
/* index. */
}
static int s626_enc_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int n;
}
static int s626_enc_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
struct enc_private *k = &encpriv[CR_CHAN(insn->chanspec)];
};
static int serial2002_di_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int serial2002_do_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int serial2002_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int serial2002_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int serial2002_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
struct serial_data {
enum { is_invalid, is_digital, is_channel } kind;
}
static int serial2002_di_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan;
}
static int serial2002_do_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan;
}
static int serial2002_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan;
}
static int serial2002_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan;
}
static int serial2002_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan = CR_CHAN(insn->chanspec);
}
static int serial2002_ei_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n;
int chan;
};
static int skel_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int skel_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int skel_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int skel_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int skel_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_cmd * cmd);
static int skel_ns_to_timer(unsigned int *ns, int round);
* mode.
*/
static int skel_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int n, i;
unsigned int d;
}
static int skel_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int skel_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
static int skel_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
return -EINVAL;
}
static int skel_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
COMEDI_INITCLEANUP(driver_dnp);
static int dnp_dio_insn_bits(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
static int dnp_dio_insn_config(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
/* ------------------------------------------------------------------------- */
/* Attach is called by comedi core to configure the driver for a particular */
/* ------------------------------------------------------------------------- */
static int dnp_dio_insn_bits(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
/* ------------------------------------------------------------------------- */
static int dnp_dio_insn_config(struct comedi_device * dev,
- struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
u8 register_buffer;
static int unioxx5_attach(struct comedi_device * dev, comedi_devconfig * it);
static int unioxx5_subdev_write(struct comedi_device * dev, struct comedi_subdevice * subdev,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int unioxx5_subdev_read(struct comedi_device * dev, struct comedi_subdevice * subdev,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int unioxx5_insn_config(struct comedi_device * dev, struct comedi_subdevice * subdev,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int unioxx5_detach(struct comedi_device * dev);
static int __unioxx5_subdev_init(struct comedi_subdevice * subdev, int subdev_iobase,
int minor);
}
static int unioxx5_subdev_read(struct comedi_device * dev, struct comedi_subdevice * subdev,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unioxx5_subd_priv *usp = subdev->private;
int channel, type;
}
static int unioxx5_subdev_write(struct comedi_device * dev, struct comedi_subdevice * subdev,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
unioxx5_subd_priv *usp = subdev->private;
int channel, type;
/* for digital modules only */
static int unioxx5_insn_config(struct comedi_device * dev, struct comedi_subdevice * subdev,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int channel_offset, flags, channel = CR_CHAN(insn->chanspec), type;
unioxx5_subd_priv *usp = subdev->private;
/* Mode 0 is used to get a single conversion on demand */
static int usbdux_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i;
unsigned int one = 0;
/* analog out */
static int usbdux_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
}
static int usbdux_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int i, err;
int chan = CR_CHAN(insn->chanspec);
}
static int usbdux_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
}
static int usbdux_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
/* reads the 4 counters, only two are used just now */
static int usbdux_counter_read(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
int chan = insn->chanspec;
}
static int usbdux_counter_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
int err;
}
static int usbdux_counter_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
/* nothing to do so far */
return 2;
}
static int usbdux_pwm_write(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
}
static int usbdux_pwm_read(struct comedi_device *x1, struct comedi_subdevice *x2,
- comedi_insn *x3, unsigned int *x4)
+ struct comedi_insn *x3, unsigned int *x4)
{
/* not needed */
return -EINVAL;
/* switches on/off PWM */
static int usbdux_pwm_config(struct comedi_device *dev, struct comedi_subdevice *s,
- comedi_insn *insn, unsigned int *data)
+ struct comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
switch (data[0]) {
* Mode 0 is used to get a single conversion on demand.
*/
static int usbduxfast_ai_insn_read(struct comedi_device *dev,
- struct comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
+ struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int i, j, n, actual_length;
int chan, range, rngmask;
int comedi_data_write(void *dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, unsigned int data)
{
- comedi_insn insn;
+ struct comedi_insn insn;
memset(&insn, 0, sizeof(insn));
insn.insn = INSN_WRITE;
int comedi_data_read(void *dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, unsigned int *data)
{
- comedi_insn insn;
+ struct comedi_insn insn;
memset(&insn, 0, sizeof(insn));
insn.insn = INSN_READ;
int comedi_data_read_hint(void *dev, unsigned int subdev,
unsigned int chan, unsigned int range, unsigned int aref)
{
- comedi_insn insn;
+ struct comedi_insn insn;
unsigned int dummy_data;
memset(&insn, 0, sizeof(insn));
int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan,
unsigned int io)
{
- comedi_insn insn;
+ struct comedi_insn insn;
memset(&insn, 0, sizeof(insn));
insn.insn = INSN_CONFIG;
int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan,
unsigned int *val)
{
- comedi_insn insn;
+ struct comedi_insn insn;
memset(&insn, 0, sizeof(insn));
insn.insn = INSN_READ;
int comedi_dio_write(void *dev, unsigned int subdev, unsigned int chan,
unsigned int val)
{
- comedi_insn insn;
+ struct comedi_insn insn;
memset(&insn, 0, sizeof(insn));
insn.insn = INSN_WRITE;
int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask,
unsigned int *bits)
{
- comedi_insn insn;
+ struct comedi_insn insn;
unsigned int data[2];
int ret;
* COMEDI_INSN
* perform an instruction
*/
-int comedi_do_insn(void *d, comedi_insn *insn)
+int comedi_do_insn(void *d, struct comedi_insn *insn)
{
struct comedi_device *dev = (struct comedi_device *) d;
struct comedi_subdevice *s;