 /* @file apci1016.h
  * 
  * @brief Define the public API for the apci1016 ADDI-DATA board. 
  * 
  *
  */

/** @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 __APCI1016_H__
#define __APCI1016_H__


#define APCI1016_DRIVER_VERSION_MAJOR 2026
#define APCI1016_DRIVER_VERSION_MINOR 06
#define APCI1016_DRIVER_VERSION_PATCH 1

#include <apci.h>

//GENERAL DEFINE

#define APCI1016_BOARD_NAME                      "apci1016"
#define APCI1016_BOARD_VENDOR_ID                 0x15B8
#define APCI1016_BOARD_DEVICE_ID                 0x1000

/* value used for CMD_APCI1016_CheckAndGetPCISlotNumber ! DEPRECATED ! */
#ifndef CONFIG_APCI1016_MAX_BOARD_NBR
#define CONFIG_APCI1016_MAX_BOARD_NBR                   (3)
#endif // CONFIG_APCI1016_MAX_BOARD_NBR

// for compatibility with older driver (deprecated)
#define APCI1016_MAX_BOARD_NBR CONFIG_APCI1016_MAX_BOARD_NBR

// IOCTL define part
#define APCI1016_MAGIC (char) 'U'

/**
 * @param (char*) area of size CONFIG_APCI1016_MAX_BOARD_NBR+1
 * 
 * @deprecated
 * 
 */
#define CMD_APCI1016_CheckAndGetPCISlotNumber   _IOR(APCI1016_MAGIC, 1,char*)

#define CMD_APCI1016_SetBoardInformation        _IOW(APCI1016_MAGIC, 2,USHORT)

/**
 * @deprecated
 */
#define CMD_APCI1016_GetHardwareInformation     _IOR(APCI1016_MAGIC, 3,str_BaseInformations*)

/* DIGITAL INPUTS *******************************************************************/

/**
 * @param (uint16_t*) inputs
 * 
 * @return 0 on success, -1 on failure (see errno then) 
 */
#define CMD_APCI1016_Read16DigitalInput         _IOR(APCI1016_MAGIC, 4,uint16_t*)

/** Used internally. This is the ioctl CMD with the highest number.
 * @internal
 */
#define __APCI1016_UPPER_IOCTL_CMD 4

#endif // __APCI1016_H__
