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-25 11:06:16 +05:30
Xilinx Driver scutimer v2_0: xscutimer.c File Reference
2014-06-24 16:45:01 +05:30
< / title >
2014-08-25 11:06:16 +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-25 11:06:16 +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 > xscutimer.c File Reference< / h1 > < code > #include " < a class = "el" href = "xscutimer_8h.html" > xscutimer.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 = "xscutimer_8c.html#ae35db1bdd114423a1e7fa858ffb8336f" > XScuTimer_CfgInitialize< / a > (< a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > *InstancePtr, < a class = "el" href = "struct_x_scu_timer___config.html" > XScuTimer_Config< / a > *ConfigPtr, u32 EffectiveAddress)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xscutimer_8c.html#abf24fad576d3adab4b53eebdef424bde" > XScuTimer_Start< / a > (< a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > *InstancePtr)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xscutimer_8c.html#aac0376fbfeb5c29bb44403d6fefd0843" > XScuTimer_Stop< / a > (< a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > *InstancePtr)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xscutimer_8c.html#ac6cd65141b00c0d1940d0b8f2a081faf" > XScuTimer_SetPrescaler< / a > (< a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > *InstancePtr, u8 PrescalerValue)< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > u8 < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "xscutimer_8c.html#a56d8c36e4aa28168de3ba5d7f87feb2d" > XScuTimer_GetPrescaler< / a > (< a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > *InstancePtr)< / td > < / tr >
< / table >
< hr / > < a name = "_details" > < / a > < h2 > Detailed Description< / h2 >
< p > Contains the implementation of interface functions of the SCU Timer driver. See < a class = "el" href = "xscutimer_8h.html" > xscutimer.h< / a > for a description of the driver.< / p >
2014-06-24 16:45:01 +05:30
< pre >
2014-08-25 11:06:16 +05:30
MODIFICATION HISTORY:< / pre > < pre > Ver Who Date Changes
2014-06-24 16:45:01 +05:30
----- --- -------- ---------------------------------------------
1.00a nm 03/10/10 First release
2014-08-25 11:06:16 +05:30
< / pre > < hr / > < h2 > Function Documentation< / h2 >
< a class = "anchor" id = "ae35db1bdd114423a1e7fa858ffb8336f" > < / a > <!-- doxytag: member="xscutimer.c::XScuTimer_CfgInitialize" ref="ae35db1bdd114423a1e7fa858ffb8336f" args="(XScuTimer *InstancePtr, XScuTimer_Config *ConfigPtr, u32 EffectiveAddress)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-25 11:06:16 +05:30
< td class = "memname" > int XScuTimer_CfgInitialize < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > , < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< tr >
2014-08-25 11:06:16 +05:30
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_scu_timer___config.html" > XScuTimer_Config< / a > * < / td >
< td class = "paramname" > < em > ConfigPtr< / em > , < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< tr >
2014-08-25 11:06:16 +05:30
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > u32 < / td >
< td class = "paramname" > < em > EffectiveAddress< / em > < / td > < td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< tr >
2014-08-25 11:06:16 +05:30
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-25 11:06:16 +05:30
< / div >
< div class = "memdoc" >
< p > Initialize a specific timer 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_scu_timer.html" > XScuTimer< / a > instance. < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > ConfigPtr< / em > < / td > < td > points to the < a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > configuration structure. < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > EffectiveAddress< / em > < / td > < td > is the base address for the device. It could be a virtual address if address translation is supported in the system, otherwise it is the physical address.< / td > < / tr >
< / table >
2014-08-25 11:06:16 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-25 11:06:16 +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 >
< / ul >
2014-06-24 16:45:01 +05:30
< / dd > < / dl >
2014-08-25 11:06:16 +05:30
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > None. < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "a56d8c36e4aa28168de3ba5d7f87feb2d" > < / a > <!-- doxytag: member="xscutimer.c::XScuTimer_GetPrescaler" ref="a56d8c36e4aa28168de3ba5d7f87feb2d" args="(XScuTimer *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-25 11:06:16 +05:30
< td class = "memname" > u8 XScuTimer_GetPrescaler < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / 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-25 11:06:16 +05:30
< / div >
< div class = "memdoc" >
< p > This function returns the current prescaler value.< / 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_scu_timer.html" > XScuTimer< / a > instance.< / td > < / tr >
< / table >
2014-08-25 11:06:16 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-25 11:06:16 +05:30
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > The prescaler value.< / dd > < / dl >
< dl class = "note" > < dt > < b > Note:< / b > < / dt > < dd > None. < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "ac6cd65141b00c0d1940d0b8f2a081faf" > < / a > <!-- doxytag: member="xscutimer.c::XScuTimer_SetPrescaler" ref="ac6cd65141b00c0d1940d0b8f2a081faf" args="(XScuTimer *InstancePtr, u8 PrescalerValue)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-25 11:06:16 +05:30
< td class = "memname" > void XScuTimer_SetPrescaler < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / a > * < / td >
< td class = "paramname" > < em > InstancePtr< / em > , < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< tr >
2014-08-25 11:06:16 +05:30
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > u8 < / td >
< td class = "paramname" > < em > PrescalerValue< / em > < / td > < td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< tr >
2014-08-25 11:06:16 +05:30
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td > < / td >
2014-06-24 16:45:01 +05:30
< / tr >
< / table >
2014-08-25 11:06:16 +05:30
< / div >
< div class = "memdoc" >
< p > This function sets the prescaler bits in the timer control register.< / 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_scu_timer.html" > XScuTimer< / a > instance. < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > PrescalerValue< / em > < / td > < td > is a 8 bit value that sets the prescaler to use.< / td > < / tr >
< / table >
2014-08-25 11:06:16 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-25 11:06:16 +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 = "abf24fad576d3adab4b53eebdef424bde" > < / a > <!-- doxytag: member="xscutimer.c::XScuTimer_Start" ref="abf24fad576d3adab4b53eebdef424bde" args="(XScuTimer *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-25 11:06:16 +05:30
< td class = "memname" > void XScuTimer_Start < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / 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-25 11:06:16 +05:30
< / div >
< div class = "memdoc" >
< p > Start the 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_scu_timer.html" > XScuTimer< / a > instance.< / td > < / tr >
< / table >
2014-08-25 11:06:16 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-25 11:06:16 +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 = "aac0376fbfeb5c29bb44403d6fefd0843" > < / a > <!-- doxytag: member="xscutimer.c::XScuTimer_Stop" ref="aac0376fbfeb5c29bb44403d6fefd0843" args="(XScuTimer *InstancePtr)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2014-06-24 16:45:01 +05:30
< tr >
2014-08-25 11:06:16 +05:30
< td class = "memname" > void XScuTimer_Stop < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "struct_x_scu_timer.html" > XScuTimer< / 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-25 11:06:16 +05:30
< / div >
< div class = "memdoc" >
< p > Stop the 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_scu_timer.html" > XScuTimer< / a > instance.< / td > < / tr >
< / table >
2014-08-25 11:06:16 +05:30
< / dd >
2014-06-24 16:45:01 +05:30
< / dl >
2014-08-25 11:06:16 +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 >
< / div >
< p class = "Copyright" >
Copyright © 1995-2014 Xilinx, Inc. All rights reserved.
< / p >
< / body >
< / html >