#ifndef __API_H__
#define __API_H__

int do_CMD_APCIE1564_CheckAndGetPCISlotNumber(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_SetBoardInformation(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_GetHardwareInformation(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);

int do_CMD_APCIE1564_Read32DigitalInput(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_Read32DigitalOutput(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_Set32DigitalOutputOn(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_Set32DigitalOutputOff(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_SetOutputMemoryOn(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_SetOutputMemoryOff(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_EventEmpty(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_EventWait(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);

/* DIGITAL INTERRUPT */
int do_CMD_APCIE1564_ClearAndStopDigitalInputInterrupt (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_InitAndStartDigitalInputInterrupt (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_GetDigitalInputInterruptConfig (struct pci_dev *pdev, unsigned int cmd, unsigned long arg);

/* INTERRUPT */
int apcie1564_register_interrupt(struct pci_dev * pdev);
int apcie1564_deregister_interrupt(struct pci_dev * pdev);

/* COUNTERS */
int do_CMD_APCIE1564_CounterInitAndStart(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_ReadCounterValue(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_CounterStop(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_CounterGetStatus(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_CounterGetConfigRegister(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_CounterReset(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);
int do_CMD_APCIE1564_CounterTrigger(struct pci_dev *pdev, unsigned int cmd, unsigned long arg);

#endif // __API_H__
