From 2d990d529805c7cc65067bd465b1c644913d2ed8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 19 Feb 2009 17:09:52 -0800 Subject: Staging: comedi: addi-data header file cleanups From: Greg Kroah-Hartman Clean up lots of coding style issues in the addi-data header files. Cc: David Schleef Cc: Ian Abbott Cc: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h | 131 +-- drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h | 139 +--- drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h | 87 +- drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h | 404 ++++++------ drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h | 91 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h | 149 ++-- drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h | 87 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h | 106 +-- drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h | 80 +- drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h | 80 -- drivers/staging/comedi/drivers/addi-data/addi_amcc_s5933.h | 354 +++++----- drivers/staging/comedi/drivers/addi-data/addi_common.h | 365 +++++----- drivers/staging/comedi/drivers/addi-data/amcc_s5933_58.h | 73 +- drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.h | 127 +-- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h | 164 ++-- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h | 53 - drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h | 116 +-- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h | 73 -- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h | 85 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h | 85 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h | 65 - drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h | 68 -- drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h | 72 -- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h | 171 ++--- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h | 120 +-- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h | 86 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.h | 77 +- 27 files changed, 1651 insertions(+), 1857 deletions(-) --- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h @@ -1,59 +1,27 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ /* -#define VOID void -#define INT int -#define UINT unsigned int -#define SHORT short -#define USHORT unsigned short -#define CHAR char -#define BYTE unsigned char -#define WORD unsigned int -#define LONG long -#define ULONG unsigned long -#define DWORD unsigned long -#define DOUBLE double -#define PINT int * -#define PUINT unsigned int * -#define PSHORT short * -#define PUSHORT unsigned short * -#define PCHAR char * -#define PBYTE unsigned char * -#define PWORD unsigned int * -#define PLONG long * -#define PULONG unsigned long * -#define PDWORD unsigned long * -#define PDOUBLE double * -*/ - -#define AMCC_OP_REG_MCSR 0x3c -#define EEPROM_BUSY 0x80000000 -#define NVCMD_LOAD_LOW (0x4 << 5 ) // nvRam load low command -#define NVCMD_LOAD_HIGH (0x5 << 5 ) // nvRam load high command -#define NVCMD_BEGIN_READ (0x7 << 5 ) // nvRam begin read command -#define NVCMD_BEGIN_WRITE (0x6 << 5) //EEPROM begin write command + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define AMCC_OP_REG_MCSR 0x3c +#define EEPROM_BUSY 0x80000000 +#define NVCMD_LOAD_LOW (0x4 << 5) /* nvRam load low command */ +#define NVCMD_LOAD_HIGH (0x5 << 5) /* nvRam load high command */ +#define NVCMD_BEGIN_READ (0x7 << 5) /* nvRam begin read command */ +#define NVCMD_BEGIN_WRITE (0x6 << 5) /* EEPROM begin write command */ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, - DWORD dw_PCIBoardEepromAddress, - WORD w_EepromStartAddress, PWORD pw_DataRead); + DWORD dw_PCIBoardEepromAddress, + WORD w_EepromStartAddress, PWORD pw_DataRead); --- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_s5933.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_s5933.h @@ -1,57 +1,21 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ /* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ - +-----------------------------------------------------------------------+ - | (C) ADDI-DATA GmbH Dieselstrasse 3 D-77833 Ottersweier | - +-----------------------------------------------------------------------+ - | Tel : +49 (0) 7223/9493-0 | email : info@addi-data.com | - | Fax : +49 (0) 7223/9493-92 | Internet : http://www.addi-data.com | - +-----------------------------------------------------------------------+ - | Project : ADDI DATA | Compiler : GCC | - | Modulname : addi_amcc_s5933.h | Version : 2.96 Redhat Linux | - | | kernel-2.4.2 | - +-------------------------------+---------------------------------------+ - | Author : | Date : | - +-----------------------------------------------------------------------+ - | Description :|Header file for AMCC s 5933 | - +-----------------------------------------------------------------------+ - | UPDATE'S | - +-----------------------------------------------------------------------+ - | Date | Author | Description of updates | - +----------+-----------+------------------------------------------------+ - | | | | - | | | | - | | | | - | | | | - | | | | - +----------+-----------+------------------------------------------------+ - | | | | - | | | | - | | | | - +----------+-----------+------------------------------------------------+ -*/ +/* Header file for AMCC s 5933 */ #ifndef _AMCC_S5933_H_ #define _AMCC_S5933_H_ @@ -64,100 +28,106 @@ You shoud also find the complete GPL in #error No support for 2.1.55 and older #endif -#define FIFO_ADVANCE_ON_BYTE_2 0x20000000 // written on base0 +/* written on base0 */ +#define FIFO_ADVANCE_ON_BYTE_2 0x20000000 -#define AMWEN_ENABLE 0x02 // added for step 6 dma written on base2 -#define A2P_FIFO_WRITE_ENABLE 0x01 +/* added for step 6 dma written on base2 */ +#define AMWEN_ENABLE 0x02 -#define AGCSTS_TC_ENABLE 0x10000000 // for transfer count enable bit +#define A2P_FIFO_WRITE_ENABLE 0x01 -// ADDON RELATED ADDITIONS -// Constant -#define APCI3120_ENABLE_TRANSFER_ADD_ON_LOW 0x00 -#define APCI3120_ENABLE_TRANSFER_ADD_ON_HIGH 0x1200 -#define APCI3120_A2P_FIFO_MANAGEMENT 0x04000400L -#define APCI3120_AMWEN_ENABLE 0x02 -#define APCI3120_A2P_FIFO_WRITE_ENABLE 0x01 -#define APCI3120_FIFO_ADVANCE_ON_BYTE_2 0x20000000L -#define APCI3120_ENABLE_WRITE_TC_INT 0x00004000L -#define APCI3120_CLEAR_WRITE_TC_INT 0x00040000L -#define APCI3120_DISABLE_AMWEN_AND_A2P_FIFO_WRITE 0x0 -#define APCI3120_DISABLE_BUS_MASTER_ADD_ON 0x0 -#define APCI3120_DISABLE_BUS_MASTER_PCI 0x0 - - // ADD_ON ::: this needed since apci supports 16 bit interface to add on -#define APCI3120_ADD_ON_AGCSTS_LOW 0x3C -#define APCI3120_ADD_ON_AGCSTS_HIGH APCI3120_ADD_ON_AGCSTS_LOW + 2 -#define APCI3120_ADD_ON_MWAR_LOW 0x24 -#define APCI3120_ADD_ON_MWAR_HIGH APCI3120_ADD_ON_MWAR_LOW + 2 -#define APCI3120_ADD_ON_MWTC_LOW 0x058 -#define APCI3120_ADD_ON_MWTC_HIGH APCI3120_ADD_ON_MWTC_LOW + 2 - -// AMCC -#define APCI3120_AMCC_OP_MCSR 0x3C -#define APCI3120_AMCC_OP_REG_INTCSR 0x38 - -/****************************************************************************/ -/* AMCC Operation Register Offsets - PCI */ -/****************************************************************************/ - -#define AMCC_OP_REG_OMB1 0x00 -#define AMCC_OP_REG_OMB2 0x04 -#define AMCC_OP_REG_OMB3 0x08 -#define AMCC_OP_REG_OMB4 0x0c -#define AMCC_OP_REG_IMB1 0x10 -#define AMCC_OP_REG_IMB2 0x14 -#define AMCC_OP_REG_IMB3 0x18 -#define AMCC_OP_REG_IMB4 0x1c -#define AMCC_OP_REG_FIFO 0x20 -#define AMCC_OP_REG_MWAR 0x24 -#define AMCC_OP_REG_MWTC 0x28 -#define AMCC_OP_REG_MRAR 0x2c -#define AMCC_OP_REG_MRTC 0x30 -#define AMCC_OP_REG_MBEF 0x34 -#define AMCC_OP_REG_INTCSR 0x38 -#define AMCC_OP_REG_INTCSR_SRC (AMCC_OP_REG_INTCSR + 2) /* INT source */ -#define AMCC_OP_REG_INTCSR_FEC (AMCC_OP_REG_INTCSR + 3) /* FIFO ctrl */ -#define AMCC_OP_REG_MCSR 0x3c -#define AMCC_OP_REG_MCSR_NVDATA (AMCC_OP_REG_MCSR + 2) /* Data in byte 2 */ -#define AMCC_OP_REG_MCSR_NVCMD (AMCC_OP_REG_MCSR + 3) /* Command in byte 3 */ +/* for transfer count enable bit */ +#define AGCSTS_TC_ENABLE 0x10000000 -#define AMCC_FIFO_DEPTH_DWORD 8 -#define AMCC_FIFO_DEPTH_BYTES (8 * sizeof (u32)) - -/****************************************************************************/ -/* AMCC Operation Registers Size - PCI */ -/****************************************************************************/ +/* + * ADDON RELATED ADDITIONS + */ +/* Constant */ +#define APCI3120_ENABLE_TRANSFER_ADD_ON_LOW 0x00 +#define APCI3120_ENABLE_TRANSFER_ADD_ON_HIGH 0x1200 +#define APCI3120_A2P_FIFO_MANAGEMENT 0x04000400L +#define APCI3120_AMWEN_ENABLE 0x02 +#define APCI3120_A2P_FIFO_WRITE_ENABLE 0x01 +#define APCI3120_FIFO_ADVANCE_ON_BYTE_2 0x20000000L +#define APCI3120_ENABLE_WRITE_TC_INT 0x00004000L +#define APCI3120_CLEAR_WRITE_TC_INT 0x00040000L +#define APCI3120_DISABLE_AMWEN_AND_A2P_FIFO_WRITE 0x0 +#define APCI3120_DISABLE_BUS_MASTER_ADD_ON 0x0 +#define APCI3120_DISABLE_BUS_MASTER_PCI 0x0 + +/* ADD_ON ::: this needed since apci supports 16 bit interface to add on */ +#define APCI3120_ADD_ON_AGCSTS_LOW 0x3C +#define APCI3120_ADD_ON_AGCSTS_HIGH (APCI3120_ADD_ON_AGCSTS_LOW + 2) +#define APCI3120_ADD_ON_MWAR_LOW 0x24 +#define APCI3120_ADD_ON_MWAR_HIGH (APCI3120_ADD_ON_MWAR_LOW + 2) +#define APCI3120_ADD_ON_MWTC_LOW 0x058 +#define APCI3120_ADD_ON_MWTC_HIGH (APCI3120_ADD_ON_MWTC_LOW + 2) + +/* AMCC */ +#define APCI3120_AMCC_OP_MCSR 0x3C +#define APCI3120_AMCC_OP_REG_INTCSR 0x38 -#define AMCC_OP_REG_SIZE 64 /* in bytes */ +/* + * AMCC Operation Register Offsets - PCI + */ +#define AMCC_OP_REG_OMB1 0x00 +#define AMCC_OP_REG_OMB2 0x04 +#define AMCC_OP_REG_OMB3 0x08 +#define AMCC_OP_REG_OMB4 0x0c +#define AMCC_OP_REG_IMB1 0x10 +#define AMCC_OP_REG_IMB2 0x14 +#define AMCC_OP_REG_IMB3 0x18 +#define AMCC_OP_REG_IMB4 0x1c +#define AMCC_OP_REG_FIFO 0x20 +#define AMCC_OP_REG_MWAR 0x24 +#define AMCC_OP_REG_MWTC 0x28 +#define AMCC_OP_REG_MRAR 0x2c +#define AMCC_OP_REG_MRTC 0x30 +#define AMCC_OP_REG_MBEF 0x34 +#define AMCC_OP_REG_INTCSR 0x38 +/* INT source */ +#define AMCC_OP_REG_INTCSR_SRC (AMCC_OP_REG_INTCSR + 2) +/* FIFO ctrl */ +#define AMCC_OP_REG_INTCSR_FEC (AMCC_OP_REG_INTCSR + 3) +#define AMCC_OP_REG_MCSR 0x3c +/* Data in byte 2 */ +#define AMCC_OP_REG_MCSR_NVDATA (AMCC_OP_REG_MCSR + 2) +/* Command in byte 3 */ +#define AMCC_OP_REG_MCSR_NVCMD (AMCC_OP_REG_MCSR + 3) -/****************************************************************************/ -/* AMCC Operation Register Offsets - Add-on */ -/****************************************************************************/ +#define AMCC_FIFO_DEPTH_DWORD 8 +#define AMCC_FIFO_DEPTH_BYTES (8 * sizeof(u32)) -#define AMCC_OP_REG_AIMB1 0x00 -#define AMCC_OP_REG_AIMB2 0x04 -#define AMCC_OP_REG_AIMB3 0x08 -#define AMCC_OP_REG_AIMB4 0x0c -#define AMCC_OP_REG_AOMB1 0x10 -#define AMCC_OP_REG_AOMB2 0x14 -#define AMCC_OP_REG_AOMB3 0x18 -#define AMCC_OP_REG_AOMB4 0x1c -#define AMCC_OP_REG_AFIFO 0x20 -#define AMCC_OP_REG_AMWAR 0x24 -#define AMCC_OP_REG_APTA 0x28 -#define AMCC_OP_REG_APTD 0x2c -#define AMCC_OP_REG_AMRAR 0x30 -#define AMCC_OP_REG_AMBEF 0x34 -#define AMCC_OP_REG_AINT 0x38 -#define AMCC_OP_REG_AGCSTS 0x3c -#define AMCC_OP_REG_AMWTC 0x58 -#define AMCC_OP_REG_AMRTC 0x5c +/* + * AMCC Operation Registers Size - PCI + */ +#define AMCC_OP_REG_SIZE 64 /* in bytes */ -/****************************************************************************/ -/* AMCC - Add-on General Control/Status Register */ -/****************************************************************************/ +/* + * AMCC Operation Register Offsets - Add-on + */ +#define AMCC_OP_REG_AIMB1 0x00 +#define AMCC_OP_REG_AIMB2 0x04 +#define AMCC_OP_REG_AIMB3 0x08 +#define AMCC_OP_REG_AIMB4 0x0c +#define AMCC_OP_REG_AOMB1 0x10 +#define AMCC_OP_REG_AOMB2 0x14 +#define AMCC_OP_REG_AOMB3 0x18 +#define AMCC_OP_REG_AOMB4 0x1c +#define AMCC_OP_REG_AFIFO 0x20 +#define AMCC_OP_REG_AMWAR 0x24 +#define AMCC_OP_REG_APTA 0x28 +#define AMCC_OP_REG_APTD 0x2c +#define AMCC_OP_REG_AMRAR 0x30 +#define AMCC_OP_REG_AMBEF 0x34 +#define AMCC_OP_REG_AINT 0x38 +#define AMCC_OP_REG_AGCSTS 0x3c +#define AMCC_OP_REG_AMWTC 0x58 +#define AMCC_OP_REG_AMRTC 0x5c +/* + * AMCC - Add-on General Control/Status Register + */ #define AGCSTS_CONTROL_MASK 0xfffff000 #define AGCSTS_NV_ACC_MASK 0xe0000000 #define AGCSTS_RESET_MASK 0x0e000000 @@ -183,10 +153,9 @@ You shoud also find the complete GPL in #define AGCSTS_FS_A2P_HALF 0x00000002 #define AGCSTS_FS_A2P_FULL 0x00000001 -/****************************************************************************/ -/* AMCC - Add-on Interrupt Control/Status Register */ -/****************************************************************************/ - +/* + * AMCC - Add-on Interrupt Control/Status Register + */ #define AINT_INT_MASK 0x00ff0000 #define AINT_SEL_MASK 0x0000ffff #define AINT_IS_ENSEL_MASK 0x00001f1f @@ -242,7 +211,8 @@ struct pcilst_struct { unsigned int irq; }; -struct pcilst_struct *amcc_devices; // ptr to root list of all amcc devices +/* ptr to root list of all amcc devices */ +struct pcilst_struct *amcc_devices; static const int i_ADDIDATADeviceID[] = { 0x15B8, 0x10E8 }; @@ -251,20 +221,26 @@ static const int i_ADDIDATADeviceID[] = void v_pci_card_list_init(unsigned short pci_vendor, char display); void v_pci_card_list_cleanup(unsigned short pci_vendor); struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id, - unsigned short device_id); + unsigned short + device_id); int i_find_free_pci_card_by_position(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot, struct pcilst_struct **card); + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot, + struct pcilst_struct **card); struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot, int i_Master); + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot, + int i_Master); int pci_card_alloc(struct pcilst_struct *amcc, int master); int i_pci_card_free(struct pcilst_struct *amcc); void v_pci_card_list_display(void); int i_pci_card_data(struct pcilst_struct *amcc, - unsigned char *pci_bus, unsigned char *pci_slot, - unsigned char *pci_func, resource_size_t * io_addr, unsigned int *irq); + unsigned char *pci_bus, unsigned char *pci_slot, + unsigned char *pci_func, resource_size_t * io_addr, + unsigned int *irq); /****************************************************************************/ @@ -279,8 +255,8 @@ void v_pci_card_list_init(unsigned short last = NULL; for (pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL); - pcidev != NULL; - pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) { + pcidev != NULL; + pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) { for (i_Count = 0; i_Count < 2; i_Count++) { pci_vendor = i_ADDIDATADeviceID[i_Count]; if (pcidev->vendor == pci_vendor) { @@ -288,11 +264,10 @@ void v_pci_card_list_init(unsigned short memset(amcc, 0, sizeof(*amcc)); amcc->pcidev = pcidev; - if (last) { + if (last) last->next = amcc; - } else { + else amcc_devices = amcc; - } last = amcc; amcc->vendor = pcidev->vendor; @@ -305,7 +280,7 @@ void v_pci_card_list_init(unsigned short * pci_card_alloc. */ for (i = 0; i < 5; i++) amcc->io_addr[i] = - pci_resource_start(pcidev, i); + pci_resource_start(pcidev, i); amcc->irq = pcidev->irq; } @@ -333,14 +308,14 @@ void v_pci_card_list_cleanup(unsigned sh /****************************************************************************/ /* find first unused card with this device_id */ struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id, - unsigned short device_id) + unsigned short device_id) { struct pcilst_struct *amcc, *next; for (amcc = amcc_devices; amcc; amcc = next) { next = amcc->next; if ((!amcc->used) && (amcc->device == device_id) - && (amcc->vendor == vendor_id)) + && (amcc->vendor == vendor_id)) return amcc; } @@ -351,8 +326,10 @@ struct pcilst_struct *ptr_find_free_pci_ /****************************************************************************/ /* find card on requested position */ int i_find_free_pci_card_by_position(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot, struct pcilst_struct **card) + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot, + struct pcilst_struct **card) { struct pcilst_struct *amcc, *next; @@ -360,21 +337,21 @@ int i_find_free_pci_card_by_position(uns for (amcc = amcc_devices; amcc; amcc = next) { next = amcc->next; if ((amcc->vendor == vendor_id) && (amcc->device == device_id) - && (amcc->pci_bus == pci_bus) - && (amcc->pci_slot == pci_slot)) { + && (amcc->pci_bus == pci_bus) + && (amcc->pci_slot == pci_slot)) { if (!(amcc->used)) { *card = amcc; - return 0; // ok, card is found + return 0; /* ok, card is found */ } else { - rt_printk - (" - \nCard on requested position is used b:s %d:%d!\n", - pci_bus, pci_slot); - return 2; // card exist but is used + rt_printk(" - \nCard on requested position is used b:s %d:%d!\n", + pci_bus, pci_slot); + return 2; /* card exist but is used */ } } } - return 1; // no card found + /* no card found */ + return 1; } /****************************************************************************/ @@ -420,12 +397,18 @@ void v_pci_card_list_display(void) { struct pcilst_struct *amcc, *next; - printk("List of pci cards\n"); - printk("bus:slot:func vendor device io_amcc io_daq irq used\n"); + printk(KERN_DEBUG "List of pci cards\n"); + printk(KERN_DEBUG "bus:slot:func vendor device io_amcc io_daq irq used\n"); for (amcc = amcc_devices; amcc; amcc = next) { next = amcc->next; - printk("%2d %2d %2d 0x%4x 0x%4x 0x%8llx 0x%8llx %2u %2d\n", amcc->pci_bus, amcc->pci_slot, amcc->pci_func, amcc->vendor, amcc->device, (unsigned long long)amcc->io_addr[0], (unsigned long long)amcc->io_addr[2], amcc->irq, amcc->used); + printk + ("%2d %2d %2d 0x%4x 0x%4x 0x%8llx 0x%8llx %2u %2d\n", + amcc->pci_bus, amcc->pci_slot, amcc->pci_func, + amcc->vendor, amcc->device, + (unsigned long long)amcc->io_addr[0], + (unsigned long long)amcc->io_addr[2], amcc->irq, + amcc->used); } } @@ -433,8 +416,9 @@ void v_pci_card_list_display(void) /****************************************************************************/ /* return all card information for driver */ int i_pci_card_data(struct pcilst_struct *amcc, - unsigned char *pci_bus, unsigned char *pci_slot, - unsigned char *pci_func, resource_size_t * io_addr, unsigned int *irq) + unsigned char *pci_bus, unsigned char *pci_slot, + unsigned char *pci_func, resource_size_t * io_addr, + unsigned int *irq) { int i; @@ -452,29 +436,31 @@ int i_pci_card_data(struct pcilst_struct /****************************************************************************/ /* select and alloc card */ struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot, int i_Master) + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot, + int i_Master) { struct pcilst_struct *card; - if ((pci_bus < 1) & (pci_slot < 1)) { // use autodetection - if ((card = ptr_find_free_pci_card_by_device(vendor_id, - device_id)) == NULL) { + if ((pci_bus < 1) & (pci_slot < 1)) { + /* use autodetection */ + card = ptr_find_free_pci_card_by_device(vendor_id, device_id); + if (card == NULL) { rt_printk(" - Unused card not found in system!\n"); return NULL; } } else { switch (i_find_free_pci_card_by_position(vendor_id, device_id, - pci_bus, pci_slot, &card)) { + pci_bus, pci_slot, + &card)) { case 1: - rt_printk - (" - Card not found on requested position b:s %d:%d!\n", - pci_bus, pci_slot); + rt_printk(" - Card not found on requested position b:s %d:%d!\n", + pci_bus, pci_slot); return NULL; case 2: - rt_printk - (" - Card on requested position is used b:s %d:%d!\n", - pci_bus, pci_slot); + rt_printk(" - Card on requested position is used b:s %d:%d!\n", + pci_bus, pci_slot); return NULL; } } --- a/drivers/staging/comedi/drivers/addi-data/addi_common.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h @@ -1,50 +1,24 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ /* - - +-----------------------------------------------------------------------+ - | (C) ADDI-DATA GmbH Dieselstrasse 3 D-77833 Ottersweier | - +-----------------------------------------------------------------------+ - | Tel : +49 (0) 7223/9493-0 | email : info@addi-data.com | - | Fax : +49 (0) 7223/9493-92 | Internet : http://www.addi-data.com | - +-----------------------------------------------------------------------+ - | Project : ADDI-DATA | Compiler : GCC | - | Modulname : addi_common.h | Version : 2.96 | - +-------------------------------+---------------------------------------+ - | Project manager: Eric Stolz | Date : 02/12/2002 | - +-----------------------------------------------------------------------+ - | Description : ADDI COMMON Header File | - +-----------------------------------------------------------------------+ -*/ - -//including header files + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ #include #include #include #include -//#include #include #include #include @@ -53,17 +27,16 @@ You shoud also find the complete GPL in #include #include #include -#include +#include +#include +#include #include "../../comedidev.h" #include "addi_amcc_s5933.h" -#include -#include -#define ERROR -1 -#define SUCCESS 1 - -// variable type definition +#define ERROR -1 +#define SUCCESS 1 +/* variable type definition */ typedef void VOID, *PVOID; typedef char CHAR, *PCHAR; typedef const CHAR *PCSTR; @@ -73,38 +46,39 @@ typedef unsigned short USHORT, *PUSHORT; typedef unsigned short WORD, *PWORD; typedef int INT, *PINT;; typedef unsigned int UINT, *PUINT; -typedef int LONG, *PLONG; /* 32-bit */ +typedef int LONG, *PLONG; /* 32-bit */ typedef unsigned int ULONG, *PULONG; /* 32-bit */ typedef unsigned int DWORD, *PDWORD; /* 32-bit */ typedef unsigned long ULONG_PTR; typedef const comedi_lrange *PCRANGE; -#define LOBYTE(W) (BYTE )((W)&0xFF) -#define HIBYTE(W) (BYTE )(((W)>>8)&0xFF) -#define MAKEWORD(H,L) (USHORT )((L)|( (H)<<8) ) -#define LOWORD(W) (USHORT )((W)&0xFFFF) -#define HIWORD(W) (USHORT )(((W)>>16)&0xFFFF) -#define MAKEDWORD(H,L) (UINT )((L)|( (H)<<16) ) - -#define ADDI_ENABLE 1 -#define ADDI_DISABLE 0 -#define APCI1710_SAVE_INTERRUPT 1 - -#define ADDIDATA_EEPROM 1 -#define ADDIDATA_NO_EEPROM 0 -#define ADDIDATA_93C76 "93C76" -#define ADDIDATA_S5920 "S5920" -#define ADDIDATA_S5933 "S5933" -#define ADDIDATA_9054 "9054" - -//ADDIDATA Enable Disable -#define ADDIDATA_ENABLE 1 -#define ADDIDATA_DISABLE 0 -// Structures -// structure for the boardtype -typedef struct { +#define LOBYTE(W) (BYTE)((W) & 0xFF) +#define HIBYTE(W) (BYTE)(((W) >> 8) & 0xFF) +#define MAKEWORD(H, L) (USHORT)((L) | ((H) << 8)) +#define LOWORD(W) (USHORT)((W) & 0xFFFF) +#define HIWORD(W) (USHORT)(((W) >> 16) & 0xFFFF) +#define MAKEDWORD(H, L) (UINT)((L) | ((H) << 16)) + +#define ADDI_ENABLE 1 +#define ADDI_DISABLE 0 +#define APCI1710_SAVE_INTERRUPT 1 + +#define ADDIDATA_EEPROM 1 +#define ADDIDATA_NO_EEPROM 0 +#define ADDIDATA_93C76 "93C76" +#define ADDIDATA_S5920 "S5920" +#define ADDIDATA_S5933 "S5933" +#define ADDIDATA_9054 "9054" + +/* ADDIDATA Enable Disable */ +#define ADDIDATA_ENABLE 1 +#define ADDIDATA_DISABLE 0 + +/* Structures */ +/* structure for the boardtype */ +typedef struct { PCSTR pc_DriverName; // driver name INT i_VendorId; //PCI vendor a device ID of card INT i_DeviceId; @@ -136,84 +110,118 @@ typedef struct { UINT ui_MinAcquisitiontimeNs; // Minimum Acquisition in Nano secs UINT ui_MinDelaytimeNs; // Minimum Delay in Nano secs -// interrupt and reset - void (*v_hwdrv_Interrupt) (int irq, void *d); - int (*i_hwdrv_Reset) (comedi_device * dev); - -//Subdevice functions -//ANALOG INPUT - - int (*i_hwdrv_InsnConfigAnalogInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnReadAnalogInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnWriteAnalogInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnBitsAnalogInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_CommandTestAnalogInput) (comedi_device * dev, - comedi_subdevice * s, comedi_cmd * cmd); - int (*i_hwdrv_CommandAnalogInput) (comedi_device * dev, - comedi_subdevice * s); - int (*i_hwdrv_CancelAnalogInput) (comedi_device * dev, - comedi_subdevice * s); - -//Analog Output - int (*i_hwdrv_InsnConfigAnalogOutput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnWriteAnalogOutput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnBitsAnalogOutput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -//Digital Input - int (*i_hwdrv_InsnConfigDigitalInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnReadDigitalInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnWriteDigitalInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnBitsDigitalInput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -//Digital Output - int (*i_hwdrv_InsnConfigDigitalOutput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnWriteDigitalOutput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnBitsDigitalOutput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnReadDigitalOutput) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -//TIMER - int (*i_hwdrv_InsnConfigTimer) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnWriteTimer) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnReadTimer) (comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - int (*i_hwdrv_InsnBitsTimer) (comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - -//TTL IO - int (*i_hwdr_ConfigInitTTLIO) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdr_ReadTTLIOBits) (comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - int (*i_hwdr_ReadTTLIOAllPortValue) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - int (*i_hwdr_WriteTTLIOChlOnOff) (comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); + /* interrupt and reset */ + void (*v_hwdrv_Interrupt)(int irq, void *d); + int (*i_hwdrv_Reset)(comedi_device *dev); + + /* Subdevice functions */ + + /* ANALOG INPUT */ + int (*i_hwdrv_InsnConfigAnalogInput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnReadAnalogInput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnWriteAnalogInput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnBitsAnalogInput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_CommandTestAnalogInput)(comedi_device *dev, + comedi_subdevice *s, + comedi_cmd *cmd); + int (*i_hwdrv_CommandAnalogInput)(comedi_device *dev, + comedi_subdevice *s); + int (*i_hwdrv_CancelAnalogInput)(comedi_device *dev, + comedi_subdevice *s); + + /* Analog Output */ + int (*i_hwdrv_InsnConfigAnalogOutput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnWriteAnalogOutput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnBitsAnalogOutput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + + /* Digital Input */ + int (*i_hwdrv_InsnConfigDigitalInput) (comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnReadDigitalInput) (comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnWriteDigitalInput) (comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnBitsDigitalInput) (comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + + /* Digital Output */ + int (*i_hwdrv_InsnConfigDigitalOutput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnWriteDigitalOutput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnBitsDigitalOutput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnReadDigitalOutput)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + + /* TIMER */ + int (*i_hwdrv_InsnConfigTimer)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + int (*i_hwdrv_InsnWriteTimer)(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); + int (*i_hwdrv_InsnReadTimer)(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + int (*i_hwdrv_InsnBitsTimer)(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + + /* TTL IO */ + int (*i_hwdr_ConfigInitTTLIO)(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); + int (*i_hwdr_ReadTTLIOBits)(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + int (*i_hwdr_ReadTTLIOAllPortValue)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + int (*i_hwdr_WriteTTLIOChlOnOff)(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); } boardtype; //MODULE INFO STRUCTURE typedef union { - /*****************************/ /* Incremental counter infos */ - /*****************************/ - struct { union { struct { @@ -237,10 +245,7 @@ typedef union { } s_SiemensCounterInfo; - /*************/ /* SSI infos */ - /*************/ - struct { BYTE b_SSIProfile; BYTE b_PositionTurnLength; @@ -248,19 +253,13 @@ typedef union { BYTE b_SSIInit; } s_SSICounterInfo; - /*****************/ /* TTL I/O infos */ - /*****************/ - struct { BYTE b_TTLInit; BYTE b_PortConfiguration[4]; } s_TTLIOInfo; - /*********************/ /* Digital I/O infos */ - /*********************/ - struct { BYTE b_DigitalInit; BYTE b_ChannelAMode; @@ -312,10 +311,7 @@ typedef union { DWORD dw_StatusRegister; } s_PulseEncoderModuleInfo; - /********************/ /* Tor conter infos */ - /********************/ - struct { struct { BYTE b_TorCounterInit; @@ -327,10 +323,7 @@ typedef union { BYTE b_PCIInputClock; } s_TorCounterModuleInfo; - /*************/ /* PWM infos */ - /*************/ - struct { struct { BYTE b_PWMInit; @@ -344,10 +337,7 @@ typedef union { BYTE b_ClockSelection; } s_PWMModuleInfo; - /*************/ /* ETM infos */ - /*************/ - struct { struct { BYTE b_ETMEnable; @@ -360,10 +350,7 @@ typedef union { ULONG ul_Timing; } s_ETMModuleInfo; - /*************/ /* CDA infos */ - /*************/ - struct { BYTE b_CDAEnable; BYTE b_CDAInterrupt; @@ -373,8 +360,8 @@ typedef union { } s_CDAModuleInfo; } str_ModuleInfo; -// Private structure for the addi_apci3120 driver +/* Private structure for the addi_apci3120 driver */ typedef struct { INT iobase; @@ -432,34 +419,31 @@ typedef struct { UINT ui_EocEosConversionTime; BYTE b_EocEosConversionTimeBase; BYTE b_SingelDiff; - BYTE b_ExttrigEnable; // To enable or disable external trigger + BYTE b_ExttrigEnable; /* To enable or disable external trigger */ - struct task_struct *tsk_Current; // Pointer to the current process + /* Pointer to the current process */ + struct task_struct *tsk_Current; boardtype *ps_BoardInfo; - // Hardware board infos for 1710 - + /* Hardware board infos for 1710 */ struct { - UINT ui_Address; // Board address + UINT ui_Address; /* Board address */ UINT ui_FlashAddress; - BYTE b_InterruptNbr; // Board interrupt number - BYTE b_SlotNumber; // PCI slot number + BYTE b_InterruptNbr; /* Board interrupt number */ + BYTE b_SlotNumber; /* PCI slot number */ BYTE b_BoardVersion; - DWORD dw_MolduleConfiguration[4]; // Module configuration + DWORD dw_MolduleConfiguration[4]; /* Module config */ } s_BoardInfos; - /*******************/ /* Interrupt infos */ - /*******************/ - struct { - ULONG ul_InterruptOccur; /* 0 : No interrupt occur */ - /* > 0 : Interrupt occur */ - UINT ui_Read; /* Read FIFO */ - UINT ui_Write; /* Write FIFO */ + ULONG ul_InterruptOccur; /* 0 : No interrupt occur */ + /* > 0 : Interrupt occur */ + UINT ui_Read; /* Read FIFO */ + UINT ui_Write; /* Write FIFO */ struct { BYTE b_OldModuleMask; - ULONG ul_OldInterruptMask; /* Interrupt mask */ + ULONG ul_OldInterruptMask; /* Interrupt mask */ ULONG ul_OldCounterLatchValue; /* Interrupt counter value */ } s_FIFOInterruptParameters[APCI1710_SAVE_INTERRUPT]; } s_InterruptParameters; @@ -469,14 +453,13 @@ typedef struct { } addi_private; -static unsigned short pci_list_builded = 0; /* set to 1 when list of card is known */ - -//Function declarations +static unsigned short pci_list_builded; /* set to 1 when list of card is known */ -static int i_ADDI_Attach(comedi_device * dev, comedi_devconfig * it); -static int i_ADDI_Detach(comedi_device * dev); -static int i_ADDI_Reset(comedi_device * dev); +/* Function declarations */ +static int i_ADDI_Attach(comedi_device *dev, comedi_devconfig *it); +static int i_ADDI_Detach(comedi_device *dev); +static int i_ADDI_Reset(comedi_device *dev); static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG); -static int i_ADDIDATA_InsnReadEeprom(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +static int i_ADDIDATA_InsnReadEeprom(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/amcc_s5933_58.h +++ b/drivers/staging/comedi/drivers/addi-data/amcc_s5933_58.h @@ -219,21 +219,25 @@ struct pcilst_struct *amcc_devices; // p void v_pci_card_list_init(unsigned short pci_vendor, char display); void v_pci_card_list_cleanup(unsigned short pci_vendor); struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id, - unsigned short device_id); + unsigned short + device_id); int i_find_free_pci_card_by_position(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot, struct pcilst_struct **card); + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot, + struct pcilst_struct **card); struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot); + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot); int i_pci_card_alloc(struct pcilst_struct *amcc); int i_pci_card_free(struct pcilst_struct *amcc); void v_pci_card_list_display(void); int i_pci_card_data(struct pcilst_struct *amcc, - unsigned char *pci_bus, unsigned char *pci_slot, - unsigned char *pci_func, unsigned short *io_addr, unsigned short *irq, - unsigned short *master); + unsigned char *pci_bus, unsigned char *pci_slot, + unsigned char *pci_func, unsigned short *io_addr, + unsigned short *irq, unsigned short *master); /****************************************************************************/ @@ -273,7 +277,7 @@ void v_pci_card_list_init(unsigned short amcc->pci_func = PCI_FUNC(pcidev->devfn); for (i = 0; i < 5; i++) amcc->io_addr[i] = - pcidev->base_address[i] & ~3UL; + pcidev->base_address[i] & ~3UL; amcc->irq = pcidev->irq; #else amcc->vendor = pcidev->vendor; @@ -286,7 +290,7 @@ void v_pci_card_list_init(unsigned short amcc->pci_func = PCI_FUNC(pcidev->devfn); for (i = 0; i < 5; i++) amcc->io_addr[i] = - pcidev->resource[i].start & ~3UL; + pcidev->resource[i].start & ~3UL; amcc->irq = pcidev->irq; #endif @@ -314,14 +318,14 @@ void v_pci_card_list_cleanup(unsigned sh /****************************************************************************/ /* find first unused card with this device_id */ struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id, - unsigned short device_id) + unsigned short device_id) { struct pcilst_struct *amcc, *next; for (amcc = amcc_devices; amcc; amcc = next) { next = amcc->next; if ((!amcc->used) && (amcc->device == device_id) - && (amcc->vendor == vendor_id)) + && (amcc->vendor == vendor_id)) return amcc; } @@ -332,8 +336,10 @@ struct pcilst_struct *ptr_find_free_pci_ /****************************************************************************/ /* find card on requested position */ int i_find_free_pci_card_by_position(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot, struct pcilst_struct **card) + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot, + struct pcilst_struct **card) { struct pcilst_struct *amcc, *next; @@ -341,15 +347,15 @@ int i_find_free_pci_card_by_position(uns for (amcc = amcc_devices; amcc; amcc = next) { next = amcc->next; if ((amcc->vendor == vendor_id) && (amcc->device == device_id) - && (amcc->pci_bus == pci_bus) - && (amcc->pci_slot == pci_slot)) { + && (amcc->pci_bus == pci_bus) + && (amcc->pci_slot == pci_slot)) { if (!(amcc->used)) { *card = amcc; return 0; // ok, card is found } else { rt_printk - (" - \nCard on requested position is used b:s %d:%d!\n", - pci_bus, pci_slot); + (" - \nCard on requested position is used b:s %d:%d!\n", + pci_bus, pci_slot); return 2; // card exist but is used } } @@ -395,7 +401,11 @@ void v_pci_card_list_display(void) for (amcc = amcc_devices; amcc; amcc = next) { next = amcc->next; - printk("%2d %2d %2d 0x%4x 0x%4x %3s 0x%4x 0x%4x %2d %2d\n", amcc->pci_bus, amcc->pci_slot, amcc->pci_func, amcc->vendor, amcc->device, amcc->master ? "yes" : "no", amcc->io_addr[0], amcc->io_addr[2], amcc->irq, amcc->used); + printk + ("%2d %2d %2d 0x%4x 0x%4x %3s 0x%4x 0x%4x %2d %2d\n", + amcc->pci_bus, amcc->pci_slot, amcc->pci_func, + amcc->vendor, amcc->device, amcc->master ? "yes" : "no", + amcc->io_addr[0], amcc->io_addr[2], amcc->irq, amcc->used); } } @@ -403,9 +413,9 @@ void v_pci_card_list_display(void) /****************************************************************************/ /* return all card information for driver */ int i_pci_card_data(struct pcilst_struct *amcc, - unsigned char *pci_bus, unsigned char *pci_slot, - unsigned char *pci_func, unsigned short *io_addr, unsigned short *irq, - unsigned short *master) + unsigned char *pci_bus, unsigned char *pci_slot, + unsigned char *pci_func, unsigned short *io_addr, + unsigned short *irq, unsigned short *master) { int i; @@ -424,29 +434,32 @@ int i_pci_card_data(struct pcilst_struct /****************************************************************************/ /* select and alloc card */ struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id, - unsigned short device_id, unsigned short pci_bus, - unsigned short pci_slot) + unsigned short device_id, + unsigned short pci_bus, + unsigned short pci_slot) { struct pcilst_struct *card; if ((pci_bus < 1) & (pci_slot < 1)) { // use autodetection if ((card = ptr_find_free_pci_card_by_device(vendor_id, - device_id)) == NULL) { + device_id)) == + NULL) { rt_printk(" - Unused card not found in system!\n"); return NULL; } } else { switch (i_find_free_pci_card_by_position(vendor_id, device_id, - pci_bus, pci_slot, &card)) { + pci_bus, pci_slot, + &card)) { case 1: rt_printk - (" - Card not found on requested position b:s %d:%d!\n", - pci_bus, pci_slot); + (" - Card not found on requested position b:s %d:%d!\n", + pci_bus, pci_slot); return NULL; case 2: rt_printk - (" - Card on requested position is used b:s %d:%d!\n", - pci_bus, pci_slot); + (" - Card on requested position is used b:s %d:%d!\n", + pci_bus, pci_slot); return NULL; } } --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h @@ -1,84 +1,73 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define APCI1710_PCI_BUS_CLOCK 0 -#define APCI1710_FRONT_CONNECTOR_INPUT 1 -#define APCI1710_TIMER_READVALUE 0 -#define APCI1710_TIMER_GETOUTPUTLEVEL 1 -#define APCI1710_TIMER_GETPROGRESSSTATUS 2 -#define APCI1710_TIMER_WRITEVALUE 3 +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define APCI1710_PCI_BUS_CLOCK 0 +#define APCI1710_FRONT_CONNECTOR_INPUT 1 +#define APCI1710_TIMER_READVALUE 0 +#define APCI1710_TIMER_GETOUTPUTLEVEL 1 +#define APCI1710_TIMER_GETPROGRESSSTATUS 2 +#define APCI1710_TIMER_WRITEVALUE 3 -#define APCI1710_TIMER_READINTERRUPT 1 -#define APCI1710_TIMER_READALLTIMER 2 +#define APCI1710_TIMER_READINTERRUPT 1 +#define APCI1710_TIMER_READALLTIMER 2 -// BEGIN JK 27.10.03 : Add the possibility to use a 40 Mhz quartz +/* BEGIN JK 27.10.03 : Add the possibility to use a 40 Mhz quartz */ #ifndef APCI1710_10MHZ -#define APCI1710_10MHZ 10 +#define APCI1710_10MHZ 10 #endif -// END JK 27.10.03 : Add the possibility to use a 40 Mhz quartz +/* END JK 27.10.03 : Add the possibility to use a 40 Mhz quartz */ /* -+----------------------------------------------------------------------------+ -| 82X54 TIMER INISIALISATION FUNCTION | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnConfigInitTimer(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); + * 82X54 TIMER INISIALISATION FUNCTION + */ +INT i_APCI1710_InsnConfigInitTimer(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); /* -+----------------------------------------------------------------------------+ -| 82X54 READ FUNCTION | -+----------------------------------------------------------------------------+ -*/ + * 82X54 READ FUNCTION + */ +INT i_APCI1710_InsnReadAllTimerValue(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1710_InsnReadAllTimerValue(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InsnBitsTimer(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_InsnBitsTimer(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); /* -+----------------------------------------------------------------------------+ -| 82X54 READ & WRITE FUNCTION | -+----------------------------------------------------------------------------+ -*/ -INT i_APCI1710_ReadTimerValue(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_TimerNbr, PULONG pul_TimerValue); - -INT i_APCI1710_GetTimerOutputLevel(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_TimerNbr, PBYTE pb_OutputLevel); - -INT i_APCI1710_GetTimerProgressStatus(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_TimerNbr, PBYTE pb_TimerStatus); + * 82X54 READ & WRITE FUNCTION + */ +INT i_APCI1710_ReadTimerValue(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_TimerNbr, + PULONG pul_TimerValue); + +INT i_APCI1710_GetTimerOutputLevel(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_TimerNbr, + PBYTE pb_OutputLevel); + +INT i_APCI1710_GetTimerProgressStatus(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_TimerNbr, + PBYTE pb_TimerStatus); /* -+----------------------------------------------------------------------------+ -| 82X54 WRITE FUNCTION | -+----------------------------------------------------------------------------+ -*/ -INT i_APCI1710_WriteTimerValue(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_TimerNbr, ULONG ul_WriteValue); + * 82X54 WRITE FUNCTION + */ +INT i_APCI1710_WriteTimerValue(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_TimerNbr, + ULONG ul_WriteValue); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h @@ -1,85 +1,74 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define APCI1710_30MHZ 30 -#define APCI1710_33MHZ 33 -#define APCI1710_40MHZ 40 +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ -#define APCI1710_SINGLE 0 -#define APCI1710_CONTINUOUS 1 +#define APCI1710_30MHZ 30 +#define APCI1710_33MHZ 33 +#define APCI1710_40MHZ 40 + +#define APCI1710_SINGLE 0 +#define APCI1710_CONTINUOUS 1 + +#define APCI1710_CHRONO_PROGRESS_STATUS 0 +#define APCI1710_CHRONO_READVALUE 1 +#define APCI1710_CHRONO_CONVERTVALUE 2 +#define APCI1710_CHRONO_READINTERRUPT 3 + +#define APCI1710_CHRONO_SET_CHANNELON 0 +#define APCI1710_CHRONO_SET_CHANNELOFF 1 +#define APCI1710_CHRONO_READ_CHANNEL 2 +#define APCI1710_CHRONO_READ_PORT 3 -#define APCI1710_CHRONO_PROGRESS_STATUS 0 -#define APCI1710_CHRONO_READVALUE 1 -#define APCI1710_CHRONO_CONVERTVALUE 2 -#define APCI1710_CHRONO_READINTERRUPT 3 +/* + * CHRONOMETER INISIALISATION FUNCTION + */ +INT i_APCI1710_InsnConfigInitChrono(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -#define APCI1710_CHRONO_SET_CHANNELON 0 -#define APCI1710_CHRONO_SET_CHANNELOFF 1 -#define APCI1710_CHRONO_READ_CHANNEL 2 -#define APCI1710_CHRONO_READ_PORT 3 +INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); /* -+----------------------------------------------------------------------------+ -| CHRONOMETER INISIALISATION FUNCTION | -+----------------------------------------------------------------------------+ + * CHRONOMETER READ FUNCTION */ +INT i_APCI1710_InsnReadChrono(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1710_InsnConfigInitChrono(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_GetChronoProgressStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_ChronoStatus); -INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_ReadChronoValue(comedi_device *dev, + BYTE b_ModulNbr, + UINT ui_TimeOut, PBYTE pb_ChronoStatus, + PULONG pul_ChronoValue); + +INT i_APCI1710_ConvertChronoValue(comedi_device *dev, + BYTE b_ModulNbr, + ULONG ul_ChronoValue, + PULONG pul_Hour, + PBYTE pb_Minute, + PBYTE pb_Second, + PUINT pui_MilliSecond, PUINT pui_MicroSecond, + PUINT pui_NanoSecond); /* -+----------------------------------------------------------------------------+ -| CHRONOMETER READ FUNCTION | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnReadChrono(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_GetChronoProgressStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_ChronoStatus); - -INT i_APCI1710_ReadChronoValue(comedi_device * dev, - BYTE b_ModulNbr, - UINT ui_TimeOut, PBYTE pb_ChronoStatus, PULONG pul_ChronoValue); - -INT i_APCI1710_ConvertChronoValue(comedi_device * dev, - BYTE b_ModulNbr, - ULONG ul_ChronoValue, - PULONG pul_Hour, - PBYTE pb_Minute, - PBYTE pb_Second, - PUINT pui_MilliSecond, PUINT pui_MicroSecond, PUINT pui_NanoSecond); - -/* -+----------------------------------------------------------------------------+ -| CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnBitsChronoDigitalIO(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); + * CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION + */ +INT i_APCI1710_InsnBitsChronoDigitalIO(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h @@ -1,55 +1,46 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ -#define APCI1710_ON 1 // Digital Output ON or OFF -#define APCI1710_OFF 0 +#define APCI1710_ON 1 /* Digital Output ON or OFF */ +#define APCI1710_OFF 0 -#define APCI1710_INPUT 0 // Digital I/O -#define APCI1710_OUTPUT 1 +#define APCI1710_INPUT 0 /* Digital I/O */ +#define APCI1710_OUTPUT 1 -#define APCI1710_DIGIO_MEMORYONOFF 0x10 // -#define APCI1710_DIGIO_INIT 0x11 +#define APCI1710_DIGIO_MEMORYONOFF 0x10 +#define APCI1710_DIGIO_INIT 0x11 /* -+----------------------------------------------------------------------------+ -| DIGITAL I/O INISIALISATION FUNCTION | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnConfigDigitalIO(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); + * DIGITAL I/O INISIALISATION FUNCTION + */ +INT i_APCI1710_InsnConfigDigitalIO(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); /* -+----------------------------------------------------------------------------+ -| INPUT OUTPUT FUNCTIONS | -+----------------------------------------------------------------------------+ -*/ -INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InsnBitsDigitalIOPortOnOff(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); + * INPUT OUTPUT FUNCTIONS + */ +INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_InsnBitsDigitalIOPortOnOff(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h @@ -1,81 +1,73 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define APCI1710_16BIT_COUNTER 0x10 -#define APCI1710_32BIT_COUNTER 0x0 -#define APCI1710_QUADRUPLE_MODE 0x0 -#define APCI1710_DOUBLE_MODE 0x3 -#define APCI1710_SIMPLE_MODE 0xF -#define APCI1710_DIRECT_MODE 0x80 -#define APCI1710_HYSTERESIS_ON 0x60 -#define APCI1710_HYSTERESIS_OFF 0x0 -#define APCI1710_INCREMENT 0x60 -#define APCI1710_DECREMENT 0x0 -#define APCI1710_LATCH_COUNTER 0x1 -#define APCI1710_CLEAR_COUNTER 0x0 -#define APCI1710_LOW 0x0 -#define APCI1710_HIGH 0x1 +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define APCI1710_16BIT_COUNTER 0x10 +#define APCI1710_32BIT_COUNTER 0x0 +#define APCI1710_QUADRUPLE_MODE 0x0 +#define APCI1710_DOUBLE_MODE 0x3 +#define APCI1710_SIMPLE_MODE 0xF +#define APCI1710_DIRECT_MODE 0x80 +#define APCI1710_HYSTERESIS_ON 0x60 +#define APCI1710_HYSTERESIS_OFF 0x0 +#define APCI1710_INCREMENT 0x60 +#define APCI1710_DECREMENT 0x0 +#define APCI1710_LATCH_COUNTER 0x1 +#define APCI1710_CLEAR_COUNTER 0x0 +#define APCI1710_LOW 0x0 +#define APCI1710_HIGH 0x1 /*********************/ /* Version 0600-0229 */ /*********************/ - -#define APCI1710_HIGH_EDGE_CLEAR_COUNTER 0x0 -#define APCI1710_HIGH_EDGE_LATCH_COUNTER 0x1 -#define APCI1710_LOW_EDGE_CLEAR_COUNTER 0x2 -#define APCI1710_LOW_EDGE_LATCH_COUNTER 0x3 -#define APCI1710_HIGH_EDGE_LATCH_AND_CLEAR_COUNTER 0x4 -#define APCI1710_LOW_EDGE_LATCH_AND_CLEAR_COUNTER 0x5 +#define APCI1710_HIGH_EDGE_CLEAR_COUNTER 0x0 +#define APCI1710_HIGH_EDGE_LATCH_COUNTER 0x1 +#define APCI1710_LOW_EDGE_CLEAR_COUNTER 0x2 +#define APCI1710_LOW_EDGE_LATCH_COUNTER 0x3 +#define APCI1710_HIGH_EDGE_LATCH_AND_CLEAR_COUNTER 0x4 +#define APCI1710_LOW_EDGE_LATCH_AND_CLEAR_COUNTER 0x5 #define APCI1710_SOURCE_0 0x0 #define APCI1710_SOURCE_1 0x1 -#define APCI1710_30MHZ 30 -#define APCI1710_33MHZ 33 -#define APCI1710_40MHZ 40 +#define APCI1710_30MHZ 30 +#define APCI1710_33MHZ 33 +#define APCI1710_40MHZ 40 #define APCI1710_ENABLE_LATCH_INT 0x80 #define APCI1710_DISABLE_LATCH_INT (~APCI1710_ENABLE_LATCH_INT) -#define APCI1710_INDEX_LATCH_COUNTER 0x10 -#define APCI1710_INDEX_AUTO_MODE 0x8 -#define APCI1710_ENABLE_INDEX 0x4 -#define APCI1710_DISABLE_INDEX (~APCI1710_ENABLE_INDEX) -#define APCI1710_ENABLE_LATCH_AND_CLEAR 0x8 -#define APCI1710_DISABLE_LATCH_AND_CLEAR (~APCI1710_ENABLE_LATCH_AND_CLEAR) +#define APCI1710_INDEX_LATCH_COUNTER 0x10 +#define APCI1710_INDEX_AUTO_MODE 0x8 +#define APCI1710_ENABLE_INDEX 0x4 +#define APCI1710_DISABLE_INDEX (~APCI1710_ENABLE_INDEX) +#define APCI1710_ENABLE_LATCH_AND_CLEAR 0x8 +#define APCI1710_DISABLE_LATCH_AND_CLEAR (~APCI1710_ENABLE_LATCH_AND_CLEAR) #define APCI1710_SET_LOW_INDEX_LEVEL 0x4 -#define APCI1710_SET_HIGH_INDEX_LEVEL (~APCI1710_SET_LOW_INDEX_LEVEL) +#define APCI1710_SET_HIGH_INDEX_LEVEL (~APCI1710_SET_LOW_INDEX_LEVEL) #define APCI1710_INVERT_INDEX_RFERENCE 0x2 #define APCI1710_DEFAULT_INDEX_RFERENCE (~APCI1710_INVERT_INDEX_RFERENCE) -#define APCI1710_ENABLE_INDEX_INT 0x1 -#define APCI1710_DISABLE_INDEX_INT (~APCI1710_ENABLE_INDEX_INT) +#define APCI1710_ENABLE_INDEX_INT 0x1 +#define APCI1710_DISABLE_INDEX_INT (~APCI1710_ENABLE_INDEX_INT) -#define APCI1710_ENABLE_FREQUENCY 0x4 -#define APCI1710_DISABLE_FREQUENCY (~APCI1710_ENABLE_FREQUENCY) +#define APCI1710_ENABLE_FREQUENCY 0x4 +#define APCI1710_DISABLE_FREQUENCY (~APCI1710_ENABLE_FREQUENCY) -#define APCI1710_ENABLE_FREQUENCY_INT 0x8 -#define APCI1710_DISABLE_FREQUENCY_INT (~APCI1710_ENABLE_FREQUENCY_INT) +#define APCI1710_ENABLE_FREQUENCY_INT 0x8 +#define APCI1710_DISABLE_FREQUENCY_INT (~APCI1710_ENABLE_FREQUENCY_INT) #define APCI1710_ENABLE_40MHZ_FREQUENCY 0x40 #define APCI1710_DISABLE_40MHZ_FREQUENCY (~APCI1710_ENABLE_40MHZ_FREQUENCY) @@ -83,187 +75,197 @@ You shoud also find the complete GPL in #define APCI1710_ENABLE_40MHZ_FILTER 0x80 #define APCI1710_DISABLE_40MHZ_FILTER (~APCI1710_ENABLE_40MHZ_FILTER) -#define APCI1710_ENABLE_COMPARE_INT 0x2 -#define APCI1710_DISABLE_COMPARE_INT (~APCI1710_ENABLE_COMPARE_INT) +#define APCI1710_ENABLE_COMPARE_INT 0x2 +#define APCI1710_DISABLE_COMPARE_INT (~APCI1710_ENABLE_COMPARE_INT) -#define APCI1710_ENABLE_INDEX_ACTION 0x20 -#define APCI1710_DISABLE_INDEX_ACTION (~APCI1710_ENABLE_INDEX_ACTION) -#define APCI1710_REFERENCE_HIGH 0x40 -#define APCI1710_REFERENCE_LOW (~APCI1710_REFERENCE_HIGH) - -#define APCI1710_TOR_GATE_LOW 0x40 -#define APCI1710_TOR_GATE_HIGH (~APCI1710_TOR_GATE_LOW) - -// INSN CONFIG -#define APCI1710_INCCPT_INITCOUNTER 100 -#define APCI1710_INCCPT_COUNTERAUTOTEST 101 -#define APCI1710_INCCPT_INITINDEX 102 -#define APCI1710_INCCPT_INITREFERENCE 103 -#define APCI1710_INCCPT_INITEXTERNALSTROBE 104 -#define APCI1710_INCCPT_INITCOMPARELOGIC 105 -#define APCI1710_INCCPT_INITFREQUENCYMEASUREMENT 106 - -// INSN READ -#define APCI1710_INCCPT_READLATCHREGISTERSTATUS 200 -#define APCI1710_INCCPT_READLATCHREGISTERVALUE 201 -#define APCI1710_INCCPT_READ16BITCOUNTERVALUE 202 -#define APCI1710_INCCPT_READ32BITCOUNTERVALUE 203 -#define APCI1710_INCCPT_GETINDEXSTATUS 204 -#define APCI1710_INCCPT_GETREFERENCESTATUS 205 -#define APCI1710_INCCPT_GETUASSTATUS 206 -#define APCI1710_INCCPT_GETCBSTATUS 207 -#define APCI1710_INCCPT_GET16BITCBSTATUS 208 -#define APCI1710_INCCPT_GETUDSTATUS 209 -#define APCI1710_INCCPT_GETINTERRUPTUDLATCHEDSTATUS 210 -#define APCI1710_INCCPT_READFREQUENCYMEASUREMENT 211 -#define APCI1710_INCCPT_READINTERRUPT 212 - -//INSN BITS -#define APCI1710_INCCPT_CLEARCOUNTERVALUE 300 -#define APCI1710_INCCPT_CLEARALLCOUNTERVALUE 301 -#define APCI1710_INCCPT_SETINPUTFILTER 302 -#define APCI1710_INCCPT_LATCHCOUNTER 303 -#define APCI1710_INCCPT_SETINDEXANDREFERENCESOURCE 304 -#define APCI1710_INCCPT_SETDIGITALCHLON 305 -#define APCI1710_INCCPT_SETDIGITALCHLOFF 306 - -// INSN WRITE -#define APCI1710_INCCPT_ENABLELATCHINTERRUPT 400 -#define APCI1710_INCCPT_DISABLELATCHINTERRUPT 401 -#define APCI1710_INCCPT_WRITE16BITCOUNTERVALUE 402 -#define APCI1710_INCCPT_WRITE32BITCOUNTERVALUE 403 -#define APCI1710_INCCPT_ENABLEINDEX 404 -#define APCI1710_INCCPT_DISABLEINDEX 405 -#define APCI1710_INCCPT_ENABLECOMPARELOGIC 406 -#define APCI1710_INCCPT_DISABLECOMPARELOGIC 407 -#define APCI1710_INCCPT_ENABLEFREQUENCYMEASUREMENT 408 -#define APCI1710_INCCPT_DISABLEFREQUENCYMEASUREMENT 409 +#define APCI1710_ENABLE_INDEX_ACTION 0x20 +#define APCI1710_DISABLE_INDEX_ACTION (~APCI1710_ENABLE_INDEX_ACTION) +#define APCI1710_REFERENCE_HIGH 0x40 +#define APCI1710_REFERENCE_LOW (~APCI1710_REFERENCE_HIGH) + +#define APCI1710_TOR_GATE_LOW 0x40 +#define APCI1710_TOR_GATE_HIGH (~APCI1710_TOR_GATE_LOW) + +/* INSN CONFIG */ +#define APCI1710_INCCPT_INITCOUNTER 100 +#define APCI1710_INCCPT_COUNTERAUTOTEST 101 +#define APCI1710_INCCPT_INITINDEX 102 +#define APCI1710_INCCPT_INITREFERENCE 103 +#define APCI1710_INCCPT_INITEXTERNALSTROBE 104 +#define APCI1710_INCCPT_INITCOMPARELOGIC 105 +#define APCI1710_INCCPT_INITFREQUENCYMEASUREMENT 106 + +/* INSN READ */ +#define APCI1710_INCCPT_READLATCHREGISTERSTATUS 200 +#define APCI1710_INCCPT_READLATCHREGISTERVALUE 201 +#define APCI1710_INCCPT_READ16BITCOUNTERVALUE 202 +#define APCI1710_INCCPT_READ32BITCOUNTERVALUE 203 +#define APCI1710_INCCPT_GETINDEXSTATUS 204 +#define APCI1710_INCCPT_GETREFERENCESTATUS 205 +#define APCI1710_INCCPT_GETUASSTATUS 206 +#define APCI1710_INCCPT_GETCBSTATUS 207 +#define APCI1710_INCCPT_GET16BITCBSTATUS 208 +#define APCI1710_INCCPT_GETUDSTATUS 209 +#define APCI1710_INCCPT_GETINTERRUPTUDLATCHEDSTATUS 210 +#define APCI1710_INCCPT_READFREQUENCYMEASUREMENT 211 +#define APCI1710_INCCPT_READINTERRUPT 212 + +/* INSN BITS */ +#define APCI1710_INCCPT_CLEARCOUNTERVALUE 300 +#define APCI1710_INCCPT_CLEARALLCOUNTERVALUE 301 +#define APCI1710_INCCPT_SETINPUTFILTER 302 +#define APCI1710_INCCPT_LATCHCOUNTER 303 +#define APCI1710_INCCPT_SETINDEXANDREFERENCESOURCE 304 +#define APCI1710_INCCPT_SETDIGITALCHLON 305 +#define APCI1710_INCCPT_SETDIGITALCHLOFF 306 + +/* INSN WRITE */ +#define APCI1710_INCCPT_ENABLELATCHINTERRUPT 400 +#define APCI1710_INCCPT_DISABLELATCHINTERRUPT 401 +#define APCI1710_INCCPT_WRITE16BITCOUNTERVALUE 402 +#define APCI1710_INCCPT_WRITE32BITCOUNTERVALUE 403 +#define APCI1710_INCCPT_ENABLEINDEX 404 +#define APCI1710_INCCPT_DISABLEINDEX 405 +#define APCI1710_INCCPT_ENABLECOMPARELOGIC 406 +#define APCI1710_INCCPT_DISABLECOMPARELOGIC 407 +#define APCI1710_INCCPT_ENABLEFREQUENCYMEASUREMENT 408 +#define APCI1710_INCCPT_DISABLEFREQUENCYMEASUREMENT 409 /************ Main Functions *************/ -INT i_APCI1710_InsnConfigINCCPT(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_InsnConfigINCCPT(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t * data); -INT i_APCI1710_InsnBitsINCCPT(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_InsnBitsINCCPT(comedi_device *dev, comedi_subdevice * s, + comedi_insn *insn, lsampl_t * data); -INT i_APCI1710_InsnWriteINCCPT(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_InsnWriteINCCPT(comedi_device *dev, comedi_subdevice * s, + comedi_insn *insn, lsampl_t * data); -INT i_APCI1710_InsnReadINCCPT(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_InsnReadINCCPT(comedi_device *dev, comedi_subdevice * s, + comedi_insn *insn, lsampl_t * data); /*********** Supplementary Functions********/ -// INSN CONFIG - -INT i_APCI1710_InitCounter(comedi_device * dev, - BYTE b_ModulNbr, - BYTE b_CounterRange, - BYTE b_FirstCounterModus, - BYTE b_FirstCounterOption, - BYTE b_SecondCounterModus, BYTE b_SecondCounterOption); - -INT i_APCI1710_CounterAutoTest(comedi_device * dev, PBYTE pb_TestStatus); - -INT i_APCI1710_InitIndex(comedi_device * dev, - BYTE b_ModulNbr, - BYTE b_ReferenceAction, - BYTE b_IndexOperation, BYTE b_AutoMode, BYTE b_InterruptEnable); +/* INSN CONFIG */ +INT i_APCI1710_InitCounter(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_CounterRange, + BYTE b_FirstCounterModus, + BYTE b_FirstCounterOption, + BYTE b_SecondCounterModus, + BYTE b_SecondCounterOption); -INT i_APCI1710_InitReference(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_ReferenceLevel); +INT i_APCI1710_CounterAutoTest(comedi_device *dev, PBYTE pb_TestStatus); -INT i_APCI1710_InitExternalStrobe(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_ExternalStrobe, BYTE b_ExternalStrobeLevel); +INT i_APCI1710_InitIndex(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_ReferenceAction, + BYTE b_IndexOperation, BYTE b_AutoMode, + BYTE b_InterruptEnable); -INT i_APCI1710_InitCompareLogic(comedi_device * dev, - BYTE b_ModulNbr, UINT ui_CompareValue); +INT i_APCI1710_InitReference(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_ReferenceLevel); -INT i_APCI1710_InitFrequencyMeasurement(comedi_device * dev, - BYTE b_ModulNbr, - BYTE b_PCIInputClock, - BYTE b_TimingUnity, - ULONG ul_TimingInterval, PULONG pul_RealTimingInterval); +INT i_APCI1710_InitExternalStrobe(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_ExternalStrobe, + BYTE b_ExternalStrobeLevel); -//INSN BITS +INT i_APCI1710_InitCompareLogic(comedi_device *dev, + BYTE b_ModulNbr, UINT ui_CompareValue); -INT i_APCI1710_ClearCounterValue(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_InitFrequencyMeasurement(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_PCIInputClock, + BYTE b_TimingUnity, + ULONG ul_TimingInterval, + PULONG pul_RealTimingInterval); -INT i_APCI1710_ClearAllCounterValue(comedi_device * dev); +/* INSN BITS */ +INT i_APCI1710_ClearCounterValue(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_SetInputFilter(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_PCIInputClock, BYTE b_Filter); +INT i_APCI1710_ClearAllCounterValue(comedi_device *dev); -INT i_APCI1710_LatchCounter(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_LatchReg); +INT i_APCI1710_SetInputFilter(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_PCIInputClock, + BYTE b_Filter); -INT i_APCI1710_SetIndexAndReferenceSource(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_SourceSelection); +INT i_APCI1710_LatchCounter(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_LatchReg); -INT i_APCI1710_SetDigitalChlOn(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_SetIndexAndReferenceSource(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_SourceSelection); -INT i_APCI1710_SetDigitalChlOff(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_SetDigitalChlOn(comedi_device *dev, BYTE b_ModulNbr); -// INSN WRITE -INT i_APCI1710_EnableLatchInterrupt(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_SetDigitalChlOff(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_DisableLatchInterrupt(comedi_device * dev, BYTE b_ModulNbr); +/* INSN WRITE */ +INT i_APCI1710_EnableLatchInterrupt(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_Write16BitCounterValue(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_SelectedCounter, UINT ui_WriteValue); +INT i_APCI1710_DisableLatchInterrupt(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_Write32BitCounterValue(comedi_device * dev, - BYTE b_ModulNbr, ULONG ul_WriteValue); +INT i_APCI1710_Write16BitCounterValue(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_SelectedCounter, + UINT ui_WriteValue); -INT i_APCI1710_EnableIndex(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_Write32BitCounterValue(comedi_device *dev, + BYTE b_ModulNbr, ULONG ul_WriteValue); -INT i_APCI1710_DisableIndex(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_EnableIndex(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_EnableCompareLogic(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_DisableIndex(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_DisableCompareLogic(comedi_device * dev, BYTE b_ModulNbr); +INT i_APCI1710_EnableCompareLogic(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_EnableFrequencyMeasurement(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_InterruptEnable); +INT i_APCI1710_DisableCompareLogic(comedi_device *dev, BYTE b_ModulNbr); -INT i_APCI1710_DisableFrequencyMeasurement(comedi_device * dev, - BYTE b_ModulNbr); +INT i_APCI1710_EnableFrequencyMeasurement(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_InterruptEnable); -// INSN READ +INT i_APCI1710_DisableFrequencyMeasurement(comedi_device *dev, + BYTE b_ModulNbr); -INT i_APCI1710_ReadLatchRegisterStatus(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_LatchReg, PBYTE pb_LatchStatus); +/* INSN READ */ +INT i_APCI1710_ReadLatchRegisterStatus(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_LatchReg, + PBYTE pb_LatchStatus); -INT i_APCI1710_ReadLatchRegisterValue(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_LatchReg, PULONG pul_LatchValue); +INT i_APCI1710_ReadLatchRegisterValue(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_LatchReg, + PULONG pul_LatchValue); -INT i_APCI1710_Read16BitCounterValue(comedi_device * dev, - BYTE b_ModulNbr, BYTE b_SelectedCounter, PUINT pui_CounterValue); +INT i_APCI1710_Read16BitCounterValue(comedi_device *dev, + BYTE b_ModulNbr, BYTE b_SelectedCounter, + PUINT pui_CounterValue); -INT i_APCI1710_Read32BitCounterValue(comedi_device * dev, - BYTE b_ModulNbr, PULONG pul_CounterValue); +INT i_APCI1710_Read32BitCounterValue(comedi_device *dev, + BYTE b_ModulNbr, PULONG pul_CounterValue); -INT i_APCI1710_GetIndexStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_IndexStatus); +INT i_APCI1710_GetIndexStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_IndexStatus); -INT i_APCI1710_GetReferenceStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_ReferenceStatus); +INT i_APCI1710_GetReferenceStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_ReferenceStatus); -INT i_APCI1710_GetUASStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_UASStatus); +INT i_APCI1710_GetUASStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_UASStatus); -INT i_APCI1710_GetCBStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_CBStatus); +INT i_APCI1710_GetCBStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_CBStatus); -INT i_APCI1710_Get16BitCBStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_CBStatusCounter0, PBYTE pb_CBStatusCounter1); +INT i_APCI1710_Get16BitCBStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_CBStatusCounter0, + PBYTE pb_CBStatusCounter1); -INT i_APCI1710_GetUDStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_UDStatus); +INT i_APCI1710_GetUDStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_UDStatus); -INT i_APCI1710_GetInterruptUDLatchedStatus(comedi_device * dev, - BYTE b_ModulNbr, PBYTE pb_UDStatus); +INT i_APCI1710_GetInterruptUDLatchedStatus(comedi_device *dev, + BYTE b_ModulNbr, PBYTE pb_UDStatus); -INT i_APCI1710_ReadFrequencyMeasurement(comedi_device * dev, - BYTE b_ModulNbr, - PBYTE pb_Status, PBYTE pb_UDStatus, PULONG pul_ReadValue); +INT i_APCI1710_ReadFrequencyMeasurement(comedi_device *dev, + BYTE b_ModulNbr, + PBYTE pb_Status, PBYTE pb_UDStatus, + PULONG pul_ReadValue); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h @@ -1,52 +1,47 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define APCI1710_SINGLE 0 -#define APCI1710_CONTINUOUS 1 - -#define APCI1710_PULSEENCODER_READ 0 -#define APCI1710_PULSEENCODER_WRITE 1 - -INT i_APCI1710_InsnConfigInitPulseEncoder(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); /* -+----------------------------------------------------------------------------+ -| READ PULSE ENCODER FUNCTIONS | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnReadInterruptPulseEncoder(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define APCI1710_SINGLE 0 +#define APCI1710_CONTINUOUS 1 + +#define APCI1710_PULSEENCODER_READ 0 +#define APCI1710_PULSEENCODER_WRITE 1 + +INT i_APCI1710_InsnConfigInitPulseEncoder(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); /* -+----------------------------------------------------------------------------+ -| WRITE PULSE ENCODER FUNCTIONS | -+----------------------------------------------------------------------------+ -*/ + * READ PULSE ENCODER FUNCTIONS + */ +INT i_APCI1710_InsnReadInterruptPulseEncoder(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); -INT i_APCI1710_InsnBitsReadWritePulseEncoder(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +/* + * WRITE PULSE ENCODER FUNCTIONS + */ +INT i_APCI1710_InsnBitsReadWritePulseEncoder(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h @@ -1,79 +1,76 @@ -/** -@verbatim +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define APCI1710_30MHZ 30 +#define APCI1710_33MHZ 33 +#define APCI1710_40MHZ 40 -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define APCI1710_30MHZ 30 -#define APCI1710_33MHZ 33 -#define APCI1710_40MHZ 40 - -#define APCI1710_PWM_INIT 0 +#define APCI1710_PWM_INIT 0 #define APCI1710_PWM_GETINITDATA 1 -#define APCI1710_PWM_DISABLE 0 -#define APCI1710_PWM_ENABLE 1 -#define APCI1710_PWM_NEWTIMING 2 - -INT i_APCI1710_InsnConfigPWM(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InitPWM(comedi_device * dev, - BYTE b_ModulNbr, - BYTE b_PWM, - BYTE b_ClockSelection, - BYTE b_TimingUnit, - ULONG ul_LowTiming, - ULONG ul_HighTiming, - PULONG pul_RealLowTiming, PULONG pul_RealHighTiming); - -INT i_APCI1710_GetPWMInitialisation(comedi_device * dev, - BYTE b_ModulNbr, - BYTE b_PWM, - PBYTE pb_TimingUnit, - PULONG pul_LowTiming, - PULONG pul_HighTiming, - PBYTE pb_StartLevel, - PBYTE pb_StopMode, - PBYTE pb_StopLevel, - PBYTE pb_ExternGate, PBYTE pb_InterruptEnable, PBYTE pb_Enable); - -INT i_APCI1710_InsnWritePWM(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_EnablePWM(comedi_device * dev, - BYTE b_ModulNbr, - BYTE b_PWM, - BYTE b_StartLevel, - BYTE b_StopMode, - BYTE b_StopLevel, BYTE b_ExternGate, BYTE b_InterruptEnable); - -INT i_APCI1710_SetNewPWMTiming(comedi_device * dev, - BYTE b_ModulNbr, - BYTE b_PWM, BYTE b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming); - -INT i_APCI1710_DisablePWM(comedi_device * dev, BYTE b_ModulNbr, BYTE b_PWM); - -INT i_APCI1710_InsnReadGetPWMStatus(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InsnBitsReadPWMInterrupt(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +#define APCI1710_PWM_DISABLE 0 +#define APCI1710_PWM_ENABLE 1 +#define APCI1710_PWM_NEWTIMING 2 + +INT i_APCI1710_InsnConfigPWM(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_InitPWM(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_PWM, + BYTE b_ClockSelection, + BYTE b_TimingUnit, + ULONG ul_LowTiming, + ULONG ul_HighTiming, + PULONG pul_RealLowTiming, PULONG pul_RealHighTiming); + +INT i_APCI1710_GetPWMInitialisation(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_PWM, + PBYTE pb_TimingUnit, + PULONG pul_LowTiming, + PULONG pul_HighTiming, + PBYTE pb_StartLevel, + PBYTE pb_StopMode, + PBYTE pb_StopLevel, + PBYTE pb_ExternGate, + PBYTE pb_InterruptEnable, PBYTE pb_Enable); + +INT i_APCI1710_InsnWritePWM(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_EnablePWM(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_PWM, + BYTE b_StartLevel, + BYTE b_StopMode, + BYTE b_StopLevel, BYTE b_ExternGate, + BYTE b_InterruptEnable); + +INT i_APCI1710_SetNewPWMTiming(comedi_device *dev, + BYTE b_ModulNbr, + BYTE b_PWM, BYTE b_TimingUnit, + ULONG ul_LowTiming, ULONG ul_HighTiming); + +INT i_APCI1710_DisablePWM(comedi_device *dev, BYTE b_ModulNbr, BYTE b_PWM); + +INT i_APCI1710_InsnReadGetPWMStatus(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_InsnBitsReadPWMInterrupt(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h @@ -1,52 +1,43 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define APCI1710_30MHZ 30 -#define APCI1710_33MHZ 33 -#define APCI1710_40MHZ 40 - -#define APCI1710_BINARY_MODE 0x1 -#define APCI1710_GRAY_MODE 0x0 - -#define APCI1710_SSI_READ1VALUE 1 -#define APCI1710_SSI_READALLVALUE 2 - -#define APCI1710_SSI_SET_CHANNELON 0 -#define APCI1710_SSI_SET_CHANNELOFF 1 -#define APCI1710_SSI_READ_1CHANNEL 2 -#define APCI1710_SSI_READ_ALLCHANNEL 3 +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define APCI1710_30MHZ 30 +#define APCI1710_33MHZ 33 +#define APCI1710_40MHZ 40 + +#define APCI1710_BINARY_MODE 0x1 +#define APCI1710_GRAY_MODE 0x0 + +#define APCI1710_SSI_READ1VALUE 1 +#define APCI1710_SSI_READALLVALUE 2 + +#define APCI1710_SSI_SET_CHANNELON 0 +#define APCI1710_SSI_SET_CHANNELOFF 1 +#define APCI1710_SSI_READ_1CHANNEL 2 +#define APCI1710_SSI_READ_ALLCHANNEL 3 /* -+----------------------------------------------------------------------------+ -| SSI INISIALISATION FUNCTION | -+----------------------------------------------------------------------------+ -*/ -INT i_APCI1710_InsnConfigInitSSI(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); + * SSI INISIALISATION FUNCTION + */ +INT i_APCI1710_InsnConfigInitSSI(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1710_InsnReadSSIValue(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_InsnReadSSIValue(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1710_InsnBitsSSIDigitalIO(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1710_InsnBitsSSIDigitalIO(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h @@ -1,63 +1,57 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define APCI1710_30MHZ 30 -#define APCI1710_33MHZ 33 -#define APCI1710_40MHZ 40 - -#define APCI1710_GATE_INPUT 10 - -#define APCI1710_TOR_SIMPLE_MODE 2 -#define APCI1710_TOR_DOUBLE_MODE 3 -#define APCI1710_TOR_QUADRUPLE_MODE 4 +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define APCI1710_30MHZ 30 +#define APCI1710_33MHZ 33 +#define APCI1710_40MHZ 40 + +#define APCI1710_GATE_INPUT 10 + +#define APCI1710_TOR_SIMPLE_MODE 2 +#define APCI1710_TOR_DOUBLE_MODE 3 +#define APCI1710_TOR_QUADRUPLE_MODE 4 -#define APCI1710_SINGLE 0 -#define APCI1710_CONTINUOUS 1 +#define APCI1710_SINGLE 0 +#define APCI1710_CONTINUOUS 1 #define APCI1710_TOR_GETPROGRESSSTATUS 0 #define APCI1710_TOR_GETCOUNTERVALUE 1 -#define APCI1710_TOR_READINTERRUPT 2 +#define APCI1710_TOR_READINTERRUPT 2 /* -+----------------------------------------------------------------------------+ -| TOR_COUNTER INISIALISATION FUNCTION | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnConfigInitTorCounter(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InsnWriteEnableDisableTorCounter(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -INT i_APCI1710_InsnReadGetTorCounterInitialisation(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); + * TOR_COUNTER INISIALISATION FUNCTION + */ +INT i_APCI1710_InsnConfigInitTorCounter(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +INT i_APCI1710_InsnWriteEnableDisableTorCounter(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + +INT i_APCI1710_InsnReadGetTorCounterInitialisation(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); /* -+----------------------------------------------------------------------------+ -| TOR_COUNTER READ FUNCTION | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); + * TOR_COUNTER READ FUNCTION + */ +INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h @@ -1,56 +1,44 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ -#define APCI1710_TTL_INIT 0 -#define APCI1710_TTL_INITDIRECTION 1 +#define APCI1710_TTL_INIT 0 +#define APCI1710_TTL_INITDIRECTION 1 #define APCI1710_TTL_READCHANNEL 0 #define APCI1710_TTL_READPORT 1 /* -+----------------------------------------------------------------------------+ -| TTL INISIALISATION FUNCTION | -+----------------------------------------------------------------------------+ -*/ + * TTL INISIALISATION FUNCTION + */ +INT i_APCI1710_InsnConfigInitTTLIO(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1710_InsnConfigInitTTLIO(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); /* -+----------------------------------------------------------------------------+ -| TTL INPUT FUNCTION | -+----------------------------------------------------------------------------+ -*/ + * TTL INPUT FUNCTION + */ +INT i_APCI1710_InsnBitsReadTTLIO(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1710_InsnBitsReadTTLIO(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); /* -+----------------------------------------------------------------------------+ -| TTL OUTPUT FUNCTIONS | -+----------------------------------------------------------------------------+ -*/ - -INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); + * TTL OUTPUT FUNCTIONS + */ +INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h @@ -1,29 +1,23 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ -// Card Specific information -#define APCI035_BOARD_VENDOR_ID 0x15B8 -#define APCI035_ADDRESS_RANGE 255 +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +/* Card Specific information */ +#define APCI035_BOARD_VENDOR_ID 0x15B8 +#define APCI035_ADDRESS_RANGE 255 INT i_TW_Number; struct { @@ -39,32 +33,31 @@ struct { INT i_ModuleSelection; } Config_Parameters_Main; -//ANALOG INPUT RANGE +/* ANALOG INPUT RANGE */ comedi_lrange range_apci035_ai = { 8, { - BIP_RANGE(10), - BIP_RANGE(5), - BIP_RANGE(2), - BIP_RANGE(1), - UNI_RANGE(10), - UNI_RANGE(5), - UNI_RANGE(2), - UNI_RANGE(1) - } + BIP_RANGE(10), + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1), + UNI_RANGE(10), + UNI_RANGE(5), + UNI_RANGE(2), + UNI_RANGE(1) + } }; -// Timer / Watchdog Related Defines - -#define APCI035_TCW_SYNC_ENABLEDISABLE 0 -#define APCI035_TCW_RELOAD_VALUE 4 -#define APCI035_TCW_TIMEBASE 8 -#define APCI035_TCW_PROG 12 -#define APCI035_TCW_TRIG_STATUS 16 -#define APCI035_TCW_IRQ 20 -#define APCI035_TCW_WARN_TIMEVAL 24 -#define APCI035_TCW_WARN_TIMEBASE 28 +/* Timer / Watchdog Related Defines */ +#define APCI035_TCW_SYNC_ENABLEDISABLE 0 +#define APCI035_TCW_RELOAD_VALUE 4 +#define APCI035_TCW_TIMEBASE 8 +#define APCI035_TCW_PROG 12 +#define APCI035_TCW_TRIG_STATUS 16 +#define APCI035_TCW_IRQ 20 +#define APCI035_TCW_WARN_TIMEVAL 24 +#define APCI035_TCW_WARN_TIMEBASE 28 -#define ADDIDATA_TIMER 0 -//#define ADDIDATA_WATCHDOG 1 +#define ADDIDATA_TIMER 0 +/* #define ADDIDATA_WATCHDOG 1 */ #define APCI035_TW1 0 #define APCI035_TW2 32 @@ -80,50 +73,51 @@ comedi_lrange range_apci035_ai = { 8, { #define APCI035_EOS 20 #define APCI035_CHAN_NO 24 #define APCI035_CHAN_VAL 28 -#define APCI035_CONV_TIME_TIME_BASE 36 -#define APCI035_RELOAD_CONV_TIME_VAL 32 -#define APCI035_DELAY_TIME_TIME_BASE 44 -#define APCI035_RELOAD_DELAY_TIME_VAL 40 -#define ENABLE_EXT_TRIG 1 -#define ENABLE_EXT_GATE 2 -#define ENABLE_EXT_TRIG_GATE 3 - -#define ANALOG_INPUT 0 -#define TEMPERATURE 1 -#define RESISTANCE 2 +#define APCI035_CONV_TIME_TIME_BASE 36 +#define APCI035_RELOAD_CONV_TIME_VAL 32 +#define APCI035_DELAY_TIME_TIME_BASE 44 +#define APCI035_RELOAD_DELAY_TIME_VAL 40 +#define ENABLE_EXT_TRIG 1 +#define ENABLE_EXT_GATE 2 +#define ENABLE_EXT_TRIG_GATE 3 + +#define ANALOG_INPUT 0 +#define TEMPERATURE 1 +#define RESISTANCE 2 -#define ADDIDATA_GREATER_THAN_TEST 0 -#define ADDIDATA_LESS_THAN_TEST 1 +#define ADDIDATA_GREATER_THAN_TEST 0 +#define ADDIDATA_LESS_THAN_TEST 1 #define APCI035_MAXVOLT 2.5 #define ADDIDATA_UNIPOLAR 1 #define ADDIDATA_BIPOLAR 2 -//ADDIDATA Enable Disable -#define ADDIDATA_ENABLE 1 -#define ADDIDATA_DISABLE 0 - -// Hardware Layer functions for Apci035 - -// TIMER -// timer value is passed as u seconds -INT i_APCI035_ConfigTimerWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -INT i_APCI035_ReadTimerWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); - -//Temperature Related Defines (Analog Input Subdevice) - -INT i_APCI035_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI035_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +/* ADDIDATA Enable Disable */ +#define ADDIDATA_ENABLE 1 +#define ADDIDATA_DISABLE 0 + +/* Hardware Layer functions for Apci035 */ + +/* TIMER */ +/* timer value is passed as u seconds */ +INT i_APCI035_ConfigTimerWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI035_ReadTimerWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); + +/* Temperature Related Defines (Analog Input Subdevice) */ + +INT i_APCI035_ConfigAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI035_ReadAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -//Interrupt +/* Interrupt */ static void v_APCI035_Interrupt(int irq, void *d); -//Reset functions -INT i_APCI035_Reset(comedi_device * dev); +/* Reset functions */ +INT i_APCI035_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ /********* Definitions for APCI-1032 card *****/ @@ -54,17 +47,17 @@ You shoud also find the complete GPL in //DI // for di read -INT i_APCI1032_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1032_ConfigDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1032_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1032_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -INT i_APCI1032_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // Interrupt functions..... static VOID v_APCI1032_Interrupt(int irq, void *d); //Reset -INT i_APCI1032_Reset(comedi_device * dev); +INT i_APCI1032_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ /********* Definitions for APCI-1500 card *****/ @@ -53,9 +46,10 @@ You shoud also find the complete GPL in #define START 0 #define STOP 1 #define TRIGGER 2 - /**************************/ - /* Zillog I/O enumeration */ - /**************************/ + +/* + * Zillog I/O enumeration + */ enum { APCI1500_Z8536_PORT_C, APCI1500_Z8536_PORT_B, @@ -63,10 +57,9 @@ enum { APCI1500_Z8536_CONTROL_REGISTER }; - /******************************/ - /* Z8536 CIO Internal Address */ - /******************************/ - +/* + * Z8536 CIO Internal Address + */ enum { APCI1500_RW_MASTER_INTERRUPT_CONTROL, APCI1500_RW_MASTER_CONFIGURATION_CONTROL, @@ -123,35 +116,50 @@ enum { }; /*----------DIGITAL INPUT----------------*/ -static int i_APCI1500_Initialisation(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -static int i_APCI1500_ConfigDigitalInputEvent(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -static int i_APCI1500_StartStopInputEvent(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -static int i_APCI1500_ReadMoreDigitalInput(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +static int i_APCI1500_Initialisation(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +static int i_APCI1500_ConfigDigitalInputEvent(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); + +static int i_APCI1500_StartStopInputEvent(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +static int i_APCI1500_ReadMoreDigitalInput(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); /*---------- DIGITAL OUTPUT------------*/ -static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -static int i_APCI1500_WriteDigitalOutput(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); +static int i_APCI1500_WriteDigitalOutput(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); /*----------TIMER----------------*/ -static int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -static int i_APCI1500_ReadCounterTimerWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -static int i_APCI1500_ReadInterruptMask(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +static int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); +static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); +static int i_APCI1500_ReadCounterTimerWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); +static int i_APCI1500_ReadInterruptMask(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); /*----------INTERRUPT HANDLER------*/ static void v_APCI1500_Interrupt(int irq, void *d); -static int i_APCI1500_ConfigureInterrupt(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +static int i_APCI1500_ConfigureInterrupt(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); /*----------RESET---------------*/ -static int i_APCI1500_Reset(comedi_device * dev); +static int i_APCI1500_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ /********* Definitions for APCI-1516 card *****/ @@ -45,27 +38,27 @@ You shoud also find the complete GPL in // Hardware Layer functions for Apci1516 //Digital Input -INT i_APCI1516_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1516_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1516_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1516_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //Digital Output -int i_APCI1516_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1516_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1516_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI1516_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1516_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1516_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // TIMER // timer value is passed as u seconds -int i_APCI1516_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI1516_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI1516_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI1516_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI1516_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI1516_ReadWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //reset -INT i_APCI1516_Reset(comedi_device * dev); +INT i_APCI1516_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ /********* Definitions for APCI-1564 card *****/ @@ -89,34 +82,38 @@ You shoud also find the complete GPL in //DI // for di read -INT i_APCI1564_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1564_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1564_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI1564_ConfigDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1564_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1564_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //DO -int i_APCI1564_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1564_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI1564_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI1564_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI1564_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1564_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI1564_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI1564_ReadInterruptStatus(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // TIMER // timer value is passed as u seconds -INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -int i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -int i_APCI1564_ReadTimerCounterWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); +int i_APCI1564_ReadTimerCounterWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // INTERRUPT static VOID v_APCI1564_Interrupt(int irq, void *d); // RESET -INT i_APCI1564_Reset(comedi_device * dev); +INT i_APCI1564_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ #ifndef COMEDI_SUBD_TTLIO #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ @@ -50,17 +43,17 @@ You shoud also find the complete GPL in static const comedi_lrange range_apci16xx_ttl = { 12, {BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1)} + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1)} }; /* @@ -69,8 +62,9 @@ static const comedi_lrange range_apci16x +----------------------------------------------------------------------------+ */ -int i_APCI16XX_InsnConfigInitTTLIO(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +int i_APCI16XX_InsnConfigInitTTLIO(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); /* +----------------------------------------------------------------------------+ @@ -78,11 +72,13 @@ int i_APCI16XX_InsnConfigInitTTLIO(comed +----------------------------------------------------------------------------+ */ -int i_APCI16XX_InsnBitsReadTTLIO(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); - -int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +int i_APCI16XX_InsnBitsReadTTLIO(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); + +int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); /* +----------------------------------------------------------------------------+ @@ -90,8 +86,9 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue +----------------------------------------------------------------------------+ */ -int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); -int i_APCI16XX_Reset(comedi_device * dev); +int i_APCI16XX_Reset(comedi_device *dev); #endif --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.h @@ -1,78 +1,71 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ - -#define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ -#define COMEDI_SUBD_PWM 12 /* Pulse width Measurement */ -#define COMEDI_SUBD_SSI 13 /* Synchronous serial interface */ -#define COMEDI_SUBD_TOR 14 /* Tor counter */ -#define COMEDI_SUBD_CHRONO 15 /* Chrono meter */ -#define COMEDI_SUBD_PULSEENCODER 16 /* Pulse Encoder INP CPT */ -#define COMEDI_SUBD_INCREMENTALCOUNTER 17 /* Incremental Counter */ - -#define APCI1710_BOARD_NAME "apci1710" -#define APCI1710_BOARD_VENDOR_ID 0x10E8 -#define APCI1710_BOARD_DEVICE_ID 0x818F -#define APCI1710_ADDRESS_RANGE 256 -#define APCI1710_CONFIG_ADDRESS_RANGE 8 -#define APCI1710_INCREMENTAL_COUNTER 0x53430000UL -#define APCI1710_SSI_COUNTER 0x53490000UL -#define APCI1710_TTL_IO 0x544C0000UL -#define APCI1710_DIGITAL_IO 0x44490000UL -#define APCI1710_82X54_TIMER 0x49430000UL -#define APCI1710_CHRONOMETER 0x43480000UL -#define APCI1710_PULSE_ENCODER 0x495A0000UL -#define APCI1710_TOR_COUNTER 0x544F0000UL -#define APCI1710_PWM 0x50570000UL -#define APCI1710_ETM 0x45540000UL -#define APCI1710_CDA 0x43440000UL -#define APCI1710_DISABLE 0 -#define APCI1710_ENABLE 1 -#define APCI1710_SYNCHRONOUS_MODE 1 -#define APCI1710_ASYNCHRONOUS_MODE 0 +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ + +#define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ +#define COMEDI_SUBD_PWM 12 /* Pulse width Measurement */ +#define COMEDI_SUBD_SSI 13 /* Synchronous serial interface */ +#define COMEDI_SUBD_TOR 14 /* Tor counter */ +#define COMEDI_SUBD_CHRONO 15 /* Chrono meter */ +#define COMEDI_SUBD_PULSEENCODER 16 /* Pulse Encoder INP CPT */ +#define COMEDI_SUBD_INCREMENTALCOUNTER 17 /* Incremental Counter */ + +#define APCI1710_BOARD_NAME "apci1710" +#define APCI1710_BOARD_VENDOR_ID 0x10E8 +#define APCI1710_BOARD_DEVICE_ID 0x818F +#define APCI1710_ADDRESS_RANGE 256 +#define APCI1710_CONFIG_ADDRESS_RANGE 8 +#define APCI1710_INCREMENTAL_COUNTER 0x53430000UL +#define APCI1710_SSI_COUNTER 0x53490000UL +#define APCI1710_TTL_IO 0x544C0000UL +#define APCI1710_DIGITAL_IO 0x44490000UL +#define APCI1710_82X54_TIMER 0x49430000UL +#define APCI1710_CHRONOMETER 0x43480000UL +#define APCI1710_PULSE_ENCODER 0x495A0000UL +#define APCI1710_TOR_COUNTER 0x544F0000UL +#define APCI1710_PWM 0x50570000UL +#define APCI1710_ETM 0x45540000UL +#define APCI1710_CDA 0x43440000UL +#define APCI1710_DISABLE 0 +#define APCI1710_ENABLE 1 +#define APCI1710_SYNCHRONOUS_MODE 1 +#define APCI1710_ASYNCHRONOUS_MODE 0 //MODULE INFO STRUCTURE static const comedi_lrange range_apci1710_ttl = { 4, { - BIP_RANGE(10), - BIP_RANGE(5), - BIP_RANGE(2), - BIP_RANGE(1) - } + BIP_RANGE(10), + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1) + } }; static const comedi_lrange range_apci1710_ssi = { 4, { - BIP_RANGE(10), - BIP_RANGE(5), - BIP_RANGE(2), - BIP_RANGE(1) - } + BIP_RANGE(10), + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1) + } }; static const comedi_lrange range_apci1710_inccpt = { 4, { - BIP_RANGE(10), - BIP_RANGE(5), - BIP_RANGE(2), - BIP_RANGE(1) - } + BIP_RANGE(10), + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1) + } }; --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ /********* Definitions for APCI-2016 card *****/ #define APCI2016_BOARD_VENDOR_ID 0x15B8 @@ -47,26 +40,26 @@ You shoud also find the complete GPL in // Hardware Layer functions for Apci2016 //DO -int i_APCI2016_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2016_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -int i_APCI2016_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2016_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -int i_APCI2016_BitsDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2016_BitsDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // TIMER // timer value is passed as u seconds -int i_APCI2016_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2016_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -int i_APCI2016_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2016_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); -int i_APCI2016_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2016_ReadWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // Interrupt functions..... @@ -74,4 +67,4 @@ int i_APCI2016_ReadWatchdog(comedi_devic //VOID v_APCI2016_Interrupt(int irq, void *d); // RESET -INT i_APCI2016_Reset(comedi_device * dev); +INT i_APCI2016_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h @@ -1,26 +1,20 @@ -/** -@verbatim +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ /********* Definitions for APCI-2032 card *****/ // Card Specific information @@ -61,27 +55,27 @@ You shoud also find the complete GPL in // Hardware Layer functions for Apci2032 //DO -int i_APCI2032_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI2032_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI2032_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI2032_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2032_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI2032_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI2032_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI2032_ReadInterruptStatus(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // TIMER // timer value is passed as u seconds -INT i_APCI2032_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI2032_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI2032_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI2032_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI2032_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI2032_ReadWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // Interrupt functions..... void v_APCI2032_Interrupt(int irq, void *d); //Reset functions -int i_APCI2032_Reset(comedi_device * dev); +int i_APCI2032_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h @@ -1,26 +1,20 @@ -/** -@verbatim +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ /********* Definitions for APCI-2200 card *****/ // Card Specific information @@ -42,26 +36,26 @@ You shoud also find the complete GPL in // Hardware Layer functions for Apci2200 //Digital Input -INT i_APCI2200_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI2200_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI2200_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI2200_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //Digital Output -int i_APCI2200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI2200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI2200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2200_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI2200_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI2200_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // TIMER -int i_APCI2200_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI2200_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI2200_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI2200_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI2200_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI2200_ReadWatchdog(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //reset -INT i_APCI2200_Reset(comedi_device * dev); +INT i_APCI2200_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h @@ -1,81 +1,43 @@ // hwdrv_apci3120.h -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ /* - - +-----------------------------------------------------------------------+ - | (C) ADDI-DATA GmbH Dieselstrasse 3 D-77833 Ottersweier | - +-----------------------------------------------------------------------+ - | Tel : +49 (0) 7223/9493-0 | email : info@addi-data.com | - | Fax : +49 (0) 7223/9493-92 | Internet : http://www.addi-data.com | - +-----------------------------------------------------------------------+ - | Project : ADDI DATA | Compiler : GCC | - | Modulname : hwdrv_apci3120.h | Version : 2.96 Redhat Linux | - | | kernel-2.4.2 | - +-------------------------------+---------------------------------------+ - | Author : | Date : | - +-----------------------------------------------------------------------+ - | Description :Header file for apci3120 hardware abstraction layer | - +-----------------------------------------------------------------------+ - | UPDATE'S | - +-----------------------------------------------------------------------+ - | Date | Author | Description of updates | - +----------+-----------+------------------------------------------------+ - | | | | - | | | | - | | | | - | | | | - | | | | - +----------+-----------+------------------------------------------------+ - | | | | - | | | | - | | | | - +----------+-----------+------------------------------------------------+ -*/ + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ // comedi related defines //ANALOG INPUT RANGE static const comedi_lrange range_apci3120_ai = { 8, { - BIP_RANGE(10), - BIP_RANGE(5), - BIP_RANGE(2), - BIP_RANGE(1), - UNI_RANGE(10), - UNI_RANGE(5), - UNI_RANGE(2), - UNI_RANGE(1) - } + BIP_RANGE(10), + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1), + UNI_RANGE(10), + UNI_RANGE(5), + UNI_RANGE(2), + UNI_RANGE(1) + } }; // ANALOG OUTPUT RANGE static const comedi_lrange range_apci3120_ao = { 2, { - BIP_RANGE(10), - UNI_RANGE(10) - } + BIP_RANGE(10), + UNI_RANGE(10) + } }; #define APCI3120_BIPOLAR_RANGES 4 // used for test on mixture of BIP/UNI ranges @@ -216,61 +178,64 @@ typedef struct { // Function Declaration For APCI-3120 // Internal functions -int i_APCI3120_SetupChannelList(comedi_device * dev, comedi_subdevice * s, - int n_chan, unsigned int *chanlist, char check); -int i_APCI3120_ExttrigEnable(comedi_device * dev); -int i_APCI3120_ExttrigDisable(comedi_device * dev); -int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s); -int i_APCI3120_Reset(comedi_device * dev); -int i_APCI3120_CyclicAnalogInput(int mode, comedi_device * dev, - comedi_subdevice * s); +int i_APCI3120_SetupChannelList(comedi_device *dev, comedi_subdevice *s, + int n_chan, unsigned int *chanlist, char check); +int i_APCI3120_ExttrigEnable(comedi_device *dev); +int i_APCI3120_ExttrigDisable(comedi_device *dev); +int i_APCI3120_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s); +int i_APCI3120_Reset(comedi_device *dev); +int i_APCI3120_CyclicAnalogInput(int mode, comedi_device *dev, + comedi_subdevice *s); // Interrupt functions void v_APCI3120_Interrupt(int irq, void *d); //UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,sampl_t *dma,sampl_t *data,int n); -void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device * dev, - comedi_subdevice * s, sampl_t * dma_buffer, unsigned int num_samples); -int i_APCI3120_InterruptHandleEos(comedi_device * dev); +void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev, + comedi_subdevice *s, + sampl_t *dma_buffer, + unsigned int num_samples); +int i_APCI3120_InterruptHandleEos(comedi_device *dev); void v_APCI3120_InterruptDma(int irq, void *d); // TIMER -int i_APCI3120_InsnConfigTimer(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI3120_InsnWriteTimer(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI3120_InsnReadTimer(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI3120_InsnConfigTimer(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI3120_InsnWriteTimer(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI3120_InsnReadTimer(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //DI // for di read -int i_APCI3120_InsnBitsDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI3120_InsnReadDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI3120_InsnBitsDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI3120_InsnReadDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //DO //int i_APCI3120_WriteDigitalOutput(comedi_device *dev, BYTE data); -int i_APCI3120_InsnConfigDigitalOutput(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -int i_APCI3120_InsnBitsDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI3120_InsnWriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI3120_InsnConfigDigitalOutput(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); +int i_APCI3120_InsnBitsDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI3120_InsnWriteDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //AO //int i_APCI3120_Write1AnalogValue(comedi_device *dev,UINT ui_Range,UINT ui_Channel,UINT data ); -int i_APCI3120_InsnWriteAnalogOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI3120_InsnWriteAnalogOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //AI HArdware layer -int i_APCI3120_InsnConfigAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI3120_InsnReadAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -int i_APCI3120_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_cmd * cmd); -int i_APCI3120_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s); -//int i_APCI3120_CancelAnalogInput(comedi_device * dev, comedi_subdevice * s); -int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s); +int i_APCI3120_InsnConfigAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI3120_InsnReadAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI3120_CommandTestAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_cmd *cmd); +int i_APCI3120_CommandAnalogInput(comedi_device *dev, comedi_subdevice *s); +//int i_APCI3120_CancelAnalogInput(comedi_device *dev, comedi_subdevice *s); +int i_APCI3120_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ // Card Specific information #define APCI3200_BOARD_VENDOR_ID 0x15B8 @@ -39,27 +32,27 @@ struct { INT i_Interrupt; INT i_ModuleSelection; } Config_Parameters_Module1, Config_Parameters_Module2, - Config_Parameters_Module3, Config_Parameters_Module4; + Config_Parameters_Module3, Config_Parameters_Module4; //ANALOG INPUT RANGE static const comedi_lrange range_apci3200_ai = { 8, { - BIP_RANGE(10), - BIP_RANGE(5), - BIP_RANGE(2), - BIP_RANGE(1), - UNI_RANGE(10), - UNI_RANGE(5), - UNI_RANGE(2), - UNI_RANGE(1) - } + BIP_RANGE(10), + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1), + UNI_RANGE(10), + UNI_RANGE(5), + UNI_RANGE(2), + UNI_RANGE(1) + } }; static const comedi_lrange range_apci3300_ai = { 4, { - UNI_RANGE(10), - UNI_RANGE(5), - UNI_RANGE(2), - UNI_RANGE(1) - } + UNI_RANGE(10), + UNI_RANGE(5), + UNI_RANGE(2), + UNI_RANGE(1) + } }; //Analog Input related Defines @@ -161,31 +154,34 @@ typedef struct { //AI -INT i_APCI3200_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI3200_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -INT i_APCI3200_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s); -INT i_APCI3200_InterruptHandleEos(comedi_device * dev); -INT i_APCI3200_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s, - comedi_cmd * cmd); -INT i_APCI3200_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s); -INT i_APCI3200_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI3200_ConfigAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI3200_ReadAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI3200_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s); +INT i_APCI3200_InterruptHandleEos(comedi_device *dev); +INT i_APCI3200_CommandTestAnalogInput(comedi_device *dev, comedi_subdevice *s, + comedi_cmd *cmd); +INT i_APCI3200_CommandAnalogInput(comedi_device *dev, comedi_subdevice *s); +INT i_APCI3200_ReadDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //Interrupt void v_APCI3200_Interrupt(int irq, void *d); -int i_APCI3200_InterruptHandleEos(comedi_device * dev); +int i_APCI3200_InterruptHandleEos(comedi_device *dev); //Reset functions -INT i_APCI3200_Reset(comedi_device * dev); +INT i_APCI3200_Reset(comedi_device *dev); -int i_APCI3200_ReadCJCCalOffset(comedi_device * dev, lsampl_t * data); -int i_APCI3200_ReadCJCValue(comedi_device * dev, lsampl_t * data); -int i_APCI3200_ReadCalibrationGainValue(comedi_device * dev, UINT * data); -int i_APCI3200_ReadCalibrationOffsetValue(comedi_device * dev, UINT * data); -int i_APCI3200_Read1AnalogInputChannel(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -int i_APCI3200_ReadCJCCalGain(comedi_device * dev, lsampl_t * data); +int i_APCI3200_ReadCJCCalOffset(comedi_device *dev, lsampl_t *data); +int i_APCI3200_ReadCJCValue(comedi_device *dev, lsampl_t *data); +int i_APCI3200_ReadCalibrationGainValue(comedi_device *dev, UINT *data); +int i_APCI3200_ReadCalibrationOffsetValue(comedi_device *dev, UINT *data); +int i_APCI3200_Read1AnalogInputChannel(comedi_device *dev, + comedi_subdevice *s, comedi_insn *insn, + lsampl_t *data); +int i_APCI3200_ReadCJCCalGain(comedi_device *dev, lsampl_t *data); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h @@ -1,26 +1,20 @@ -/** -@verbatim +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ // Card Specific information #define APCI3501_BOARD_VENDOR_ID 0x15B8 #define APCI3501_ADDRESS_RANGE 255 @@ -39,9 +33,9 @@ You shoud also find the complete GPL in #define MODE1 1 // ANALOG OUTPUT RANGE comedi_lrange range_apci3501_ao = { 2, { - BIP_RANGE(10), - UNI_RANGE(10) - } + BIP_RANGE(10), + UNI_RANGE(10) + } }; //Watchdog Related Defines @@ -61,36 +55,40 @@ comedi_lrange range_apci3501_ao = { 2, { // Hardware Layer functions for Apci3501 //AO -INT i_APCI3501_ConfigAnalogOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI3501_WriteAnalogOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI3501_ConfigAnalogOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI3501_WriteAnalogOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //DI // for di read //INT i_APCI3501_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); -INT i_APCI3501_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +INT i_APCI3501_ReadDigitalInput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //DO -int i_APCI3501_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI3501_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); -INT i_APCI3501_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); +int i_APCI3501_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI3501_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +INT i_APCI3501_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); // TIMER // timer value is passed as u seconds -INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -int i_APCI3501_ReadTimerCounterWatchdog(comedi_device * dev, - comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); +INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); +int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, + lsampl_t *data); +int i_APCI3501_ReadTimerCounterWatchdog(comedi_device *dev, + comedi_subdevice *s, + comedi_insn *insn, lsampl_t *data); //Interrupt void v_APCI3501_Interrupt(int irq, void *d); //Reset functions -int i_APCI3501_Reset(comedi_device * dev); +int i_APCI3501_Reset(comedi_device *dev); --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.h @@ -1,26 +1,19 @@ -/** -@verbatim - -Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. - - ADDI-DATA GmbH - Dieselstrasse 3 - D-77833 Ottersweier - Tel: +19(0)7223/9493-0 - Fax: +49(0)7223/9493-92 - http://www.addi-data-com - info@addi-data.com - -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. - -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. - -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 - -You shoud also find the complete GPL in the COPYING file accompanying this source code. - -@endverbatim -*/ +/* + * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. + * + * ADDI-DATA GmbH + * Dieselstrasse 3 + * D-77833 Ottersweier + * Tel: +19(0)7223/9493-0 + * Fax: +49(0)7223/9493-92 + * http://www.addi-data-com + * info@addi-data.com + * + * 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. + */ #ifndef COMEDI_SUBD_TTLIO #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ @@ -40,30 +33,30 @@ You shoud also find the complete GPL in #ifdef __KERNEL__ static const comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10), - BIP_RANGE(5), - BIP_RANGE(2), - BIP_RANGE(1), - UNI_RANGE(10), - UNI_RANGE(5), - UNI_RANGE(2), - UNI_RANGE(1)} + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1), + UNI_RANGE(10), + UNI_RANGE(5), + UNI_RANGE(2), + UNI_RANGE(1)} }; static const comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1), - BIP_RANGE(1)} + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1), + BIP_RANGE(1)} }; static const comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10), - UNI_RANGE(10)} + UNI_RANGE(10)} }; #endif