500 lines
24 KiB
HTML
500 lines
24 KiB
HTML
![]() |
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||
|
<title>
|
||
|
xsdps.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 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 List</span></a></li>
|
||
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
||
|
</ul></div>
|
||
|
<h1>xsdps.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
Contains the interface functions of the <a class="el" href="struct_x_sd_ps.html">XSdPs</a> driver. See xsdps.h for a detailed description of the device and driver.<p>
|
||
|
<pre>
|
||
|
MODIFICATION HISTORY:</pre><p>
|
||
|
<pre> Ver Who Date Changes
|
||
|
----- --- -------- -----------------------------------------------
|
||
|
1.00a hk/sg 10/17/13 Initial release
|
||
|
2.0 hk 12/13/13 Added check for arm to use sleep.h and its API's
|
||
|
2.1 hk 04/18/14 Add sleep for microblaze designs. CR# 781117.</pre><p>
|
||
|
<pre> </pre>
|
||
|
<p>
|
||
|
<code>#include "xsdps.h"</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">u32 </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#0825621f8b8533515d7eeb9f41551fee">XSdPs_FrameCmd</a> (u32 Cmd)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#a86ac5ead6682ab2c3ae34f000c15545">XSdPs_CmdTransfer</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr, u32 Cmd, u32 Arg, u32 BlkCnt)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#0dd3c70f071d842d1b8545b5ab5652bf">XSdPs_SetupADMA2DescTbl</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr, u32 BlkCnt, const u8 *Buff)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#c53ecedb33ec7c509e1e988dc495d9f1">XSdPs_CfgInitialize</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr, <a class="el" href="struct_x_sd_ps___config.html">XSdPs_Config</a> *ConfigPtr, u32 EffectiveAddr)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#847a3b8c5ad1aa9cb80f252b0a774be0">XSdPs_SdCardInitialize</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#592d7b284d11aa7f81caaca0ea019f15">XSdPs_ReadPolled</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr, u32 Arg, u32 BlkCnt, u8 *Buff)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#4eac14d98e7ff6aad749db42d424726b">XSdPs_WritePolled</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr, u32 Arg, u32 BlkCnt, const u8 *Buff)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#44990923e1855372c954048c09c729b0">XSdPs_Select_Card</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsdps_8c.html#b4063a8889344a8a756e89aac987836c">XSdPs_MmcCardInitialize</a> (<a class="el" href="struct_x_sd_ps.html">XSdPs</a> *InstancePtr)</td></tr>
|
||
|
|
||
|
</table>
|
||
|
<hr><h2>Function Documentation</h2>
|
||
|
<a class="anchor" name="c53ecedb33ec7c509e1e988dc495d9f1"></a><!-- doxytag: member="xsdps.c::XSdPs_CfgInitialize" ref="c53ecedb33ec7c509e1e988dc495d9f1" args="(XSdPs *InstancePtr, XSdPs_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 XSdPs_CfgInitialize </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </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_sd_ps___config.html">XSdPs_Config</a> * </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 </td>
|
||
|
<td class="mdname" nowrap> <em>EffectiveAddr</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Initializes a specific <a class="el" href="struct_x_sd_ps.html">XSdPs</a> instance such that the driver is ready to use.<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> </td><td>is a pointer to the <a class="el" href="struct_x_sd_ps.html">XSdPs</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>ConfigPtr</em> </td><td>is a reference to a structure containing information about a specific SD device. This function initializes an InstancePtr object for a specific device specified by the contents of Config. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>EffectiveAddr</em> </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 ConfigPtr->Config.BaseAddress for this device.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if successful.</li><li>XST_DEVICE_IS_STARTED if the device is already started. It must be stopped to re-initialize.</li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>This function initializes the host controller. Initial clock of 400KHz is set. Voltage of 3.3V is selected as that is supported by host. Interrupts status is enabled and signal disabled by default. Default data direction is card to host and 32 bit ADMA2 is selected. Defualt Block size is 512 bytes. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="a86ac5ead6682ab2c3ae34f000c15545"></a><!-- doxytag: member="xsdps.c::XSdPs_CmdTransfer" ref="a86ac5ead6682ab2c3ae34f000c15545" args="(XSdPs *InstancePtr, u32 Cmd, u32 Arg, u32 BlkCnt)" --><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 XSdPs_CmdTransfer </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </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 </td>
|
||
|
<td class="mdname" nowrap> <em>Cmd</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u32 </td>
|
||
|
<td class="mdname" nowrap> <em>Arg</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u32 </td>
|
||
|
<td class="mdname" nowrap> <em>BlkCnt</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
This function does SD command generation.<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> </td><td>is a pointer to the instance to be worked on. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Cmd</em> </td><td>is the command to be sent. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Arg</em> </td><td>is the argument to be sent along with the command. This could be address or any other information </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>BlkCnt</em> </td><td>- Block count passed by the user.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if initialization was successful</li><li>XST_FAILURE if failure - could be because another transfer is in progress or command or data inhibit is set </li></ul>
|
||
|
</dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="0825621f8b8533515d7eeb9f41551fee"></a><!-- doxytag: member="xsdps.c::XSdPs_FrameCmd" ref="0825621f8b8533515d7eeb9f41551fee" args="(u32 Cmd)" --><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">u32 XSdPs_FrameCmd </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top">u32 </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>Cmd</em> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
This function frames the Command register for a particular command. Note that this generates only the command register value i.e. the upper 16 bits of the transfer mode and command register. This value is already shifted to be upper 16 bits and can be directly OR'ed with transfer mode register value.<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>Command</em> </td><td>to be sent.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd>Command register value complete with response type and data, CRC and index related flags. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="b4063a8889344a8a756e89aac987836c"></a><!-- doxytag: member="xsdps.c::XSdPs_MmcCardInitialize" ref="b4063a8889344a8a756e89aac987836c" args="(XSdPs *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">int XSdPs_MmcCardInitialize </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Mmc initialization is done in this function<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> </td><td>is a pointer to the instance to be worked on.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if initialization was successful</li><li>XST_FAILURE if failure - could be because a) MMC is already initialized b) There is no card inserted c) One of the steps (commands) in the initialization cycle failed </li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>This function initializes the SD card by following its initialization and identification state diagram. CMD0 is sent to reset card. CMD1 sent to identify voltage and high capacity support CMD2 and CMD3 are sent to obtain Card ID and Relative card address respectively. CMD9 is sent to read the card specific data. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="592d7b284d11aa7f81caaca0ea019f15"></a><!-- doxytag: member="xsdps.c::XSdPs_ReadPolled" ref="592d7b284d11aa7f81caaca0ea019f15" args="(XSdPs *InstancePtr, u32 Arg, u32 BlkCnt, u8 *Buff)" --><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 XSdPs_ReadPolled </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </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 </td>
|
||
|
<td class="mdname" nowrap> <em>Arg</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u32 </td>
|
||
|
<td class="mdname" nowrap> <em>BlkCnt</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 * </td>
|
||
|
<td class="mdname" nowrap> <em>Buff</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
This function performs SD read in polled 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> </td><td>is a pointer to the instance to be worked on. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Arg</em> </td><td>is the address passed by the user that is to be sent as argument along with the command. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>BlkCnt</em> </td><td>- Block count passed by the user. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Buff</em> </td><td>- Pointer to the data buffer for a DMA transfer.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if initialization was successful</li><li>XST_FAILURE if failure - could be because another transfer is in progress or command or data inhibit is set </li></ul>
|
||
|
</dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="847a3b8c5ad1aa9cb80f252b0a774be0"></a><!-- doxytag: member="xsdps.c::XSdPs_SdCardInitialize" ref="847a3b8c5ad1aa9cb80f252b0a774be0" args="(XSdPs *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">int XSdPs_SdCardInitialize </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
SD initialization is done in this function<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> </td><td>is a pointer to the instance to be worked on.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if initialization was successful</li><li>XST_FAILURE if failure - could be because a) SD is already initialized b) There is no card inserted c) One of the steps (commands) in the initialization cycle failed</li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>This function initializes the SD card by following its initialization and identification state diagram. CMD0 is sent to reset card. CMD8 and ACDM41 are sent to identify voltage and high capacity support CMD2 and CMD3 are sent to obtain Card ID and Relative card address respectively. CMD9 is sent to read the card specific data. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="44990923e1855372c954048c09c729b0"></a><!-- doxytag: member="xsdps.c::XSdPs_Select_Card" ref="44990923e1855372c954048c09c729b0" args="(XSdPs *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">int XSdPs_Select_Card </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Selects card and sets default block size<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> </td><td>is a pointer to the <a class="el" href="struct_x_sd_ps.html">XSdPs</a> instance.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if successful.</li><li>XST_FAILURE if fail.</li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="0dd3c70f071d842d1b8545b5ab5652bf"></a><!-- doxytag: member="xsdps.c::XSdPs_SetupADMA2DescTbl" ref="0dd3c70f071d842d1b8545b5ab5652bf" args="(XSdPs *InstancePtr, u32 BlkCnt, const u8 *Buff)" --><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 XSdPs_SetupADMA2DescTbl </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </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 </td>
|
||
|
<td class="mdname" nowrap> <em>BlkCnt</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>const u8 * </td>
|
||
|
<td class="mdname" nowrap> <em>Buff</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
API to setup ADMA2 descriptor table<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> </td><td>is a pointer to the <a class="el" href="struct_x_sd_ps.html">XSdPs</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>BlkCnt</em> </td><td>- block count. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Buff</em> </td><td>pointer to data buffer.</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="4eac14d98e7ff6aad749db42d424726b"></a><!-- doxytag: member="xsdps.c::XSdPs_WritePolled" ref="4eac14d98e7ff6aad749db42d424726b" args="(XSdPs *InstancePtr, u32 Arg, u32 BlkCnt, const u8 *Buff)" --><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 XSdPs_WritePolled </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_sd_ps.html">XSdPs</a> * </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 </td>
|
||
|
<td class="mdname" nowrap> <em>Arg</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u32 </td>
|
||
|
<td class="mdname" nowrap> <em>BlkCnt</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>const u8 * </td>
|
||
|
<td class="mdname" nowrap> <em>Buff</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
This function performs SD write in polled 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> </td><td>is a pointer to the instance to be worked on. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Arg</em> </td><td>is the address passed by the user that is to be sent as argument along with the command. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>BlkCnt</em> </td><td>- Block count passed by the user. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Buff</em> </td><td>- Pointer to the data buffer for a DMA transfer.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if initialization was successful</li><li>XST_FAILURE if failure - could be because another transfer is in progress or command or data inhibit is set </li></ul>
|
||
|
</dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.
|