4 Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
10 Fax: +49(0)7223/9493-92
11 http://www.addi-data.com
14 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
16 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 You should also find the complete GPL in the COPYING file accompanying this source code.
26 +-----------------------------------------------------------------------+
27 | (C) ADDI-DATA GmbH Dieselstraße 3 D-77833 Ottersweier |
28 +-----------------------------------------------------------------------+
29 | Tel : +49 (0) 7223/9493-0 | email : info@addi-data.com |
30 | Fax : +49 (0) 7223/9493-92 | Internet : http://www.addi-data.com |
31 +-----------------------------------------------------------------------+
32 | Project : API APCI1710 | Compiler : gcc |
33 | Module name : TTL.C | Version : 2.96 |
34 +-------------------------------+---------------------------------------+
35 | Project manager: Eric Stolz | Date : 02/12/2002 |
36 +-----------------------------------------------------------------------+
37 | Description : APCI-1710 TTL I/O module |
40 +-----------------------------------------------------------------------+
42 +-----------------------------------------------------------------------+
43 | Date | Author | Description of updates |
44 +----------+-----------+------------------------------------------------+
45 | 13/05/98 | S. Weber | TTL digital input / output implementation |
46 |----------|-----------|------------------------------------------------|
47 | 08/05/00 | Guinot C | - 0400/0228 All Function in RING 0 |
49 +-----------------------------------------------------------------------+
52 +-----------------------------------------------------------------------+
55 #define APCI1710_TTL_INIT 0
56 #define APCI1710_TTL_INITDIRECTION 1
58 #define APCI1710_TTL_READCHANNEL 0
59 #define APCI1710_TTL_READPORT 1
62 +----------------------------------------------------------------------------+
63 | Function Name : _INT_ i_APCI1710_InitTTLIODirection |
64 | (unsigned char_ b_BoardHandle, |
65 | unsigned char_ b_ModulNbr, |
66 | unsigned char_ b_PortAMode, |
67 | unsigned char_ b_PortBMode, |
68 | unsigned char_ b_PortCMode, |
69 | unsigned char_ b_PortDMode) |
70 +----------------------------------------------------------------------------+
71 | Task APCI1710_TTL_INIT (using defaults) : Configure the TTL I/O operating mode from selected |
72 | module (b_ModulNbr). You must calling this function be|
73 | for you call any other function witch access of TTL. |
74 APCI1710_TTL_INITDIRECTION(user inputs for direction)
76 +----------------------------------------------------------------------------+
77 | Input Parameters : unsigned char_ b_BoardHandle : Handle of board APCI-1710|
78 | unsigned char_ b_ModulNbr : Module number to |
80 b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
81 b_InitType = (unsigned char) data[0];
82 b_PortAMode = (unsigned char) data[1];
83 b_PortBMode = (unsigned char) data[2];
84 b_PortCMode = (unsigned char) data[3];
85 b_PortDMode = (unsigned char) data[4];|
86 +----------------------------------------------------------------------------+
87 | Output Parameters : - |
88 +----------------------------------------------------------------------------+
89 | Return Value : 0: No error |
90 | -1: The handle parameter of the board is wrong |
91 | -2: The module parameter is wrong |
92 | -3: The module is not a TTL module |
93 | -4: Function not available for this version |
94 | -5: Port A mode selection is wrong |
95 | -6: Port B mode selection is wrong |
96 | -7: Port C mode selection is wrong |
97 | -8: Port D mode selection is wrong |
98 +----------------------------------------------------------------------------+
101 static int i_APCI1710_InsnConfigInitTTLIO(struct comedi_device *dev,
102 struct comedi_subdevice *s,
103 struct comedi_insn *insn,
106 struct addi_private *devpriv = dev->private;
107 int i_ReturnValue = 0;
108 unsigned char b_ModulNbr;
109 unsigned char b_InitType;
110 unsigned char b_PortAMode;
111 unsigned char b_PortBMode;
112 unsigned char b_PortCMode;
113 unsigned char b_PortDMode;
115 b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
116 b_InitType = (unsigned char) data[0];
117 i_ReturnValue = insn->n;
119 /**************************/
120 /* Test the module number */
121 /**************************/
123 if (b_ModulNbr < 4) {
124 /**************************/
125 /* Test if TTL I/O module */
126 /**************************/
128 if ((devpriv->s_BoardInfos.
129 dw_MolduleConfiguration[b_ModulNbr] &
130 0xFFFF0000UL) == APCI1710_TTL_IO) {
131 switch (b_InitType) {
132 case APCI1710_TTL_INIT:
134 devpriv->s_ModuleInfo[b_ModulNbr].
135 s_TTLIOInfo.b_TTLInit = 1;
137 /***************************/
138 /* Set TTL port A to input */
139 /***************************/
141 devpriv->s_ModuleInfo[b_ModulNbr].
142 s_TTLIOInfo.b_PortConfiguration[0] = 0;
144 /***************************/
145 /* Set TTL port B to input */
146 /***************************/
148 devpriv->s_ModuleInfo[b_ModulNbr].
149 s_TTLIOInfo.b_PortConfiguration[1] = 0;
151 /***************************/
152 /* Set TTL port C to input */
153 /***************************/
155 devpriv->s_ModuleInfo[b_ModulNbr].
156 s_TTLIOInfo.b_PortConfiguration[2] = 0;
158 /****************************/
159 /* Set TTL port D to output */
160 /****************************/
162 devpriv->s_ModuleInfo[b_ModulNbr].
163 s_TTLIOInfo.b_PortConfiguration[3] = 1;
165 /*************************/
166 /* Set the configuration */
167 /*************************/
170 devpriv->s_BoardInfos.ui_Address + 20 +
174 case APCI1710_TTL_INITDIRECTION:
176 b_PortAMode = (unsigned char) data[1];
177 b_PortBMode = (unsigned char) data[2];
178 b_PortCMode = (unsigned char) data[3];
179 b_PortDMode = (unsigned char) data[4];
181 /********************/
182 /* Test the version */
183 /********************/
185 if ((devpriv->s_BoardInfos.
186 dw_MolduleConfiguration
187 [b_ModulNbr] & 0xFFFF) >=
189 /************************/
190 /* Test the port A mode */
191 /************************/
193 if ((b_PortAMode == 0)
194 || (b_PortAMode == 1)) {
195 /************************/
196 /* Test the port B mode */
197 /************************/
199 if ((b_PortBMode == 0)
200 || (b_PortBMode == 1)) {
201 /************************/
202 /* Test the port C mode */
203 /************************/
205 if ((b_PortCMode == 0)
208 /************************/
209 /* Test the port D mode */
210 /************************/
212 if ((b_PortDMode == 0) || (b_PortDMode == 1)) {
221 /***********************/
222 /* Set TTL port A mode */
223 /***********************/
234 /***********************/
235 /* Set TTL port B mode */
236 /***********************/
247 /***********************/
248 /* Set TTL port C mode */
249 /***********************/
260 /***********************/
261 /* Set TTL port D mode */
262 /***********************/
273 /*************************/
274 /* Set the configuration */
275 /*************************/
277 outl((b_PortAMode << 0) | (b_PortBMode << 1) | (b_PortCMode << 2) | (b_PortDMode << 3), devpriv->s_BoardInfos.ui_Address + 20 + (64 * b_ModulNbr));
279 /**********************************/
280 /* Port D mode selection is wrong */
281 /**********************************/
283 DPRINTK("Port D mode selection is wrong\n");
289 /**********************************/
290 /* Port C mode selection is wrong */
291 /**********************************/
293 DPRINTK("Port C mode selection is wrong\n");
298 /**********************************/
299 /* Port B mode selection is wrong */
300 /**********************************/
302 DPRINTK("Port B mode selection is wrong\n");
306 /**********************************/
307 /* Port A mode selection is wrong */
308 /**********************************/
310 DPRINTK("Port A mode selection is wrong\n");
314 /*******************************************/
315 /* Function not available for this version */
316 /*******************************************/
318 DPRINTK("Function not available for this version\n");
325 printk("Bad Config Type\n");
328 /**********************************/
329 /* The module is not a TTL module */
330 /**********************************/
332 DPRINTK("The module is not a TTL module\n");
336 /***********************/
337 /* Module number error */
338 /***********************/
340 DPRINTK("Module number error\n");
344 return i_ReturnValue;
348 +----------------------------------------------------------------------------+
350 +----------------------------------------------------------------------------+
354 +----------------------------------------------------------------------------+
355 | Function Name : _INT_ i_APCI1710_ReadTTLIOChannelValue |
356 | (unsigned char_ b_BoardHandle, |
357 | unsigned char_ b_ModulNbr, |
358 | unsigned char_ b_SelectedPort, |
359 | unsigned char_ b_InputChannel, |
360 | unsigned char *_ pb_ChannelStatus) |
361 +----------------------------------------------------------------------------+
362 | Task : Read the status from selected TTL digital input |
364 +----------------------------------------------------------------------------+
365 | Task : Read the status from digital input port |
366 | (b_SelectedPort) from selected TTL module (b_ModulNbr) |
367 +----------------------------------------------------------------------------+
369 +----------------------------------------------------------------------------+
370 | Input Parameters : unsigned char_ b_BoardHandle : Handle of board APCI-1710|
371 | unsigned char_ b_ModulNbr : Module number to |
372 | configure (0 to 7) |
373 | unsigned char_ b_SelectedPort, : Selection from TTL I/O |
375 | 0 : Port A selection |
376 | 1 : Port B selection |
377 | 2 : Port C selection |
378 | 3 : Port D selection |
379 | unsigned char_ b_InputChannel : Selection from digital |
381 APCI1710_TTL_READCHANNEL
382 b_ModulNbr = CR_AREF(insn->chanspec);
383 b_SelectedPort= CR_RANGE(insn->chanspec);
384 b_InputChannel= CR_CHAN(insn->chanspec);
385 b_ReadType = (unsigned char) data[0];
387 APCI1710_TTL_READPORT|
388 b_ModulNbr = CR_AREF(insn->chanspec);
389 b_SelectedPort= CR_RANGE(insn->chanspec);
390 b_ReadType = (unsigned char) data[0];
392 +----------------------------------------------------------------------------+
393 | Output Parameters : data[0]
395 unsigned char *_ pb_ChannelStatus : Digital input channel |
397 | 0 : Channle is not active|
398 | 1 : Channle is active |
399 +----------------------------------------------------------------------------+
400 | Return Value : 0: No error |
401 | -1: The handle parameter of the board is wrong |
402 | -2: The module parameter is wrong |
403 | -3: The module is not a TTL module |
404 | -4: The selected TTL input port is wrong |
405 | -5: The selected TTL digital input is wrong |
406 | -6: TTL I/O not initialised |
407 +----------------------------------------------------------------------------+
410 static int i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev,
411 struct comedi_subdevice *s,
412 struct comedi_insn *insn,
415 struct addi_private *devpriv = dev->private;
416 int i_ReturnValue = 0;
417 unsigned int dw_StatusReg;
418 unsigned char b_ModulNbr;
419 unsigned char b_SelectedPort;
420 unsigned char b_InputChannel;
421 unsigned char b_ReadType;
422 unsigned char *pb_ChannelStatus;
423 unsigned char *pb_PortValue;
425 i_ReturnValue = insn->n;
426 b_ReadType = (unsigned char) data[0];
427 b_ModulNbr = CR_AREF(insn->chanspec);
428 b_SelectedPort = CR_RANGE(insn->chanspec);
429 b_InputChannel = CR_CHAN(insn->chanspec);
431 /**************************/
432 /* Test the module number */
433 /**************************/
435 if (b_ModulNbr < 4) {
436 /**************************/
437 /* Test if TTL I/O module */
438 /**************************/
440 if ((devpriv->s_BoardInfos.
441 dw_MolduleConfiguration[b_ModulNbr] &
442 0xFFFF0000UL) == APCI1710_TTL_IO) {
443 switch (b_ReadType) {
445 case APCI1710_TTL_READCHANNEL:
446 pb_ChannelStatus = (unsigned char *) &data[0];
447 /********************************/
448 /* Test the TTL I/O port number */
449 /********************************/
451 if (((b_SelectedPort <= 2)
452 && ((devpriv->s_BoardInfos.
453 dw_MolduleConfiguration
457 || ((b_SelectedPort <= 3)
458 && ((devpriv->s_BoardInfos.
459 dw_MolduleConfiguration
463 /******************************************/
464 /* Test the digital imnput channel number */
465 /******************************************/
467 if (((b_InputChannel <= 7)
468 && (b_SelectedPort < 3))
469 || ((b_InputChannel <= 1)
470 && (b_SelectedPort ==
472 /******************************************/
473 /* Test if the TTL I/O module initialised */
474 /******************************************/
479 s_TTLIOInfo.b_TTLInit ==
481 /***********************************/
482 /* Test if TTL port used for input */
483 /***********************************/
485 if (((devpriv->s_BoardInfos.dw_MolduleConfiguration[b_ModulNbr] & 0xFFFF) == 0x3130) || (((devpriv->s_BoardInfos.dw_MolduleConfiguration[b_ModulNbr] & 0xFFFF) >= 0x3230) && (devpriv->s_ModuleInfo[b_ModulNbr].s_TTLIOInfo.b_PortConfiguration[b_SelectedPort] == 0))) {
486 /**************************/
487 /* Read all digital input */
488 /**************************/
503 (8 * b_SelectedPort)) >> b_InputChannel) & 1;
505 /*******************************/
506 /* Selected TTL I/O port error */
507 /*******************************/
509 DPRINTK("Selected TTL I/O port error\n");
514 /***************************/
515 /* TTL I/O not initialised */
516 /***************************/
518 DPRINTK("TTL I/O not initialised\n");
522 /********************************/
523 /* Selected digital input error */
524 /********************************/
526 DPRINTK("Selected digital input error\n");
530 /*******************************/
531 /* Selected TTL I/O port error */
532 /*******************************/
534 DPRINTK("Selected TTL I/O port error\n");
539 case APCI1710_TTL_READPORT:
540 pb_PortValue = (unsigned char *) &data[0];
541 /********************************/
542 /* Test the TTL I/O port number */
543 /********************************/
545 if (((b_SelectedPort <= 2)
546 && ((devpriv->s_BoardInfos.
547 dw_MolduleConfiguration
551 || ((b_SelectedPort <= 3)
552 && ((devpriv->s_BoardInfos.
553 dw_MolduleConfiguration
557 /******************************************/
558 /* Test if the TTL I/O module initialised */
559 /******************************************/
561 if (devpriv->s_ModuleInfo[b_ModulNbr].
562 s_TTLIOInfo.b_TTLInit == 1) {
563 /***********************************/
564 /* Test if TTL port used for input */
565 /***********************************/
567 if (((devpriv->s_BoardInfos.
568 dw_MolduleConfiguration
573 || (((devpriv->s_BoardInfos.dw_MolduleConfiguration[b_ModulNbr] & 0xFFFF) >= 0x3230) && (devpriv->s_ModuleInfo[b_ModulNbr].s_TTLIOInfo.b_PortConfiguration[b_SelectedPort] == 0))) {
574 /**************************/
575 /* Read all digital input */
576 /**************************/
587 (8 * b_SelectedPort)) & 0xFF);
589 /*******************************/
590 /* Selected TTL I/O port error */
591 /*******************************/
593 DPRINTK("Selected TTL I/O port error\n");
597 /***************************/
598 /* TTL I/O not initialised */
599 /***************************/
601 DPRINTK("TTL I/O not initialised\n");
605 /*******************************/
606 /* Selected TTL I/O port error */
607 /*******************************/
609 DPRINTK("Selected TTL I/O port error\n");
615 printk("Bad ReadType\n");
619 /**********************************/
620 /* The module is not a TTL module */
621 /**********************************/
623 DPRINTK("The module is not a TTL module\n");
627 /***********************/
628 /* Module number error */
629 /***********************/
631 DPRINTK("Module number error\n");
635 return i_ReturnValue;
639 +----------------------------------------------------------------------------+
640 | Function Name : int i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device
641 *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
642 +----------------------------------------------------------------------------+
643 | Task : Read the status from all digital input ports |
644 | (port A, port B and port C) from selected TTL |
645 | module (b_ModulNbr) |
646 +----------------------------------------------------------------------------+
647 | Input Parameters : unsigned char_ b_BoardHandle : Handle of board APCI-1710|
648 | unsigned char_ b_ModulNbr : Module number to |
649 | configure (0 to 3) |
650 +----------------------------------------------------------------------------+
651 | Output Parameters : PULONG_ pul_PortValue : Digital TTL inputs port |
653 +----------------------------------------------------------------------------+
654 | Return Value : 0: No error |
655 | -1: The handle parameter of the board is wrong |
656 | -2: The module parameter is wrong |
657 | -3: The module is not a TTL module |
658 | -4: TTL I/O not initialised |
659 +----------------------------------------------------------------------------+
662 static int i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
663 struct comedi_subdevice *s,
664 struct comedi_insn *insn,
667 struct addi_private *devpriv = dev->private;
668 int i_ReturnValue = 0;
669 unsigned int dw_StatusReg;
670 unsigned char b_ModulNbr;
671 unsigned int *pul_PortValue;
673 b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
674 i_ReturnValue = insn->n;
675 pul_PortValue = (unsigned int *) &data[0];
677 /**************************/
678 /* Test the module number */
679 /**************************/
681 if (b_ModulNbr < 4) {
682 /**************************/
683 /* Test if TTL I/O module */
684 /**************************/
686 if ((devpriv->s_BoardInfos.
687 dw_MolduleConfiguration[b_ModulNbr] &
688 0xFFFF0000UL) == APCI1710_TTL_IO) {
689 /******************************************/
690 /* Test if the TTL I/O module initialised */
691 /******************************************/
694 s_ModuleInfo[b_ModulNbr].
695 s_TTLIOInfo.b_TTLInit == 1) {
696 /**************************/
697 /* Read all digital input */
698 /**************************/
700 dw_StatusReg = inl(devpriv->s_BoardInfos.
701 ui_Address + (64 * b_ModulNbr));
703 /**********************/
704 /* Test if TTL Rev1.0 */
705 /**********************/
707 if ((devpriv->s_BoardInfos.
708 dw_MolduleConfiguration
709 [b_ModulNbr] & 0xFFFF) ==
712 dw_StatusReg & 0xFFFFFFUL;
714 /**************************************/
715 /* Test if port A not used for output */
716 /**************************************/
718 if (devpriv->s_ModuleInfo[b_ModulNbr].
720 b_PortConfiguration[0] == 1) {
726 /**************************************/
727 /* Test if port B not used for output */
728 /**************************************/
731 s_ModuleInfo[b_ModulNbr].
733 b_PortConfiguration[1] == 1) {
739 /**************************************/
740 /* Test if port C not used for output */
741 /**************************************/
744 s_ModuleInfo[b_ModulNbr].
746 b_PortConfiguration[2] == 1) {
752 /**************************************/
753 /* Test if port D not used for output */
754 /**************************************/
757 s_ModuleInfo[b_ModulNbr].
759 b_PortConfiguration[3] == 1) {
766 /***************************/
767 /* TTL I/O not initialised */
768 /***************************/
769 DPRINTK("TTL I/O not initialised\n");
773 /**********************************/
774 /* The module is not a TTL module */
775 /**********************************/
776 DPRINTK("The module is not a TTL module\n");
780 /***********************/
781 /* Module number error */
782 /***********************/
783 DPRINTK("Module number error\n");
787 return i_ReturnValue;
791 +----------------------------------------------------------------------------+
793 +----------------------------------------------------------------------------+
797 +----------------------------------------------------------------------------+
798 | Function Name : _INT_ i_APCI1710_SetTTLIOChlOn |
799 | (unsigned char_ b_BoardHandle, |
800 | unsigned char_ b_ModulNbr, |
801 | unsigned char_ b_OutputChannel)
802 int i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,struct comedi_subdevice *s,
803 struct comedi_insn *insn,unsigned int *data) |
804 +----------------------------------------------------------------------------+
805 | Task : Sets or resets the output witch has been passed with the |
806 | parameter b_Channel. Setting an output means setting |
808 +----------------------------------------------------------------------------+
809 | Input Parameters : unsigned char_ b_BoardHandle : Handle of board APCI-1710 |
810 | unsigned char_ b_ModulNbr : Selected module number (0 to 3)|
811 | unsigned char_ b_OutputChannel : Selection from digital output |
819 b_ModulNbr = CR_AREF(insn->chanspec);
820 b_OutputChannel= CR_CHAN(insn->chanspec);
821 ui_State = data[0]; /* ON or OFF */
822 +----------------------------------------------------------------------------+
823 | Output Parameters : - |
824 +----------------------------------------------------------------------------+
825 | Return Value : 0: No error |
826 | -1: The handle parameter of the board is wrong |
827 | -2: The module parameter is wrong |
828 | -3: The module is not a TTL I/O module |
829 | -4: The selected digital output is wrong |
830 | -5: TTL I/O not initialised see function |
831 | " i_APCI1710_InitTTLIO"
832 +----------------------------------------------------------------------------+
835 static int i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,
836 struct comedi_subdevice *s,
837 struct comedi_insn *insn,
840 struct addi_private *devpriv = dev->private;
841 int i_ReturnValue = 0;
842 unsigned int dw_StatusReg = 0;
843 unsigned char b_ModulNbr;
844 unsigned char b_OutputChannel;
845 unsigned int ui_State;
847 i_ReturnValue = insn->n;
848 b_ModulNbr = CR_AREF(insn->chanspec);
849 b_OutputChannel = CR_CHAN(insn->chanspec);
850 ui_State = data[0]; /* ON or OFF */
852 /**************************/
853 /* Test the module number */
854 /**************************/
856 if (b_ModulNbr < 4) {
857 /**************************/
858 /* Test if TTL I/O module */
859 /**************************/
861 if ((devpriv->s_BoardInfos.
862 dw_MolduleConfiguration[b_ModulNbr] &
863 0xFFFF0000UL) == APCI1710_TTL_IO) {
864 /******************************************/
865 /* Test if the TTL I/O module initialised */
866 /******************************************/
868 if (devpriv->s_ModuleInfo[b_ModulNbr].
869 s_TTLIOInfo.b_TTLInit == 1) {
870 /***********************************/
871 /* Test the TTL I/O channel number */
872 /***********************************/
874 if (((b_OutputChannel <= 1)
875 && ((devpriv->s_BoardInfos.
876 dw_MolduleConfiguration
880 || ((b_OutputChannel <= 25)
881 && ((devpriv->s_BoardInfos.
882 dw_MolduleConfiguration
886 /****************************************************/
887 /* Test if the selected channel is a output channel */
888 /****************************************************/
890 if (((b_OutputChannel <= 1)
897 || ((b_OutputChannel >= 2)
898 && (b_OutputChannel <=
906 || ((b_OutputChannel >= 10)
907 && (b_OutputChannel <=
915 || ((b_OutputChannel >= 18)
916 && (b_OutputChannel <=
924 /************************/
925 /* Test if PD0 selected */
926 /************************/
928 if (b_OutputChannel == 0) {
936 /************************/
937 /* Test if PD1 selected */
938 /************************/
940 if (b_OutputChannel ==
955 /********************/
956 /* Read all channel */
957 /********************/
966 if (ui_State) /* ON */
972 ((b_OutputChannel / 8) * 8)) & 0xFF;
988 ((b_OutputChannel / 8) * 8)) & 0xFF;
995 (1 << (b_OutputChannel % 8)));
999 /****************************/
1000 /* Set the new output value */
1001 /****************************/
1003 outl(dw_StatusReg, devpriv->s_BoardInfos.ui_Address + 8 + ((b_OutputChannel / 8) * 4) + (64 * b_ModulNbr));
1007 /************************************/
1008 /* The selected TTL output is wrong */
1009 /************************************/
1011 DPRINTK(" The selected TTL output is wrong\n");
1015 /************************************/
1016 /* The selected TTL output is wrong */
1017 /************************************/
1019 DPRINTK("The selected TTL output is wrong\n");
1023 /***************************/
1024 /* TTL I/O not initialised */
1025 /***************************/
1027 DPRINTK("TTL I/O not initialised\n");
1031 /**************************************/
1032 /* The module is not a TTL I/O module */
1033 /**************************************/
1035 DPRINTK("The module is not a TTL I/O module\n");
1039 /***********************/
1040 /* Module number error */
1041 /***********************/
1043 DPRINTK("Module number error\n");
1047 return i_ReturnValue;