00001 /* $Id: */ 00002 /****************************************************************************** 00003 * (c) Copyright 2009 Xilinx, Inc. All rights reserved. 00004 * 00005 * This file contains confidential and proprietary information 00006 * of Xilinx, Inc. and is protected under U.S. and 00007 * international copyright and other intellectual property 00008 * laws. 00009 * 00010 * DISCLAIMER 00011 * This disclaimer is not a license and does not grant any 00012 * rights to the materials distributed herewith. Except as 00013 * otherwise provided in a valid license issued to you by 00014 * Xilinx, and to the maximum extent permitted by applicable 00015 * law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND 00016 * WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES 00017 * AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING 00018 * BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- 00019 * INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and 00020 * (2) Xilinx shall not be liable (whether in contract or tort, 00021 * including negligence, or under any other theory of 00022 * liability) for any loss or damage of any kind or nature 00023 * related to, arising under or in connection with these 00024 * materials, including for any direct, or any indirect, 00025 * special, incidental, or consequential loss or damage 00026 * (including loss of data, profits, goodwill, or any type of 00027 * loss or damage suffered as a result of any action brought 00028 * by a third party) even if such damage or loss was 00029 * reasonably foreseeable or Xilinx had been advised of the 00030 * possibility of the same. 00031 * 00032 * CRITICAL APPLICATIONS 00033 * Xilinx products are not designed or intended to be fail- 00034 * safe, or for use in any application requiring fail-safe 00035 * performance, such as life-support or safety devices or 00036 * systems, Class III medical devices, nuclear facilities, 00037 * applications related to the deployment of airbags, or any 00038 * other applications that could lead to death, personal 00039 * injury, or severe property or environmental damage 00040 * (individually and collectively, "Critical 00041 * Applications"). Customer assumes the sole risk and 00042 * liability of any use of Xilinx products in Critical 00043 * Applications, subject only to applicable laws and 00044 * regulations governing limitations on product liability. 00045 * 00046 * THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS 00047 * PART OF THIS FILE AT ALL TIMES. 00048 * 00049 * All rights reserved. 00050 * 00051 ******************************************************************************/ 00052 /*****************************************************************************/ 00053 /** 00054 * 00055 * @file xtimebase.h 00056 * 00057 * This is the main header file of Xilinx MVI TimeBase device driver. The 00058 * TimeBase device detects timebase signals, independently overrides any one of 00059 * them, re-generates timebase signals with +/- delay and with polarity 00060 * inversion, and generates up to 16 one cycle Frame Sync outputs. 00061 * 00062 * The device has the following main features: 00063 * - Detect timebase signals: 00064 * - horizontal sync 00065 * - horizontal blank 00066 * - vertical sync 00067 * - vertical blank 00068 * - active video 00069 * - field id 00070 * - Independently override any one signal. 00071 * - Re-generate timebase signals with +/- delay and with polarity inversion. 00072 * - Generate up to 16 one cycle Frame Sync outputs. 00073 * 00074 * For a full description of TimeBase features, please see the hardware 00075 * specification. 00076 * 00077 * <b>Interrupt Service </b> 00078 * 00079 * The interrupt types supported are: 00080 * - Frame Sync Interrupts 0 - 15 00081 * - Generator interrupt 00082 * - Generator Active Video Interrupt 00083 * - Generator VBLANK Interrupt 00084 * - Detector interrupt: 00085 * - Detector Active Video Interrupt 00086 * - Detector VBLANK Interrupt 00087 * - Signal Lock interrupt 00088 * - Active Chroma signal lock 00089 * - Active Video Signal Lock 00090 * - Field ID Signal Lock 00091 * - Vertical Blank Signal Lock 00092 * - Vertical Sync Signal Lock 00093 * - Horizontal Blank Signal Lock 00094 * - Horizontal Sync Signal Lock 00095 * 00096 * <b>Software Initialization </b> 00097 * 00098 * The application needs to do following steps in order for preparing the 00099 * TimeBase to be ready to process timebase signal handling. 00100 * 00101 * - Call XTimeBase_LookupConfig() using a device ID to find the device 00102 * configuration. 00103 * - Call XTimeBase_CfgInitialize() to initialize the device and the driver 00104 * instance associated with it. 00105 * - Call XTimeBase_SetGenerator() to set up the timebase signals to generate, 00106 * if desired. 00107 * - Call XTimeBase_SetPolarity() to set up the timebase signal polarity. 00108 * - Call XTimeBase_SetSource() for source selection 00109 * - Call XTimeBase_Enable() to enable/start the TimeBase device. 00110 * 00111 * <b> Examples </b> 00112 * 00113 * An example is provided with this driver to demonstrate the driver usage. 00114 * 00115 * <b>Cache Coherency</b> 00116 * 00117 * <b>Alignment</b> 00118 * 00119 * <b>Limitations</b> 00120 * 00121 * <b>BUS Interface</b> 00122 * 00123 * <pre> 00124 * MODIFICATION HISTORY: 00125 * 00126 * Ver Who Date Changes 00127 * ----- ---- -------- ----------------------------------------------- 00128 * 1.00a xd 08/05/08 First release 00129 * 1.01a xd 07/23/10 Added GIER; Added more h/w generic info into 00130 * xparameters.h; Feed callbacks with pending 00131 * interrupt info. Added Doxygen & Version support 00132 * </pre> 00133 * 00134 ******************************************************************************/ 00135 00136 #ifndef XTIMEBASE_H /* prevent circular inclusions */ 00137 #define XTIMEBASE_H /* by using protection macros */ 00138 00139 #ifdef __cplusplus 00140 extern "C" { 00141 #endif 00142 00143 /***************************** Include Files *********************************/ 00144 00145 #include "xtimebase_hw.h" 00146 #include "xstatus.h" 00147 00148 /************************** Constant Definitions *****************************/ 00149 00150 /** @name Interrupt Types for setting up Callbacks 00151 * @{ 00152 */ 00153 #define XTB_HANDLER_FRAMESYNC 1 /**< A frame sync event interrupt type */ 00154 #define XTB_HANDLER_LOCK 2 /**< A signal lock event interrupt type */ 00155 #define XTB_HANDLER_DETECTOR 3 /**< A detector event interrupt type */ 00156 #define XTB_HANDLER_GENERATOR 4 /**< A generator event interrupt type */ 00157 #define XTB_HANDLER_ERROR 5 /**< An error condition interrupt type */ 00158 /*@}*/ 00159 00160 /** @name Options for enabling TimeBase modules 00161 * @{ 00162 */ 00163 #define XTB_EN_GENERATOR 1 /**< To enable generator */ 00164 #define XTB_EN_DETECTOR 2 /**< To enable detector */ 00165 /*@}*/ 00166 00167 /** @name Address gap between two register next to each other 00168 * @{ 00169 */ 00170 #define XTB_REG_ADDRGAP 4 00171 /*@}*/ 00172 00173 /**************************** Type Definitions *******************************/ 00174 00175 /** 00176 * This typedef contains configuration information for a TimeBase device. 00177 * Each TimeBase device should have a configuration structure associated 00178 */ 00179 typedef struct { 00180 u16 DeviceId; /**< DeviceId is the unique ID of the device */ 00181 u32 BaseAddress; /**< BaseAddress is the physical base address of the 00182 * device's registers */ 00183 } XTimeBase_Config; 00184 00185 /** 00186 * This typedef contains Polarity configuration information for a TimeBase 00187 * device. 00188 */ 00189 typedef struct { 00190 u8 ActiveChromaPol; /**< Active Chroma Output Polarity */ 00191 u8 ActiveVideoPol; /**< Active Video Output Polarity */ 00192 u8 FieldIdPol; /**< Field ID Output Polarity */ 00193 u8 VBlankPol; /**< Vertical Blank Output Polarity */ 00194 u8 VSyncPol; /**< Vertical Sync Output Polarity */ 00195 u8 HBlankPol; /**< Horizontal Blank Output Polarity */ 00196 u8 HSyncPol; /**< Horizontal Sync Output Polarity */ 00197 } XTimeBase_Polarity; 00198 00199 /** 00200 * This typedef contains Source Selection configuration information for a 00201 * TimeBase device. 00202 */ 00203 typedef struct { 00204 00205 u8 VChromaSrc; /**< Start of Active Chroma Register Source 00206 * Select */ 00207 00208 u8 VActiveSrc; /**< Vertical Active Video Start Register 00209 * Source Select */ 00210 u8 VBackPorchSrc; /**< Vertical Back Porch Start Register Source 00211 * Select */ 00212 u8 VSyncSrc; /**< Vertical Sync Start Register Source Select 00213 */ 00214 u8 VFrontPorchSrc; /**< Vertical Front Porch Start Register Source 00215 * Select */ 00216 u8 VTotalSrc; /**< Vertical Total Register Source Select */ 00217 00218 u8 HActiveSrc; /**< Horizontal Active Video Start Register 00219 * Source Select */ 00220 u8 HBackPorchSrc; /**< Horizontal Back Porch Start Register 00221 * Source Select */ 00222 u8 HSyncSrc; /**< Horizontal Sync Start Register Source 00223 * Select */ 00224 u8 HFrontPorchSrc; /**< Horizontal Front Porch Start Register 00225 * Source Select */ 00226 u8 HTotalSrc; /**< Horizontal Total Register Source Select */ 00227 00228 } XTimeBase_SourceSelect; 00229 00230 /** 00231 * This typedef contains the TimeBase signal configuration used by the 00232 * Generator/Detector modules in a TimeBase device. 00233 */ 00234 typedef struct { 00235 00236 u16 HFrontPorchStart; /**< Horizontal Front Porch Start Cycle Count*/ 00237 u16 HTotal; /**< Horizontal total clock cycles per Line */ 00238 u16 HBackPorchStart; /**< Horizontal Back Porch Start Cycle Count */ 00239 u16 HSyncStart; /**< Horizontal Sync Start Cycle Count */ 00240 u16 HActiveStart; /**< Horizontal Active Video Start Cycle Count 00241 */ 00242 00243 u16 V0FrontPorchStart; /**< Vertical Front Porch Start Line Count 00244 * (Field 0) */ 00245 u16 V0Total; /**< Total lines per Frame (Field 0) */ 00246 u16 V0BackPorchStart; /**< Vertical Back Porch Start Line Count 00247 * (Field 0) */ 00248 u16 V0SyncStart; /**< Vertical Sync Start Line Count (Field 0)*/ 00249 u16 V0ChromaStart; /**< Active Chroma Start Line Count (Field 0)*/ 00250 u16 V0ActiveStart; /**< Vertical Active Video Start Line Count 00251 * (Field 0) */ 00252 00253 u16 V1FrontPorchStart; /**< Vertical Front Porch Start Line Count 00254 * (Field 1) */ 00255 u16 V1Total; /**< Total lines per Frame (Field 1) */ 00256 u16 V1BackPorchStart; /**< Vertical Back Porch Start Line Count 00257 * (Field 1) */ 00258 u16 V1SyncStart; /**< Vertical Sync Start Line Count (Field 1)*/ 00259 u16 V1ChromaStart; /**< Active Chroma Start Line Count (Field 1)*/ 00260 u16 V1ActiveStart; /**< Vertical Active Video Start Line Count 00261 * (Field 1) */ 00262 00263 } XTimeBase_TimeBaseSignal; 00264 00265 00266 /** 00267 * Callback type for all interrupts except error interrupt. 00268 * 00269 * @param CallBackRef is a callback reference passed in by the upper layer 00270 * when setting the callback functions, and passed back to the 00271 * upper layer when the callback is invoked. 00272 * @param Mask is a bit mask indicating the cause of the event. For 00273 * current device version, this parameter is "OR" of 0 or more XTB_IXR_* 00274 * constants defined in xtimebase_hw.h 00275 */ 00276 typedef void (*XTimeBase_CallBack) (void *CallBackRef, u32 Mask); 00277 00278 /** 00279 * Callback type for Error interrupt. 00280 * 00281 * @param CallBackRef is a callback reference passed in by the upper layer 00282 * when setting the callback functions, and passed back to the 00283 * upper layer when the callback is invoked. 00284 * @param ErrorMask is a bit mask indicating the cause of the error. For 00285 * current device version, this parameter always have value 0 and 00286 * could be ignored. 00287 */ 00288 typedef void (*XTimeBase_ErrorCallBack) (void *CallBackRef, u32 ErrorMask); 00289 00290 /** 00291 * The XTimeBase driver instance data. An instance must be allocated for each 00292 * TimeBase device in use. 00293 */ 00294 typedef struct { 00295 XTimeBase_Config Config; /**< hardware configuration */ 00296 u32 IsReady; /**< Device and the driver instance are 00297 * initialized */ 00298 00299 XTimeBase_CallBack FrameSyncCallBack; /**< Call back for Frame Sync 00300 * interrupt */ 00301 void *FrameSyncRef; /**< To be passed to the Frame 00302 * Sync interrupt callback */ 00303 00304 XTimeBase_CallBack LockCallBack; /**< Call back for Signal Lock 00305 * interrupt */ 00306 void *LockRef; /**< To be passed to the Signal 00307 * Lock interrupt callback */ 00308 00309 XTimeBase_CallBack DetectorCallBack; /**< Call back for Detector 00310 * interrupt */ 00311 void *DetectorRef; /**< To be passed to the Detector 00312 * interrupt callback */ 00313 00314 XTimeBase_CallBack GeneratorCallBack; /**< Call back for Generator 00315 * interrupt */ 00316 void *GeneratorRef; /**< To be passed to the 00317 * Generator interrupt 00318 * callback */ 00319 00320 XTimeBase_ErrorCallBack ErrCallBack; /**< Call back for Error 00321 * interrupt */ 00322 void *ErrRef; /**< To be passed to the Error 00323 * interrupt callback */ 00324 00325 } XTimeBase; 00326 00327 /***************** Macros (Inline Functions) Definitions *********************/ 00328 00329 /*****************************************************************************/ 00330 /** 00331 * 00332 * This macro resets a TimeBase device. 00333 * 00334 * @param InstancePtr is a pointer to the TimeBase device instance to be worked 00335 * on. 00336 * 00337 * @return None 00338 * 00339 * @note 00340 * C-style signature: 00341 * void XTimeBase_Reset(XTimeBase *InstancePtr) 00342 * 00343 ******************************************************************************/ 00344 #define XTimeBase_Reset(InstancePtr) \ 00345 { \ 00346 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, XTB_RESET, \ 00347 XTB_RESET_RESET_MASK); \ 00348 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, XTB_RESET, \ 00349 0); \ 00350 } 00351 00352 /*****************************************************************************/ 00353 /** 00354 * This function gets the status of the Detector in a TimeBase device. 00355 * 00356 * @param InstancePtr is a pointer to the TimeBase device instance to be 00357 * worked on. 00358 * 00359 * @return The Detector Status. Use XTB_DS_* in xtimebase_hw.h to interpret 00360 * the returned value. 00361 * 00362 * @note 00363 * C-style signature: 00364 * u32 XTimeBase_GetDetectionStatus(XTimeBase *InstancePtr) 00365 * 00366 ******************************************************************************/ 00367 #define XTimeBase_GetDetectionStatus(InstancePtr) \ 00368 XTimeBase_ReadReg((InstancePtr)->Config.BaseAddress, XTB_DS) 00369 00370 /*****************************************************************************/ 00371 /** 00372 * 00373 * This macro enables the global interrupt on a TimeBase device. 00374 * 00375 * @param InstancePtr is a pointer to the TimeBase device instance to be 00376 * worked on. 00377 * 00378 * @return None. 00379 * 00380 * @note 00381 * C-style signature: 00382 * void XTimeBase_IntrEnableGlobal(XTimeBase *InstancePtr); 00383 * 00384 ******************************************************************************/ 00385 #define XTimeBase_IntrEnableGlobal(InstancePtr) \ 00386 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, XTB_GIER,\ 00387 XTB_GIER_GIE_MASK) 00388 00389 /*****************************************************************************/ 00390 /** 00391 * 00392 * This macro disables the global interrupt on a TimeBase device. 00393 * 00394 * @param InstancePtr is a pointer to the TimeBase device instance to be 00395 * worked on. 00396 * 00397 * @return None. 00398 * 00399 * @note 00400 * C-style signature: 00401 * void XTimeBase_IntrDisableGlobal(XTimeBase *InstancePtr); 00402 * 00403 ******************************************************************************/ 00404 #define XTimeBase_IntrDisableGlobal(InstancePtr) \ 00405 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, XTB_GIER, 0) 00406 00407 /*****************************************************************************/ 00408 /** 00409 * 00410 * This macro enables individual interrupts of a TimeBase device. 00411 * 00412 * @param InstancePtr is a pointer to the TimeBase device instance to be worked 00413 * on. 00414 * 00415 * @param IntrType is the type of the interrupts to enable. Use OR'ing of 00416 * XTB_IXR_* constants defined in xtimebase_hw.h to create this 00417 * parameter value. 00418 * 00419 * @return None 00420 * 00421 * @note 00422 * 00423 * The existing enabled interrupt(s) will remain enabled. 00424 * 00425 * C-style signature: 00426 * void XTimeBase_IntrEnable(XTimeBase *InstancePtr, u32 IntrType) 00427 * 00428 ******************************************************************************/ 00429 #define XTimeBase_IntrEnable(InstancePtr, IntrType) \ 00430 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, XTB_IER, \ 00431 ((IntrType) & XTB_IXR_ALLINTR_MASK) | \ 00432 XTimeBase_ReadReg((InstancePtr)->Config.BaseAddress, XTB_IER)) 00433 00434 /*****************************************************************************/ 00435 /** 00436 * 00437 * This macro disables individual interrupts of a TimeBase device. 00438 * 00439 * @param InstancePtr is a pointer to the TimeBase device instance to be worked 00440 * on. 00441 * 00442 * @param IntrType is the type of the interrupts to disable. Use OR'ing of 00443 * XTB_IXR_* constants defined in xtimebase_hw.h to create this 00444 * parameter value. 00445 * 00446 * @return None 00447 * 00448 * @note 00449 * 00450 * Any other interrupt not covered by parameter IntrType, if enabled before 00451 * this macro is called, will remain enabled. 00452 * 00453 * C-style signature: 00454 * void XTimeBase_IntrDisable(XTimeBase *InstancePtr, u32 IntrType) 00455 * 00456 ******************************************************************************/ 00457 #define XTimeBase_IntrDisable(InstancePtr, IntrType) \ 00458 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, XTB_IER, \ 00459 XTimeBase_ReadReg((InstancePtr)->Config.BaseAddress, XTB_IER) \ 00460 & ((~(IntrType)) & XTB_IXR_ALLINTR_MASK)) 00461 00462 /*****************************************************************************/ 00463 /** 00464 * 00465 * This macro returns the pending interrupts of a TimeBase device. 00466 * 00467 * @param InstancePtr is a pointer to the TimeBase device instance to be worked 00468 * on. 00469 * 00470 * @return The pending interrupts of the TimeBase. Use XTB_IXR_* constants 00471 * defined in xtimebase_hw.h to interpret this value. 00472 * 00473 * @note 00474 * 00475 * C-style signature: 00476 * u32 XTimeBase_IntrGetPending(XTimeBase *InstancePtr) 00477 * 00478 ******************************************************************************/ 00479 #define XTimeBase_IntrGetPending(InstancePtr) \ 00480 (XTimeBase_ReadReg((InstancePtr)->Config.BaseAddress, XTB_IER) & \ 00481 XTimeBase_ReadReg((InstancePtr)->Config.BaseAddress, XTB_ISR) & \ 00482 XTB_IXR_ALLINTR_MASK) 00483 00484 /*****************************************************************************/ 00485 /** 00486 * 00487 * This macro clears/acknowledges pending interrupts of a TimeBase device. 00488 * 00489 * @param InstancePtr is a pointer to the TimeBase device instance to be worked 00490 * on. 00491 * 00492 * @param IntrType is the pending interrupts to clear/acknowledge. Use OR'ing 00493 * of XTB_IXR_* constants defined in xtimebase_hw.h to create this 00494 * parameter value. 00495 * 00496 * @return None 00497 * 00498 * @note 00499 * 00500 * C-style signature: 00501 * void XTimeBase_IntrClear(XTimeBase *InstancePtr, u32 IntrType) 00502 * 00503 ******************************************************************************/ 00504 #define XTimeBase_IntrClear(InstancePtr, IntrType) \ 00505 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, XTB_ISR, \ 00506 (IntrType) & XTB_IXR_ALLINTR_MASK) 00507 00508 /*****************************************************************************/ 00509 /** 00510 * 00511 * This macro sets the edge at which the following interrupts trigger: 00512 * - XTB_IXR_ACL_MASK 00513 * - XTB_IXR_AVL_MASK 00514 * - XTB_IXR_FIL_MASK 00515 * - XTB_IXR_VBL_MASK 00516 * - XTB_IXR_VSL_MASK 00517 * - XTB_IXR_HBL_MASK 00518 * - XTB_IXR_HSL_MASK 00519 * 00520 * @param InstancePtr is a pointer to the TimeBase device instance to be worked 00521 * on. 00522 * 00523 * @param LockPolarity indicates the edge at which the interrupts above 00524 * trigger. Use any non-0 for triggering on rising edge of lock. Use 0 00525 * for triggering on falling edge of lock. 00526 * 00527 * @return None 00528 * 00529 * @note 00530 * 00531 * C-style signature: 00532 * void XTimeBase_IntrSetLockPolarity(XTimeBase *InstancePtr, 00533 * u32 LockPolarity) 00534 * 00535 ******************************************************************************/ 00536 #define XTimeBase_IntrSetLockPolarity(InstancePtr, LockPolarity) \ 00537 { \ 00538 if (LockPolarity) { \ 00539 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, \ 00540 XTB_CTL, \ 00541 XTimeBase_ReadReg((InstancePtr)->Config.BaseAddress, \ 00542 XTB_CTL) | XTB_CTL_LP_MASK); \ 00543 } \ 00544 else { \ 00545 XTimeBase_WriteReg((InstancePtr)->Config.BaseAddress, \ 00546 XTB_CTL, \ 00547 XTimeBase_ReadReg((InstancePtr)->Config.BaseAddress, \ 00548 XTB_CTL) & (~XTB_CTL_LP_MASK)); \ 00549 } \ 00550 } 00551 00552 /************************** Function Prototypes ******************************/ 00553 00554 /* 00555 * Initialization and control functions in xtimebase.c 00556 */ 00557 00558 /* Initialization */ 00559 int XTimeBase_CfgInitialize(XTimeBase *InstancePtr, XTimeBase_Config *CfgPtr, 00560 u32 EffectiveAddr); 00561 00562 /* Enabling and Disabling */ 00563 void XTimeBase_Enable(XTimeBase *InstancePtr, u32 Type); 00564 void XTimeBase_Disable(XTimeBase *InstancePtr, u32 Type); 00565 00566 /* Polarity setting */ 00567 void XTimeBase_SetPolarity(XTimeBase *InstancePtr, 00568 XTimeBase_Polarity *PolarityPtr); 00569 void XTimeBase_GetPolarity(XTimeBase *InstancePtr, 00570 XTimeBase_Polarity *PolarityPtr); 00571 00572 /* Source selection */ 00573 void XTimeBase_SetSource(XTimeBase *InstancePtr, 00574 XTimeBase_SourceSelect *SourcePtr); 00575 void XTimeBase_GetSource(XTimeBase *InstancePtr, 00576 XTimeBase_SourceSelect *SourcePtr); 00577 00578 /* Skipping setting */ 00579 void XTimeBase_SetSkip(XTimeBase *InstancePtr, int GeneratorChromaSkip); 00580 void XTimeBase_GetSkip(XTimeBase *InstancePtr, int *GeneratorChromaSkipPtr); 00581 00582 /* Timebase generator/detector setting/fetching */ 00583 void XTimeBase_SetGenerator(XTimeBase *InstancePtr, 00584 XTimeBase_TimeBaseSignal *SignalCfgPtr); 00585 void XTimeBase_GetGenerator(XTimeBase *InstancePtr, 00586 XTimeBase_TimeBaseSignal *SignalCfgPtr); 00587 void XTimeBase_GetDetector(XTimeBase *InstancePtr, 00588 XTimeBase_TimeBaseSignal *SignalCfgPtr); 00589 00590 /* Delay setting */ 00591 void XTimeBase_SetDelay(XTimeBase *InstancePtr, int VertDelay, int HoriDelay); 00592 void XTimeBase_GetDelay(XTimeBase *InstancePtr, int *VertDelayPtr, 00593 int *HoriDelayPtr); 00594 00595 /* Frame Sync setting */ 00596 void XTimeBase_SetSync(XTimeBase *InstancePtr, u16 FrameSyncIndex, 00597 u16 VertStart, u16 HoriStart); 00598 void XTimeBase_GetSync(XTimeBase *InstancePtr, u16 FrameSyncIndex, 00599 u16 *VertStartPtr, u16 *HoriStartPtr); 00600 00601 /* Version functions */ 00602 void XTimeBase_GetVersion(XTimeBase *InstancePtr, u16 *Major, u16 *Minor, 00603 u16 *Revision); 00604 00605 /* 00606 * Initialization function(s) in xtimebase_sinit.c 00607 */ 00608 XTimeBase_Config *XTimeBase_LookupConfig(u16 DeviceId); 00609 00610 /* 00611 * Interrupt related function(s) in xtimebase_intr.c 00612 */ 00613 void XTimeBase_IntrHandler(void *InstancePtr); 00614 int XTimeBase_SetCallBack(XTimeBase *InstancePtr, u32 IntrType, 00615 void *CallBackFunc, void *CallBackRef); 00616 00617 00618 #ifdef __cplusplus 00619 } 00620 #endif 00621 00622 #endif /* end of protection macro */