2014-06-24 16:45:01 +05:30
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=iso-8859-1" >
< title >
2014-08-21 17:27:05 +05:30
Xilinx Driver wdttb v3_0: xwdttb.c File Reference
2014-06-24 16:45:01 +05:30
< / title >
2014-08-21 17:27:05 +05:30
< link href = "doxygen_kalyanidocs/doc/css/driver_api_doxygen.css" rel = "stylesheet" type = "text/css" >
2014-06-24 16:45:01 +05:30
< / head >
< h3 class = "PageHeader" > Xilinx Processor IP Library< / h3 >
< hl > Software Drivers< / hl >
< hr class = "whs1" >
2014-08-21 17:27:05 +05:30
<!-- Generated by Doxygen 1.6.1 -->
< div class = "navigation" id = "top" >
< div class = "tabs" >
< ul >
< li > < a href = "index.html" > < span > Main Page< / span > < / a > < / li >
< li > < a href = "annotated.html" > < span > Classes< / span > < / a > < / li >
< li class = "current" > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< / ul >
< / div >
< div class = "tabs" >
< ul >
< li > < a href = "files.html" > < span > File List< / span > < / a > < / li >
< li > < a href = "globals.html" > < span > File Members< / span > < / a > < / li >
< / ul >
< / div >
< / div >
< div class = "contents" >
< h1 > xwdttb.c File Reference< / h1 > < code > #include " xil_types.h" < / code > < br / >
< code > #include " xil_assert.h" < / code > < br / >
< code > #include " xparameters.h" < / code > < br / >
< code > #include " xil_io.h" < / code > < br / >
< code > #include " < a class = "el" href = "xwdttb_8h.html" > xwdttb.h< / a > " < / code > < br / >
< table border = "0" cellpadding = "0" cellspacing = "0" >
< tr > < td colspan = "2" > < h2 > Functions< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > int < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#a069965d73fae1f4b2b9a27e0212304c0" > XWdtTb_Initialize< / a > (< a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > *InstancePtr, u16 DeviceId)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#aab195e280eca1e2985509d954c2e4e52" > XWdtTb_Start< / a > (< a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > *InstancePtr)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > int < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#ad6010e9007dca3b7a1fe928e615b4475" > XWdtTb_Stop< / a > (< a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > *InstancePtr)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > int < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#a9b349652da0f47eaac2b1766a1f237fc" > XWdtTb_IsWdtExpired< / a > (< a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > *InstancePtr)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#ae1f036194a32943f4e058f51b8f64358" > XWdtTb_RestartWdt< / a > (< a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > *InstancePtr)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > u32 < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#a9cd1c306bdea0951ef54d3f854cc0c2c" > XWdtTb_GetTbValue< / a > (< a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > *InstancePtr)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "struct_x_wdt_tb___config.html" > XWdtTb_Config< / a > * < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#a14a07eb4184572676004f3d965ebb7fd" > XWdtTb_LookupConfig< / a > (u16 DeviceId)< / td > < / tr >
< tr > < td colspan = "2" > < h2 > Variables< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "struct_x_wdt_tb___config.html" > XWdtTb_Config< / a > < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xwdttb_8c.html#a063bf798221700733fe7126926daa3b1" > XWdtTb_ConfigTable< / a > []< / td > < / tr >
< / table >
< hr / > < a name = "_details" > < / a > < h2 > Detailed Description< / h2 >
< p > Contains the required functions of the < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > driver. See < a class = "el" href = "xwdttb_8h.html" > xwdttb.h< / a > for a description of the driver.< / p >
2014-06-24 16:45:01 +05:30
< pre >
2014-08-21 17:27:05 +05:30
MODIFICATION HISTORY:< / pre > < pre > Ver Who Date Changes
2014-06-24 16:45:01 +05:30
----- ---- -------- -----------------------------------------------
1.00a ecm 08/16/01 First release
1.00b jhl 02/21/02 Repartitioned the driver for smaller files
1.00b rpm 04/26/02 Made LookupConfig public
1.10b mta 03/23/07 Updated to new coding style
2.00a ktn 10/22/09 Updated to use the HAL processor APIs/macros.
2014-08-21 17:27:05 +05:30
< / pre > < hr / > < h2 > Function Documentation< / h2 >
< a class = "anchor" id = "a9cd1c306bdea0951ef54d3f854cc0c2c" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_GetTbValue" ref="a9cd1c306bdea0951ef54d3f854cc0c2c" args="(XWdtTb *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-21 17:27:05 +05:30
< td class = "memname" > u32 XWdtTb_GetTbValue < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > < / td >
< td > ) < / td >
< td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / div >
< div class = "memdoc" >
< p > Returns the current contents of the timebase.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
2014-06-24 16:45:01 +05:30
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > InstancePtr< / em > < / td > < td > is a pointer to the < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance to be worked on.< / td > < / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-21 17:27:05 +05:30
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > The contents of the timebase.< / dd > < / dl >
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > None. < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "a069965d73fae1f4b2b9a27e0212304c0" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_Initialize" ref="a069965d73fae1f4b2b9a27e0212304c0" args="(XWdtTb *InstancePtr, u16 DeviceId)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-21 17:27:05 +05:30
< td class = "memname" > int XWdtTb_Initialize < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > , < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< tr >
2014-08-21 17:27:05 +05:30
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > u16 < / td >
< td class = "paramname" > < em > DeviceId< / em > < / td > < td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< tr >
2014-08-21 17:27:05 +05:30
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / div >
< div class = "memdoc" >
< p > Initialize a specific watchdog timer/timebase instance/driver. This function must be called before other functions of the driver are called.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
2014-06-24 16:45:01 +05:30
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > InstancePtr< / em > < / td > < td > is a pointer to the < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance to be worked on. < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > DeviceId< / em > < / td > < td > is the unique id of the device controlled by this < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance. Passing in a device id associates the generic < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance to a specific device, as chosen by the caller or application developer.< / td > < / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-21 17:27:05 +05:30
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > < ul >
< li > XST_SUCCESS if initialization was successful< / li >
< li > XST_DEVICE_IS_STARTED if the device has already been started< / li >
< li > XST_DEVICE_NOT_FOUND if the configuration for device ID was not found< / li >
< / ul >
2014-06-24 16:45:01 +05:30
< / dd > < / dl >
2014-08-21 17:27:05 +05:30
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > None. < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "a9b349652da0f47eaac2b1766a1f237fc" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_IsWdtExpired" ref="a9b349652da0f47eaac2b1766a1f237fc" args="(XWdtTb *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-21 17:27:05 +05:30
< td class = "memname" > int XWdtTb_IsWdtExpired < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > < / td >
< td > ) < / td >
< td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / div >
< div class = "memdoc" >
< p > Check if the watchdog timer has expired. This function is used for polled mode and it is also used to check if the last reset was caused by the watchdog timer.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
2014-06-24 16:45:01 +05:30
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > InstancePtr< / em > < / td > < td > is a pointer to the < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance to be worked on.< / td > < / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-21 17:27:05 +05:30
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > TRUE if the watchdog has expired, and FALSE otherwise.< / dd > < / dl >
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > None. < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "a14a07eb4184572676004f3d965ebb7fd" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_LookupConfig" ref="a14a07eb4184572676004f3d965ebb7fd" args="(u16 DeviceId)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-21 17:27:05 +05:30
< td class = "memname" > < a class = "el" href = "struct_x_wdt_tb___config.html" > XWdtTb_Config< / a > * XWdtTb_LookupConfig < / td >
< td > (< / td >
< td class = "paramtype" > u16 < / td >
< td class = "paramname" > < em > DeviceId< / em > < / td >
< td > ) < / td >
< td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / div >
< div class = "memdoc" >
2014-06-24 16:45:01 +05:30
2014-08-21 17:27:05 +05:30
< / div >
< / div >
< a class = "anchor" id = "ae1f036194a32943f4e058f51b8f64358" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_RestartWdt" ref="ae1f036194a32943f4e058f51b8f64358" args="(XWdtTb *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void XWdtTb_RestartWdt < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > < / td >
< td > ) < / td >
< td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > Restart the watchdog timer. An application needs to call this function periodically to keep the timer from asserting the reset output.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
2014-06-24 16:45:01 +05:30
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > InstancePtr< / em > < / td > < td > is a pointer to the < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance to be worked on.< / td > < / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-21 17:27:05 +05:30
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > None.< / dd > < / dl >
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > None. < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "aab195e280eca1e2985509d954c2e4e52" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_Start" ref="aab195e280eca1e2985509d954c2e4e52" args="(XWdtTb *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-21 17:27:05 +05:30
< td class = "memname" > void XWdtTb_Start < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > < / td >
< td > ) < / td >
< td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / div >
< div class = "memdoc" >
< p > Start the watchdog timer of the device.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
2014-06-24 16:45:01 +05:30
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > InstancePtr< / em > < / td > < td > is a pointer to the < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance to be worked on.< / td > < / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-21 17:27:05 +05:30
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > None.< / dd > < / dl >
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > The Timebase is reset to 0 when the Watchdog Timer is started. The Timebase is always incrementing < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "ad6010e9007dca3b7a1fe928e615b4475" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_Stop" ref="ad6010e9007dca3b7a1fe928e615b4475" args="(XWdtTb *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-21 17:27:05 +05:30
< td class = "memname" > int XWdtTb_Stop < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > < / td >
< td > ) < / td >
< td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / div >
< div class = "memdoc" >
< p > Disable the watchdog timer.< / p >
< p > It is the caller's responsibility to disconnect the interrupt handler of the watchdog timer from the interrupt source, typically an interrupt controller, and disable the interrupt in the interrupt controller.< / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
2014-06-24 16:45:01 +05:30
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > InstancePtr< / em > < / td > < td > is a pointer to the < a class = "el" href = "struct_x_wdt_tb.html" > XWdtTb< / a > instance to be worked on.< / td > < / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-21 17:27:05 +05:30
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > < ul >
< li > XST_SUCCESS if the watchdog was stopped successfully< / li >
< li > XST_NO_FEATURE if the watchdog cannot be stopped< / li >
< / ul >
2014-06-24 16:45:01 +05:30
< / dd > < / dl >
2014-08-21 17:27:05 +05:30
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > < / dd > < / dl >
< p > The hardware configuration controls this functionality. If it is not allowed by the hardware the failure will be returned and the timer will continue without interruption. < / p >
< / div >
< / div >
< hr / > < h2 > Variable Documentation< / h2 >
< a class = "anchor" id = "a063bf798221700733fe7126926daa3b1" > < / a > <!-- doxytag: member="xwdttb.c::XWdtTb_ConfigTable" ref="a063bf798221700733fe7126926daa3b1" args="[]" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-21 17:27:05 +05:30
< td class = "memname" > < a class = "el" href = "struct_x_wdt_tb___config.html" > XWdtTb_Config< / a > < a class = "el" href = "xwdttb__g_8c.html#aa17c2f5fdfae5db7362900b7ea2f6b73" > XWdtTb_ConfigTable< / a > []< / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-21 17:27:05 +05:30
< / div >
< div class = "memdoc" >
< p > This table contains configuration information for each watchdog timer device in the system. < / p >
< / div >
< / div >
< / div >
< p class = "Copyright" >
Copyright © 1995-2014 Xilinx, Inc. All rights reserved.
< / p >
< / body >
< / html >
2014-06-24 16:45:01 +05:30