#ifndef __APCI3200_EVENTS_H__
#define __APCI3200_EVENTS_H__

/* @file apci3200-events.h
  *
  * @brief Defines the event type for the board.
  *
  * This board implement a event system that allows a user-mode process (or thread) to know when a specific change happened on the board.
  *
  * This is done by using a blocking ioctl call.
  *
  */

/** @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
**/

#include <apci3200.h>

/*
 * mask:	Bits 0-3 are the module who generates the interrupt.
 * 			Bits 4-7 are the functionality who generates the interrupt (0x10 stands for scan).
 * 			Bit 31: When FIFO was full and has been overwritten.
 *
 * size:	This is the number of useful values in the values array.
 * 			The size depends on the sensor class (RTD or thermocouple).
 *
 * values:	With a thermocouple:
 * 			values[0]	Channel 0
 * 			values[1]	Channel 1
 * 			values[2]	Channel 2
 * 			values[3]	Channel 3
 * 			values[4]	Channel CJC
 * 			values[5]	Channel Calibration offset
 * 			values[6]	Channel Calibration gain
 *
 *			With a RTD:
 * 			values[0]	Channel 0
 * 			values[1]	Channel 1
 * 			values[2]	Channel CJC (not used with RTD)
 * 			values[3]	Channel Calibration offset
 * 			values[4]	Channel Calibration gain
 */
typedef struct
{
	uint32_t mask;		// Interrupt source
	uint32_t size;		// Number of values
	uint32_t values[7];	// There can only be, at most, 7 values in scan mode
} apci3200_event_t;

#endif /*__APCI3200_EVENTS_H__*/
