embeddedsw/XilinxProcessorIPLib/drivers/scugic/doc/html/api/xscugic_8c.html
Jagannadha Sutradharudu Teki 2c8f92039d embeddesw: Add initial code support
Added initial support Xilinx Embedded Software.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-06-24 16:45:01 +05:30

516 lines
26 KiB
HTML
Executable file

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
xscugic.c File Reference
</title>
<link href="$DriverApiDocsCssPath" rel="stylesheet" type="text/css">
</head>
<h3 class="PageHeader">Xilinx Processor IP Library</h3>
<hl>Software Drivers</hl>
<hr class="whs1">
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li id="current"><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul></div>
<h1>xscugic.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Contains required functions for the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> driver for the Interrupt Controller. See xscugic.h for a detailed description of the driver.<p>
<pre>
MODIFICATION HISTORY:</pre><p>
<pre> Ver Who Date Changes
----- ---- -------- --------------------------------------------------------
1.00a drg 01/19/10 First release
1.01a sdm 11/09/11 Changes are made in function XScuGic_CfgInitialize. Since
"Config" entry is now made as pointer in the <a class="el" href="struct_x_scu_gic.html">XScuGic</a>
structure, necessary changes are made.
The HandlerTable can now be populated through the low
level routine XScuGic_RegisterHandler added in this
release. Hence necessary checks are added not to
overwrite the HandlerTable entriesin function
XScuGic_CfgInitialize.
1.03a srt 02/27/13 Added APIs<ul>
<li><a class="el" href="xscugic__hw_8c.html#176144512a1c81f6b4f2ad2c51dce289">XScuGic_SetPriTrigTypeByDistAddr()</a></li><li><a class="el" href="xscugic__hw_8c.html#57ce50ab23b8fed89ff9d5f80e4e3591">XScuGic_GetPriTrigTypeByDistAddr()</a>
Removed Offset calculation macros, defined in _hw.h
(CR 702687)
Added support to direct interrupts to the appropriate CPU. Earlier
interrupts were directed to CPU1 (hard coded). Now depending
upon the CPU selected by the user (xparameters.h), interrupts
will be directed to the relevant CPU. This fixes CR 699688.</li></ul>
</pre><p>
<pre> 1.04a hk 05/04/13 Assigned EffectiveAddr to CpuBaseAddress in
XScuGic_CfgInitialize. Fix for CR#704400 to remove warnings.
Moved functions XScuGic_SetPriTrigTypeByDistAddr and
XScuGic_GetPriTrigTypeByDistAddr to <a class="el" href="xscugic__hw_8c.html">xscugic_hw.c</a>.
This is fix for CR#705621.
1.06a asa 16/11/13 Fix for CR#749178. Assignment for EffectiveAddr
in function XScuGic_CfgInitialize is removed as it was
a bug.</pre><p>
<pre> </pre>
<p>
<code>#include &quot;xparameters.h&quot;</code><br>
<code>#include &quot;xil_types.h&quot;</code><br>
<code>#include &quot;xil_assert.h&quot;</code><br>
<code>#include &quot;xscugic.h&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#de86b0650de01cdbefbe5e42147b3a1a">XScuGic_CfgInitialize</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, <a class="el" href="struct_x_scu_gic___config.html">XScuGic_Config</a> *ConfigPtr, u32 EffectiveAddr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#27e3af2662c65df60b3d0211c68162f9">XScuGic_Connect</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, u32 Int_Id, Xil_InterruptHandler Handler, void *CallBackRef)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#f35fc828e3ecd0472a950fb0e912f5b0">XScuGic_Disconnect</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, u32 Int_Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#44f0f96392fa13aa00ab919fcf31ee65">XScuGic_Enable</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, u32 Int_Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#61057d3d6ec0d4ddfa0493384ed25502">XScuGic_Disable</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, u32 Int_Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#86a00f0d429e2d13a43c5b774ed0c283">XScuGic_SoftwareIntr</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, u32 Int_Id, u32 Cpu_Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#76a2ec06003ab476760dbafc6029c877">XScuGic_SetPriorityTriggerType</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, u32 Int_Id, u8 Priority, u8 Trigger)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscugic_8c.html#fb66ce341081b4947907ff53ff542889">XScuGic_GetPriorityTriggerType</a> (<a class="el" href="struct_x_scu_gic.html">XScuGic</a> *InstancePtr, u32 Int_Id, u8 *Priority, u8 *Trigger)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="de86b0650de01cdbefbe5e42147b3a1a"></a><!-- doxytag: member="xscugic.c::XScuGic_CfgInitialize" ref="de86b0650de01cdbefbe5e42147b3a1a" args="(XScuGic *InstancePtr, XScuGic_Config *ConfigPtr, u32 EffectiveAddr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XScuGic_CfgInitialize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="struct_x_scu_gic___config.html">XScuGic_Config</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>ConfigPtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>EffectiveAddr</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
CfgInitialize a specific interrupt controller instance/driver. The initialization entails:<p>
<ul>
<li>Initialize fields of the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> structure</li><li>Initial vector table with stub function calls</li><li>All interrupt sources are disabled</li></ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ConfigPtr</em>&nbsp;</td><td>is a pointer to a config table for the particular device this driver is associated with. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>EffectiveAddr</em>&nbsp;</td><td>is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, use Config-&gt;BaseAddress for this parameters, passing the physical address instead.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS if initialization was successful</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="27e3af2662c65df60b3d0211c68162f9"></a><!-- doxytag: member="xscugic.c::XScuGic_Connect" ref="27e3af2662c65df60b3d0211c68162f9" args="(XScuGic *InstancePtr, u32 Int_Id, Xil_InterruptHandler Handler, void *CallBackRef)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XScuGic_Connect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Int_Id</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>Xil_InterruptHandler&nbsp;</td>
<td class="mdname" nowrap> <em>Handler</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>void *&nbsp;</td>
<td class="mdname" nowrap> <em>CallBackRef</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Makes the connection between the Int_Id of the interrupt source and the associated handler that is to run when the interrupt is recognized. The argument provided in this call as the Callbackref is used as the argument for the handler when it is called.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Int_Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XSCUGIC_MAX_NUM_INTR_INPUTS - 1 </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Handler</em>&nbsp;</td><td>to the handler for that interrupt. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>CallBackRef</em>&nbsp;</td><td>is the callback reference, usually the instance pointer of the connecting driver.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
<ul>
<li>XST_SUCCESS if the handler was connected correctly.</li></ul>
<p>
<dl compact><dt><b>Note:</b></dt><dd></dd></dl>
WARNING: The handler provided as an argument will overwrite any handler that was previously connected. </td>
</tr>
</table>
<a class="anchor" name="61057d3d6ec0d4ddfa0493384ed25502"></a><!-- doxytag: member="xscugic.c::XScuGic_Disable" ref="61057d3d6ec0d4ddfa0493384ed25502" args="(XScuGic *InstancePtr, u32 Int_Id)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuGic_Disable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Int_Id</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Disables the interrupt source provided as the argument Int_Id such that the interrupt controller will not cause interrupts for the specified Int_Id. The interrupt controller will continue to hold an interrupt condition for the Int_Id, but will not cause an interrupt.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Int_Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XSCUGIC_MAX_NUM_INTR_INPUTS - 1</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="f35fc828e3ecd0472a950fb0e912f5b0"></a><!-- doxytag: member="xscugic.c::XScuGic_Disconnect" ref="f35fc828e3ecd0472a950fb0e912f5b0" args="(XScuGic *InstancePtr, u32 Int_Id)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuGic_Disconnect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Int_Id</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Updates the interrupt table with the Null Handler and NULL arguments at the location pointed at by the Int_Id. This effectively disconnects that interrupt source from any handler. The interrupt is disabled also.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Int_Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XSCUGIC_MAX_NUM_INTR_INPUTS - 1</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="44f0f96392fa13aa00ab919fcf31ee65"></a><!-- doxytag: member="xscugic.c::XScuGic_Enable" ref="44f0f96392fa13aa00ab919fcf31ee65" args="(XScuGic *InstancePtr, u32 Int_Id)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuGic_Enable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Int_Id</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Enables the interrupt source provided as the argument Int_Id. Any pending interrupt condition for the specified Int_Id will occur after this function is called.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Int_Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XSCUGIC_MAX_NUM_INTR_INPUTS - 1</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="fb66ce341081b4947907ff53ff542889"></a><!-- doxytag: member="xscugic.c::XScuGic_GetPriorityTriggerType" ref="fb66ce341081b4947907ff53ff542889" args="(XScuGic *InstancePtr, u32 Int_Id, u8 *Priority, u8 *Trigger)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuGic_GetPriorityTriggerType </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Int_Id</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u8 *&nbsp;</td>
<td class="mdname" nowrap> <em>Priority</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u8 *&nbsp;</td>
<td class="mdname" nowrap> <em>Trigger</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the interrupt priority and trigger type for the specificd IRQ source.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Int_Id</em>&nbsp;</td><td>is the IRQ source number to modify </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Priority</em>&nbsp;</td><td>is a pointer to the value of the priority of the IRQ source. This is a return value. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Trigger</em>&nbsp;</td><td>is pointer to the value of the trigger of the IRQ source. This is a return value.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="76a2ec06003ab476760dbafc6029c877"></a><!-- doxytag: member="xscugic.c::XScuGic_SetPriorityTriggerType" ref="76a2ec06003ab476760dbafc6029c877" args="(XScuGic *InstancePtr, u32 Int_Id, u8 Priority, u8 Trigger)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuGic_SetPriorityTriggerType </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Int_Id</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u8&nbsp;</td>
<td class="mdname" nowrap> <em>Priority</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u8&nbsp;</td>
<td class="mdname" nowrap> <em>Trigger</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets the interrupt priority and trigger type for the specificd IRQ source.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Int_Id</em>&nbsp;</td><td>is the IRQ source number to modify </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Priority</em>&nbsp;</td><td>is the new priority for the IRQ source. 0 is highest priority, 0xF8 (248) is lowest. There are 32 priority levels supported with a step of 8. Hence the supported priorities are 0, 8, 16, 32, 40 ..., 248. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Trigger</em>&nbsp;</td><td>is the new trigger type for the IRQ source. Each bit pair describes the configuration for an INT_ID. SFI Read Only b10 always PPI Read Only depending on how the PPIs are configured. b01 Active HIGH level sensitive b11 Rising edge sensitive SPI LSB is read only. b01 Active HIGH level sensitive b11 Rising edge sensitive/</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="86a00f0d429e2d13a43c5b774ed0c283"></a><!-- doxytag: member="xscugic.c::XScuGic_SoftwareIntr" ref="86a00f0d429e2d13a43c5b774ed0c283" args="(XScuGic *InstancePtr, u32 Int_Id, u32 Cpu_Id)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XScuGic_SoftwareIntr </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_gic.html">XScuGic</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Int_Id</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Cpu_Id</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Allows software to simulate an interrupt in the interrupt controller. This function will only be successful when the interrupt controller has been started in simulation mode. A simulated interrupt allows the interrupt controller to be tested without any device to drive an interrupt input signal into it.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_scu_gic.html">XScuGic</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Int_Id</em>&nbsp;</td><td>is the software interrupt ID to simulate an interrupt. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Cpu_Id</em>&nbsp;</td><td>is the list of CPUs to send the interrupt.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
XST_SUCCESS if successful, or XST_FAILURE if the interrupt could not be simulated<p>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.