/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures the digital input Subdevice |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
+ struct comedi_insn * insn, unsigned int * data)
{
devpriv->tsk_Current = current;
/*******************************/
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_Read1DigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
UINT ui_Channel;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadMoreDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To be Read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
UINT ui_Mask = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
+ struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To Write |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
UINT ui_NoOfChannel;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
+ struct comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
UINT ui_NoOfChannel;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
devpriv->tsk_Current = current;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_StartStopWriteTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadTimerCounterWatchdog(comedi_device * dev,
- comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
+INT i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
+ struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadInterruptStatus |
-| (comedi_device *dev,comedi_subdevice *s, |
-| comedi_insn *insn,unsigned int *data) |
+| (struct comedi_device *dev,struct comedi_subdevice *s, |
+| struct comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :Reads the interrupt status register |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-int i_APCI1564_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+int i_APCI1564_ReadInterruptStatus(struct comedi_device * dev, struct comedi_subdevice * s,
+ struct comedi_insn * insn, unsigned int * data)
{
*data = ui_Type;
return insn->n;
*/
static VOID v_APCI1564_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
UINT ui_DO, ui_DI;
UINT ui_Timer;
UINT ui_C1, ui_C2, ui_C3, ui_C4;
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI1564_Reset(comedi_device *dev) | |
+| Function Name : int i_APCI1564_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev
+| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_Reset(comedi_device * dev)
+INT i_APCI1564_Reset(struct comedi_device * dev)
{
outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP_IRQ); //disable the interrupts
inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP_INTERRUPT_STATUS); //Reset the interrupt status register