#ifndef __APCI2032_API_H__
#define __APCI2032_API_H__

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,27)
#define __user 
#endif

/* output functions */
int do_CMD_APCI2032_Set1DigitalOutputOn(struct pci_dev * pdev, uint32_t arg );
int do_CMD_APCI2032_Set1DigitalOutputOff(struct pci_dev * pdev, uint32_t arg );
int do_CMD_APCI2032_Set32DigitalOutputsOn(struct pci_dev * pdev, uint32_t arg );
int do_CMD_APCI2032_Set32DigitalOutputsOff(struct pci_dev * pdev, uint32_t arg );
int do_CMD_APCI2032_Get32DigitalOutputStatus(struct pci_dev * pdev, uint32_t __user * arg );

int apci2032_register_interrupt(struct pci_dev * pdev);
int apci2032_deregister_interrupt(struct pci_dev * pdev);
int do_CMD_APCI2032_GetDigitalOutputInterruptStatus( struct pci_dev * pdev, unsigned int __user * arg);
int do_CMD_APCI2032_ReleaseDigitalOutputInterrupt(struct pci_dev * pdev);
int do_CMD_APCI2032_EnableDisableDigitalOutputInterrupt(struct pci_dev * pdev, unsigned int);

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



#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,27)
#undef __user 
#endif


#endif /*__APCI2032_API_H__*/
