diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp.h b/XilinxProcessorIPLib/drivers/dp/src/xdp.h index ebb209fe..bded01c5 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp.h @@ -248,6 +248,24 @@ typedef struct { 0 = TX, 1 = RX. */ } XDp_Config; +/******************************************************************************/ +/** + * Callback type which represents a custom timer wait handler. This is only + * used for Microblaze since it doesn't have a native sleep function. To avoid + * dependency on a hardware timer, the default wait functionality is implemented + * using loop iterations; this isn't too accurate. If a custom timer handler is + * used, the user may implement their own wait implementation using a hardware + * timer (see example/) for better accuracy. + * + * @param InstancePtr is a pointer to the XDptx instance. + * @param MicroSeconds is the number of microseconds to be passed to the + * timer function. + * + * @note None. + * +*******************************************************************************/ +typedef void (*XDp_TimerHandler)(void *InstancePtr, u32 MicroSeconds); + /**************************** Function Prototypes *****************************/ /* xdp_sinit.c: Configuration extraction function.*/ @@ -277,8 +295,9 @@ XDp_Config *XDp_LookupConfig(u16 DeviceId); /******************************* Compatibility ********************************/ -#define XDptx_LookupConfig XDp_LookupConfig -#define XDptx_Config XDp_Config +#define XDptx_LookupConfig XDp_LookupConfig +#define XDptx_Config XDp_Config +#define XDptx_TimerHandler XDp_TimerHandler #include "xdptx.h" diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdptx.c b/XilinxProcessorIPLib/drivers/dp/src/xdptx.c index 3da1d6a4..b86581fd 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdptx.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdptx.c @@ -1341,7 +1341,7 @@ void XDptx_ResetPhy(XDptx *InstancePtr, u32 Reset) * *******************************************************************************/ void XDptx_SetUserTimerHandler(XDptx *InstancePtr, - XDptx_TimerHandler CallbackFunc, void *CallbackRef) + XDp_TimerHandler CallbackFunc, void *CallbackRef) { /* Verify arguments. */ Xil_AssertVoid(InstancePtr != NULL); diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdptx.h b/XilinxProcessorIPLib/drivers/dp/src/xdptx.h index cd1a8530..290bf095 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdptx.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdptx.h @@ -469,24 +469,6 @@ typedef struct { this branch device. */ } XDptx_SbMsgLinkAddressReplyDeviceInfo; -/******************************************************************************/ -/** - * Callback type which represents a custom timer wait handler. This is only - * used for Microblaze since it doesn't have a native sleep function. To avoid - * dependency on a hardware timer, the default wait functionality is implemented - * using loop iterations; this isn't too accurate. If a custom timer handler is - * used, the user may implement their own wait implementation using a hardware - * timer (see example/) for better accuracy. - * - * @param InstancePtr is a pointer to the XDptx instance. - * @param MicroSeconds is the number of microseconds to be passed to the - * timer function. - * - * @note None. - * -*******************************************************************************/ -typedef void (*XDptx_TimerHandler)(void *InstancePtr, u32 MicroSeconds); - /******************************************************************************/ /** * Callback type which represents the handler for a Hot-Plug-Detect (HPD) event @@ -564,7 +546,7 @@ typedef struct { sideband messages for multi-stream transport (MST) mode. */ - XDptx_TimerHandler UserTimerWaitUs; /**< Custom user function for + XDp_TimerHandler UserTimerWaitUs; /**< Custom user function for delay/sleep. */ void *UserTimerPtr; /**< Pointer to a timer instance used by the custom user @@ -625,7 +607,7 @@ void XDptx_DisableMainLink(XDptx *InstancePtr); void XDptx_ResetPhy(XDptx *InstancePtr, u32 Reset); void XDptx_WaitUs(XDptx *InstancePtr, u32 MicroSeconds); void XDptx_SetUserTimerHandler(XDptx *InstancePtr, - XDptx_TimerHandler CallbackFunc, void *CallbackRef); + XDp_TimerHandler CallbackFunc, void *CallbackRef); /* xdptx_spm.c: Stream policy maker functions. */ void XDptx_CfgMsaRecalculate(XDptx *InstancePtr, u8 Stream);