embeddedsw/XilinxProcessorIPLib/drivers/intc/doc/html/api/xintc_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

614 lines
31 KiB
HTML
Executable file

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
xintc.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>xintc.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Contains required functions for the <a class="el" href="struct_x_intc.html">XIntc</a> driver for the Xilinx Interrupt Controller. See xintc.h for a detailed description of the driver.<p>
<pre>
MODIFICATION HISTORY:</pre><p>
<pre> Ver Who Date Changes
----- ---- -------- --------------------------------------------------------
1.00a ecm 08/16/01 First release
1.00b jhl 02/21/02 Repartitioned the driver for smaller files
1.00b jhl 04/24/02 Made LookupConfig global and compressed ack before table
in the configuration into a bit mask
1.00c rpm 10/17/03 New release. Support the static vector table created
in the <a class="el" href="xintc__g_8c.html">xintc_g.c</a> configuration table.
1.00c rpm 04/23/04 Removed check in XIntc_Connect for a previously connected
handler. Always overwrite the vector table handler with
the handler provided as an argument.
1.10c mta 03/21/07 Updated to new coding style
1.11a sv 11/21/07 Updated driver to support access through a DCR bridge
2.00a ktn 10/20/09 Updated to use HAL Processor APIs.
2.04a bss 01/13/12 Added XIntc_ConnectFastHandler API for Fast Interrupt
and XIntc_SetNormalIntrMode for setting to normal
interrupt mode.
2.05a bss 08/16/12 Updated to support relocatable vectors in Microblaze,
updated XIntc_SetNormalIntrMode to use IntVectorAddr
which is the interrupt vector address
2.06a bss 01/28/13 To support Cascade mode:
Modified XIntc_Initialize,XIntc_Start,XIntc_Connect
XIntc_Disconnect,XIntc_Enable,XIntc_Disable,
XIntc_Acknowledge,XIntc_ConnectFastHandler and
XIntc_SetNormalIntrMode APIs.
Added XIntc_InitializeSlaves API.
3.0 bss 01/28/13 Modified to initialize IVAR register with
XPAR_MICROBLAZE_BASE_VECTORS + 0x10 to fix
CR#765931</pre><p>
<pre> </pre>
<p>
<code>#include &quot;xil_types.h&quot;</code><br>
<code>#include &quot;xil_assert.h&quot;</code><br>
<code>#include &quot;xintc.h&quot;</code><br>
<code>#include &quot;<a class="el" href="xintc__l_8h.html">xintc_l.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="xintc__i_8h.html">xintc_i.h</a>&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="xintc_8c.html#7c8a907cb2e7bcd5113769edf5538643">XIntc_Initialize</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u16 DeviceId)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#7f1c19d64264e3d548add558459b6561">XIntc_Start</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Mode)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#918fb865ec6080684fa0ed79e57efc2b">XIntc_Stop</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#7c9a19a3e2ccaff360942cfb23b5e6d5">XIntc_Connect</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Id, XInterruptHandler 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="xintc_8c.html#6e44c9e8afcb2f68584b368a9299b47c">XIntc_Disconnect</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#03580a6ea641a7315140999b580e392d">XIntc_Enable</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#116d8f4e4b4daed542342dc92003d79b">XIntc_Disable</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#cc4b8705976ef39f15e4c799b0ab7cf6">XIntc_Acknowledge</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="struct_x_intc___config.html">XIntc_Config</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#6a45ff66d8968a88334911bef10e3d51">XIntc_LookupConfig</a> (u16 DeviceId)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#23391b749a83393f272b608437f04be1">XIntc_ConnectFastHandler</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Id, XFastInterruptHandler Handler)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xintc_8c.html#f42041536042e54bfff6d949f4dbeffc">XIntc_SetNormalIntrMode</a> (<a class="el" href="struct_x_intc.html">XIntc</a> *InstancePtr, u8 Id)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="cc4b8705976ef39f15e4c799b0ab7cf6"></a><!-- doxytag: member="xintc.c::XIntc_Acknowledge" ref="cc4b8705976ef39f15e4c799b0ab7cf6" args="(XIntc *InstancePtr, u8 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 XIntc_Acknowledge </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>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>
Acknowledges the interrupt source provided as the argument Id. When the interrupt is acknowledged, it causes the interrupt controller to clear its interrupt condition.In Cascade mode, acknowledges corresponding interrupt source of Slave controllers depending on the Id.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XPAR_INTC_MAX_NUM_INTR_INPUTS - 1 with 0 being the highest priority interrupt.</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="7c9a19a3e2ccaff360942cfb23b5e6d5"></a><!-- doxytag: member="xintc.c::XIntc_Connect" ref="7c9a19a3e2ccaff360942cfb23b5e6d5" args="(XIntc *InstancePtr, u8 Id, XInterruptHandler 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 XIntc_Connect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>Id</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>XInterruptHandler&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 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. In Cascade mode, connects handler to Slave controller handler table depending on the interrupt Id.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XPAR_INTC_MAX_NUM_INTR_INPUTS - 1 with 0 being the highest priority interrupt. </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="23391b749a83393f272b608437f04be1"></a><!-- doxytag: member="xintc.c::XIntc_ConnectFastHandler" ref="23391b749a83393f272b608437f04be1" args="(XIntc *InstancePtr, u8 Id, XFastInterruptHandler Handler)" --><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 XIntc_ConnectFastHandler </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>Id</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>XFastInterruptHandler&nbsp;</td>
<td class="mdname" nowrap> <em>Handler</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 Id of the interrupt source and the associated handler that is to run when the interrupt is recognized.In Cascade mode, connects handler to corresponding Slave controller IVAR register depending on the Id and sets all interrupt sources of the Slave controller as fast interrupts.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XPAR_INTC_MAX_NUM_INTR_INPUTS - 1 with 0 being the highest priority interrupt. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Handler</em>&nbsp;</td><td>to the handler for that interrupt.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>Slave controllers in Cascade Mode should have all as Fast interrupts or Normal interrupts, mixed interrupts are not supported</dd></dl>
WARNING: The handler provided as an argument will overwrite any handler that was previously connected. </td>
</tr>
</table>
<a class="anchor" name="116d8f4e4b4daed542342dc92003d79b"></a><!-- doxytag: member="xintc.c::XIntc_Disable" ref="116d8f4e4b4daed542342dc92003d79b" args="(XIntc *InstancePtr, u8 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 XIntc_Disable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>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 Id such that the interrupt controller will not cause interrupts for the specified Id. The interrupt controller will continue to hold an interrupt condition for the Id, but will not cause an interrupt.In Cascade mode, disables corresponding interrupt of Slave controllers depending on the Id.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XPAR_INTC_MAX_NUM_INTR_INPUTS - 1 with 0 being the highest priority interrupt.</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="6e44c9e8afcb2f68584b368a9299b47c"></a><!-- doxytag: member="xintc.c::XIntc_Disconnect" ref="6e44c9e8afcb2f68584b368a9299b47c" args="(XIntc *InstancePtr, u8 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 XIntc_Disconnect </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>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 Id. This effectively disconnects that interrupt source from any handler. The interrupt is disabled also. In Cascade mode, disconnects handler from Slave controller handler table depending on the interrupt Id.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XPAR_INTC_MAX_NUM_INTR_INPUTS - 1 with 0 being the highest priority interrupt.</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="03580a6ea641a7315140999b580e392d"></a><!-- doxytag: member="xintc.c::XIntc_Enable" ref="03580a6ea641a7315140999b580e392d" args="(XIntc *InstancePtr, u8 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 XIntc_Enable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>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 Id. Any pending interrupt condition for the specified Id will occur after this function is called. In Cascade mode, enables corresponding interrupt of Slave controllers depending on the Id.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XPAR_INTC_MAX_NUM_INTR_INPUTS - 1 with 0 being the highest priority interrupt.</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="7c8a907cb2e7bcd5113769edf5538643"></a><!-- doxytag: member="xintc.c::XIntc_Initialize" ref="7c8a907cb2e7bcd5113769edf5538643" args="(XIntc *InstancePtr, u16 DeviceId)" --><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 XIntc_Initialize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u16&nbsp;</td>
<td class="mdname" nowrap> <em>DeviceId</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>
Initialize a specific interrupt controller instance/driver. The initialization entails:<p>
<ul>
<li>Initialize fields of the <a class="el" href="struct_x_intc.html">XIntc</a> structure</li><li>Initial vector table with stub function calls</li><li>All interrupt sources are disabled</li><li>Interrupt output is 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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>DeviceId</em>&nbsp;</td><td>is the unique id of the device controlled by this <a class="el" href="struct_x_intc.html">XIntc</a> instance. Passing in a device id associates the generic <a class="el" href="struct_x_intc.html">XIntc</a> instance to a specific device, as chosen by the caller or application developer.</td></tr>
</table>
</dl>
<dl compact><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 device configuration information was not found for a device with the supplied device ID.</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>In Cascade mode this function calls XIntc_InitializeSlaves to initialiaze Slave Interrupt controllers. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="6a45ff66d8968a88334911bef10e3d51"></a><!-- doxytag: member="xintc.c::XIntc_LookupConfig" ref="6a45ff66d8968a88334911bef10e3d51" args="(u16 DeviceId)" --><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"><a class="el" href="struct_x_intc___config.html">XIntc_Config</a>* XIntc_LookupConfig </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">u16&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>DeviceId</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Looks up the device configuration based on the unique device ID. A table contains the configuration info for each device in the system.<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>DeviceId</em>&nbsp;</td><td>is the unique identifier for a device.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A pointer to the <a class="el" href="struct_x_intc.html">XIntc</a> configuration structure for the specified device, or NULL if the device was not found.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="f42041536042e54bfff6d949f4dbeffc"></a><!-- doxytag: member="xintc.c::XIntc_SetNormalIntrMode" ref="f42041536042e54bfff6d949f4dbeffc" args="(XIntc *InstancePtr, u8 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 XIntc_SetNormalIntrMode </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>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>
Sets the normal interrupt mode for the specified interrupt in the Interrupt Mode Register. In Cascade mode disconnects handler from corresponding Slave controller IVAR register depending on the Id and sets all interrupt sources of the Slave controller as normal interrupts.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Id</em>&nbsp;</td><td>contains the ID of the interrupt source and should be in the range of 0 to XPAR_INTC_MAX_NUM_INTR_INPUTS - 1 with 0 being the highest priority interrupt.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>Slave controllers in Cascade Mode should have all as Fast interrupts or Normal interrupts, mixed interrupts are not supported </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="7f1c19d64264e3d548add558459b6561"></a><!-- doxytag: member="xintc.c::XIntc_Start" ref="7f1c19d64264e3d548add558459b6561" args="(XIntc *InstancePtr, u8 Mode)" --><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 XIntc_Start </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</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>u8&nbsp;</td>
<td class="mdname" nowrap> <em>Mode</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>
Starts the interrupt controller by enabling the output from the controller to the processor. Interrupts may be generated by the interrupt controller after this function is called.<p>
It is necessary for the caller to connect the interrupt handler of this component to the proper interrupt source. This function also starts Slave controllers in Cascade mode.<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_intc.html">XIntc</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Mode</em>&nbsp;</td><td>determines if software is allowed to simulate interrupts or real interrupts are allowed to occur. Note that these modes are mutually exclusive. The interrupt controller hardware resets in a mode that allows software to simulate interrupts until this mode is exited. It cannot be reentered once it has been exited.</td></tr>
</table>
</dl>
One of the following values should be used for the mode.<ul>
<li>XIN_SIMULATION_MODE enables simulation of interrupts only</li><li>XIN_REAL_MODE enables hardware interrupts only</li></ul>
<p>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS if the device was started successfully</li><li>XST_FAILURE if simulation mode was specified and it could not be set because real mode has already been entered.</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>Must be called after <a class="el" href="struct_x_intc.html">XIntc</a> initialization is completed. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="918fb865ec6080684fa0ed79e57efc2b"></a><!-- doxytag: member="xintc.c::XIntc_Stop" ref="918fb865ec6080684fa0ed79e57efc2b" args="(XIntc *InstancePtr)" --><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 XIntc_Stop </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_intc.html">XIntc</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Stops the interrupt controller by disabling the output from the controller so that no interrupts will be caused by the interrupt controller.<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_intc.html">XIntc</a> instance to be worked on.</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>
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.