xtimebase_intr.c File Reference

This code contains interrupt related functions of Xilinx MVI Video TimeBase device driver. More...

#include "xtimebase.h"

Go to the source code of this file.

Functions


Detailed Description

This code contains interrupt related functions of Xilinx MVI Video TimeBase device driver.

Please see xtimebase.h for more details of the driver.

 MODIFICATION HISTORY:

 Ver	Who	Date		Changes
 -----	----	--------	-----------------------------------------------
 1.00a	xd	08/05/08	First release
 1.01a	xd	07/23/10	Added GIER; Added more h/w generic info into
				xparameters.h; Feed callbacks with pending
				interrupt info. Added Doxygen & Version support
 

Definition in file xtimebase_intr.c.


Function Documentation

void XTimeBase_IntrHandler ( void *  InstancePtr  ) 

This function is the interrupt handler for the TimeBase driver.

This handler reads the pending interrupt from the IER/ISR, determines the source of the interrupts, calls according callbacks, and finally clears the interrupts.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XTimeBase_SetCallBack() during initialization phase. An example delivered with this driver demonstrates how this could be done.

Parameters:
InstancePtr is a pointer to the XTimeBase instance that just interrupted.
Returns:
None.
Note:
None.

Definition at line 96 of file xtimebase_intr.c.

int XTimeBase_SetCallBack ( XTimeBase InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)

This routine installs an asynchronous callback function for the given HandlerType:.

 HandlerType		   Callback Function Type
 -----------------------  ---------------------------
 XTB_HANDLER_FRAMESYNC	   XTimeBase_FrameSyncCallBack
 XTB_HANDLER_LOCK	   XTimeBase_LockCallBack
 XTB_HANDLER_DETECTOR	   XTimeBase_DetectorCallBack
 XTB_HANDLER_GENERATOR	   XTimeBase_GeneratorCallBack
 XTB_HANDLER_ERROR	   XTimeBase_ErrCallBack

 HandlerType		   Invoked by this driver when:
 -----------------------  --------------------------------------------------
 XTB_HANDLER_FRAMESYNC	   A frame sync event happens
 XTB_HANDLER_LOCK	   A signal lock event happens
 XTB_HANDLER_DETECTOR	   A detector related event happens
 XTB_HANDLER_GENERATOR	   A generator related event happens
 XTB_HANDLER_ERROR	   An error condition happens

 

Parameters:
InstancePtr is a pointer to the XTimeBase instance to be worked on.
HandlerType specifies which callback is to be attached.
CallbackFunc is the address of the callback function.
CallbackRef is a user data item that will be passed to the callback function when it is invoked.
Returns:
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note:
Invoking this function for a handler that already has been installed replaces it with the new handler.

Definition at line 182 of file xtimebase_intr.c.


Copyright © 1995-2010 Xilinx, Inc. All rights reserved.