#ifndef APCI3600EXTERNALTRIGGER_H_
#define APCI3600EXTERNALTRIGGER_H_

//-------------------------------------------------------------------------------------------------------------------
/* InitDigitalInputExternalTrigger */
                                                          
/* @retval 0 success
* @retval -1 system error                                                                 
* @retval 1 The handle parameter of the board is wrong                     
* @retval 2 Wrong trigger level selection                                 
* @retval 3 Wrong trigger count value                                      
* @retval 4 The ext trigger is already initialised by another process      
*/

/** Used internally. This is the ioctl CMD with the highest number.
 * @internal
 */

typedef struct
{
	uint8_t  b_TriggerLevel; /**< Define the front of the digital input who activate the external trigger - 1 : rising edge, 2 : falling edge , 3: both edges */ 
	uint16_t w_TriggerCountValue; /**< Define the number of trigger to wait that the firmware take in account the trigger. (1 to 65535) */
} InitDigitalInputExternalTrigger_t;

#define CMD_APCI3600_InitDigitalInputExternalTrigger						_IOR(APCI3600_MAGIC, 1, InitDigitalInputExternalTrigger_t*)

#define __APCI3600_EXTERNAL_TRIGGER_UPPER_IOCTL_CMD 1

#endif /*APCI3600EXTERNALTRIGGER_H_*/
