| -9: Selection from hardware gate level is wrong |
+----------------------------------------------------------------------------+
*/
-
-int i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data)
+static int i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
{
struct addi_private *devpriv = dev->private;
int i_ReturnValue = 0;
| See function "i_APCI1710_SetBoardIntRoutineX" |
+----------------------------------------------------------------------------+
*/
-
-int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data)
+static int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
{
struct addi_private *devpriv = dev->private;
int i_ReturnValue = 0;
| "i_APCI1710_InitTimer" |
+----------------------------------------------------------------------------+
*/
-
-int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data)
+static int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
{
struct addi_private *devpriv = dev->private;
int i_ReturnValue = 0;
return i_ReturnValue;
}
-/*
-+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
-struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
-+----------------------------------------------------------------------------+
-| Task : Read write functions for Timer |
-+----------------------------------------------------------------------------+
-| Input Parameters :
-+----------------------------------------------------------------------------+
-| Output Parameters : - |
-+----------------------------------------------------------------------------+
-| Return Value :
-+----------------------------------------------------------------------------+
-*/
-
-int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data)
-{
- unsigned char b_BitsType;
- int i_ReturnValue = 0;
- b_BitsType = data[0];
-
- printk("\n82X54");
-
- switch (b_BitsType) {
- case APCI1710_TIMER_READVALUE:
- i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
- (unsigned char)CR_AREF(insn->chanspec),
- (unsigned char)CR_CHAN(insn->chanspec),
- (unsigned int *) &data[0]);
- break;
-
- case APCI1710_TIMER_GETOUTPUTLEVEL:
- i_ReturnValue = i_APCI1710_GetTimerOutputLevel(dev,
- (unsigned char)CR_AREF(insn->chanspec),
- (unsigned char)CR_CHAN(insn->chanspec),
- (unsigned char *) &data[0]);
- break;
-
- case APCI1710_TIMER_GETPROGRESSSTATUS:
- i_ReturnValue = i_APCI1710_GetTimerProgressStatus(dev,
- (unsigned char)CR_AREF(insn->chanspec),
- (unsigned char)CR_CHAN(insn->chanspec),
- (unsigned char *)&data[0]);
- break;
-
- case APCI1710_TIMER_WRITEVALUE:
- i_ReturnValue = i_APCI1710_WriteTimerValue(dev,
- (unsigned char)CR_AREF(insn->chanspec),
- (unsigned char)CR_CHAN(insn->chanspec),
- (unsigned int)data[1]);
-
- break;
-
- default:
- printk("Bits Config Parameter Wrong\n");
- i_ReturnValue = -1;
- }
-
- if (i_ReturnValue >= 0)
- i_ReturnValue = insn->n;
- return i_ReturnValue;
-}
-
/*
+----------------------------------------------------------------------------+
| Function Name : _INT_ i_APCI1710_ReadTimerValue |
| "i_APCI1710_InitTimer" |
+----------------------------------------------------------------------------+
*/
-
-int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned int *pul_TimerValue)
+static int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
+ unsigned char b_ModulNbr,
+ unsigned char b_TimerNbr,
+ unsigned int *pul_TimerValue)
{
struct addi_private *devpriv = dev->private;
int i_ReturnValue = 0;
| "i_APCI1710_InitTimer" |
+----------------------------------------------------------------------------+
*/
-
-int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned char *pb_OutputLevel)
+static int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
+ unsigned char b_ModulNbr,
+ unsigned char b_TimerNbr,
+ unsigned char *pb_OutputLevel)
{
struct addi_private *devpriv = dev->private;
int i_ReturnValue = 0;
| "i_APCI1710_InitTimer" |
+----------------------------------------------------------------------------+
*/
-
-int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned char *pb_TimerStatus)
+static int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
+ unsigned char b_ModulNbr,
+ unsigned char b_TimerNbr,
+ unsigned char *pb_TimerStatus)
{
struct addi_private *devpriv = dev->private;
int i_ReturnValue = 0;
| "i_APCI1710_InitTimer" |
+----------------------------------------------------------------------------+
*/
-
-int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned int ul_WriteValue)
+static int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
+ unsigned char b_ModulNbr,
+ unsigned char b_TimerNbr,
+ unsigned int ul_WriteValue)
{
struct addi_private *devpriv = dev->private;
int i_ReturnValue = 0;
return i_ReturnValue;
}
+
+/*
++----------------------------------------------------------------------------+
+| Function Name :INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
+struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
++----------------------------------------------------------------------------+
+| Task : Read write functions for Timer |
++----------------------------------------------------------------------------+
+| Input Parameters :
++----------------------------------------------------------------------------+
+| Output Parameters : - |
++----------------------------------------------------------------------------+
+| Return Value :
++----------------------------------------------------------------------------+
+*/
+static int i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
+{
+ unsigned char b_BitsType;
+ int i_ReturnValue = 0;
+ b_BitsType = data[0];
+
+ printk("\n82X54");
+
+ switch (b_BitsType) {
+ case APCI1710_TIMER_READVALUE:
+ i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
+ (unsigned char)CR_AREF(insn->chanspec),
+ (unsigned char)CR_CHAN(insn->chanspec),
+ (unsigned int *) &data[0]);
+ break;
+
+ case APCI1710_TIMER_GETOUTPUTLEVEL:
+ i_ReturnValue = i_APCI1710_GetTimerOutputLevel(dev,
+ (unsigned char)CR_AREF(insn->chanspec),
+ (unsigned char)CR_CHAN(insn->chanspec),
+ (unsigned char *) &data[0]);
+ break;
+
+ case APCI1710_TIMER_GETPROGRESSSTATUS:
+ i_ReturnValue = i_APCI1710_GetTimerProgressStatus(dev,
+ (unsigned char)CR_AREF(insn->chanspec),
+ (unsigned char)CR_CHAN(insn->chanspec),
+ (unsigned char *)&data[0]);
+ break;
+
+ case APCI1710_TIMER_WRITEVALUE:
+ i_ReturnValue = i_APCI1710_WriteTimerValue(dev,
+ (unsigned char)CR_AREF(insn->chanspec),
+ (unsigned char)CR_CHAN(insn->chanspec),
+ (unsigned int)data[1]);
+
+ break;
+
+ default:
+ printk("Bits Config Parameter Wrong\n");
+ i_ReturnValue = -1;
+ }
+
+ if (i_ReturnValue >= 0)
+ i_ReturnValue = insn->n;
+ return i_ReturnValue;
+}
#define APCI1710_10MHZ 10
#endif
/* END JK 27.10.03 : Add the possibility to use a 40 Mhz quartz */
-
-/*
- * 82X54 TIMER INISIALISATION FUNCTION
- */
-int i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data);
-
-int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data);
-
-/*
- * 82X54 READ FUNCTION
- */
-int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data);
-
-int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data);
-
-/*
- * 82X54 READ & WRITE FUNCTION
- */
-int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned int *pul_TimerValue);
-
-int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned char *pb_OutputLevel);
-
-int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned char *pb_TimerStatus);
-
-/*
- * 82X54 WRITE FUNCTION
- */
-int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
- unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- unsigned int ul_WriteValue);