 /* @file api.h
  * 
  * @brief Mainly this header should contains definition of ioctl handler. 
  * 
  * 
  * 
  */

/** @par LICENCE
 * 
 *  @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 library is free software; you can redistribute it and/or modify it under 
 the terms of the GNU Lesser General Public License as published by the 
 Free Software Foundation; either version 2.1 of the License, 
 or (at your option) any later version.
 
 This library 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 Lesser General Public License for more details.
 
 You should have received a copy of the GNU Lesser General Public License 
 along with this library; if not, write to the Free Software Foundation, 
 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 
 You also shoud find the complete LGPL in the LGPL.txt file accompanying 
 this source code.
 
 @endverbatim
**/

#ifndef __apci2200_API_H_
#define __apci2200_API_H_

//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
/* deprecated */
int do_CMD_apci2200_CheckAndGetPCISlotNumber(struct pci_dev * pdev,unsigned int cmd, unsigned long arg);
int do_CMD_apci2200_GetHardwareInformation(struct pci_dev * pdev, unsigned int cmd, unsigned long arg);

//------------------------------------------------------------------------------
int do_CMD_apci2200_SetBoardInformation(struct pci_dev * pdev, unsigned int cmd, unsigned long arg);

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------	

int do_CMD_APCI2200_Read8DigitalInput (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_SetDigitalOutputMemoryOn (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_SetDigitalOutputMemoryOff (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_Set1DigitalOutputOn (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_Set1DigitalOutputOff (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_Set8DigitalOutputOn (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_Set8DigitalOutputOff (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_Set16DigitalOutputOn (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_Set16DigitalOutputOff (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_Read16DigitalOutput (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);

int do_CMD_APCI2200_InitWatchdog (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_StartWatchdog (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_StopWatchdog (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_TriggerWatchdog (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_GetWatchdogStatus (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCI2200_GetWatchdogSoftwareTriggerStatus (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);

//------------------------------------------------------------------------------
/** Execute a command.
*
* @param pdev Pointer to a device.
* @param cmd Command to execute
* @param arg Argument of the command.
*/
extern int 
apci2200_do_ioctl(struct pci_dev * pdev, unsigned int cmd, unsigned long arg);
//------------------------------------------------------------------------------


#endif // __apci2200_API_H_
