📄 pd_reference.htm
字号:
<blockquote>
<p class="BODYTEXT">
none
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Returns:</p>
<blockquote>
<p class="BODYCODE">
SDIO_STATUS
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="FUNCHEADINGS">Notes:</p>
<blockquote>
<p class="BODYTEXT">
Sends a configuration request to the specified device.
<br>
</p>
</blockquote>
<p class="FUNCHEADINGS">Example: </p>
<blockquote>
<p class="BODYCODE">
<pre>
<font face="Arial, Helvetica, sans-serif" color="#FF00FF"> Example of sending a request to a device:</font>
SDCONFIG configHdr;
SDCONFIG_FUNC_ENABLE_DISABLE_DATA fData;
fData.EnableFlags = SDCONFIG_ENABLE_FUNC;
fData.TimeOut = 500;
SET_SDCONFIG_CMD_INFO(&configHdr, SDCONFIG_FUNC_ENABLE_DISABLE, fData, sizeof(fData));
return SDDEVICE_CALL_CONFIG_FUNC(pDevice, &configHdr)
</pre>
</p>
</blockquote>
<p class="FUNCHEADINGS">See also:</p>
<blockquote>
<p class="BODYTEXT">
<a href="#FUNC_SDLIB_IssueConfig">
SDLIB_IssueConfig
</a>
<br>
</p>
</blockquote>
</td>
</tr>
</table>
<a name="FUNC_SDDEVICE_CALL_REQUEST_FUNC"></a>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#0000FF" rowspan="2" width="40%"><a href="http://www.codetelligence.com"><img border="0" height="40" width="252" name="image" src="Images/codetelligence_lrg.gif"></a></td><td bgcolor="#0000FF" height="62" width="50%"><font face="Arial, Helvetica, sans-serif" size="5" color="#FFFFFF"><strong>Codetelligence Embedded SDIO Stack<br>Function Driver Documentation</strong></font></td><td bgcolor="#0000FF" height="62" width="10%"><td><a href="#FUNC_SDDEVICE_CALL_CONFIG_FUNC"><img border="0" height="32" width="27" src="Images/leftarrow.gif"></a></td><td><a href="#FUNC_SDDEVICE_GET_BUSMODE_FLAGS"><img border="0" height="32" width="27" src="Images/rightarrow.gif"></a></td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="10" border="0" width="100%">
<tr>
<td width="93%"><font face="Arial, Helvetica, sans-serif"><span class="Topic">
<blockquote>
<table width="100%" cellspacing="0" cellpadding="0">
<td>
<br>
<pre>
<span class="FUNCPROTOTYPE">
SDIO_STATUS SDDEVICE_CALL_REQUEST_FUNC(PSDDEVICE pDevice, PSDREQUEST pRequest)
</span>
</pre>
</td>
</table>
</blockquote>
</span></font></td>
</tr>
</table>
<hr>
<table cellpadding="15" cellspacing="0" border="0" width="100%">
<tr>
<td>
<p class="FUNCHEADINGS">Description:</p>
<blockquote>
<p class="BODYTEXT">Send a request to a device.</p>
</blockquote>
<p class="FUNCHEADINGS">Parameters:</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Inputs:</p>
<blockquote>
<p class="BODYTEXT">
pDevice - the target device for this request
<br>
pRequest - the request to be sent
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Outputs:</p>
<blockquote>
<p class="BODYTEXT">
none
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Returns:</p>
<blockquote>
<p class="BODYCODE">
SDIO_STATUS
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="FUNCHEADINGS">Notes:</p>
<blockquote>
<p class="BODYTEXT">
Sends a request to the specified device. If the request is successfully sent, then
the response flags can be checked to detemine the result of the request.
<br>
</p>
</blockquote>
<p class="FUNCHEADINGS">Example: </p>
<blockquote>
<p class="BODYCODE">
<pre>
<font face="Arial, Helvetica, sans-serif" color="#FF00FF"> Example of sending a request to a device:</font>
PSDREQUEST pReq = NULL;
<font face="Arial, Helvetica, sans-serif" color="#999999">//allocate a request
</font> pReq = SDDeviceAllocRequest(pDevice);
if (NULL == pReq) {
return SDIO_STATUS_NO_RESOURCES;
}
<font face="Arial, Helvetica, sans-serif" color="#999999">//initialize the request
</font> SDLIB_SetupCMD52Request(FuncNo, Address, Write, *pData, pReq);
<font face="Arial, Helvetica, sans-serif" color="#999999">//send the request to the target
</font> status = SDDEVICE_CALL_REQUEST_FUNC(pDevice,pReq);
if (!SDIO_SUCCESS(status)) {
break;
}
<font face="Arial, Helvetica, sans-serif" color="#999999">//check the request response (based on the request type)
</font> if (SD_R5_GET_RESP_FLAGS(pReq->Response) & SD_R5_ERRORS) {
<font face="Arial, Helvetica, sans-serif" color="#999999">...
</font> }
if (!Write) {
<font face="Arial, Helvetica, sans-serif" color="#999999">// store the byte
</font> *pData = SD_R5_GET_READ_DATA(pReq->Response);
}
<font face="Arial, Helvetica, sans-serif" color="#999999">//free the request
</font> SDDeviceFreeRequest(pDevice,pReq);
..
</pre>
</p>
</blockquote>
<p class="FUNCHEADINGS">See also:</p>
<blockquote>
<p class="BODYTEXT">
<a href="#FUNC_SDDeviceAllocRequest">
SDDeviceAllocRequest
</a>
<br>
<a href="#FUNC_SDDEVICE_CALL_CONFIG_FUNC">
SDDEVICE_CALL_CONFIG_FUNC
</a>
<br>
</p>
</blockquote>
</td>
</tr>
</table>
<a name="FUNC_SDDEVICE_GET_BUSMODE_FLAGS"></a>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#0000FF" rowspan="2" width="40%"><a href="http://www.codetelligence.com"><img border="0" height="40" width="252" name="image" src="Images/codetelligence_lrg.gif"></a></td><td bgcolor="#0000FF" height="62" width="50%"><font face="Arial, Helvetica, sans-serif" size="5" color="#FFFFFF"><strong>Codetelligence Embedded SDIO Stack<br>Function Driver Documentation</strong></font></td><td bgcolor="#0000FF" height="62" width="10%"><td><a href="#FUNC_SDDEVICE_CALL_REQUEST_FUNC"><img border="0" height="32" width="27" src="Images/leftarrow.gif"></a></td><td><a href="#FUNC_SDDEVICE_GET_BUSWIDTH"><img border="0" height="32" width="27" src="Images/rightarrow.gif"></a></td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="10" border="0" width="100%">
<tr>
<td width="93%"><font face="Arial, Helvetica, sans-serif"><span class="Topic">
<blockquote>
<table width="100%" cellspacing="0" cellpadding="0">
<td>
<br>
<pre>
<span class="FUNCPROTOTYPE">
SD_BUSMODE_FLAGS SDDEVICE_GET_BUSMODE_FLAGS(PSDDEVICE pDevice)
</span>
</pre>
</td>
</table>
</blockquote>
</span></font></td>
</tr>
</table>
<hr>
<table cellpadding="15" cellspacing="0" border="0" width="100%">
<tr>
<td>
<p class="FUNCHEADINGS">Description:</p>
<blockquote>
<p class="BODYTEXT">Get the bus mode flags</p>
</blockquote>
<p class="FUNCHEADINGS">Parameters:</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Inputs:</p>
<blockquote>
<p class="BODYTEXT">
pDevice - the target device for this request
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Outputs:</p>
<blockquote>
<p class="BODYTEXT">
none
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Returns:</p>
<blockquote>
<p class="BODYCODE">
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="FUNCHEADINGS">Notes:</p>
<blockquote>
<p class="BODYTEXT">
Implemented as a macro. This function returns the raw bus mode flags. This
is useful for function drivers that wish to override the bus clock without
modifying the current bus mode.
<br>
</p>
</blockquote>
<p class="FUNCHEADINGS">Example: </p>
<blockquote>
<p class="BODYCODE">
<pre></pre>
</p>
</blockquote>
<p class="FUNCHEADINGS">See also:</p>
<blockquote>
<p class="BODYTEXT">
<a href="#FUNC_SDDEVICE_GET_BUSWIDTH">
SDDEVICE_GET_BUSWIDTH
</a>
<br>
<a href="#FUNC_SDCONFIG_BUS_MODE_CTRL">
SDCONFIG_BUS_MODE_CTRL
</a>
<br>
</p>
</blockquote>
</td>
</tr>
</table>
<a name="FUNC_SDDEVICE_GET_BUSWIDTH"></a>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#0000FF" rowspan="2" width="40%"><a href="http://www.codetelligence.com"><img border="0" height="40" width="252" name="image" src="Images/codetelligence_lrg.gif"></a></td><td bgcolor="#0000FF" height="62" width="50%"><font face="Arial, Helvetica, sans-serif" size="5" color="#FFFFFF"><strong>Codetelligence Embedded SDIO Stack<br>Function Driver Documentation</strong></font></td><td bgcolor="#0000FF" height="62" width="10%"><td><a href="#FUNC_SDDEVICE_GET_BUSMODE_FLAGS"><img border="0" height="32" width="27" src="Images/leftarrow.gif"></a></td><td><a href="#FUNC_SDDEVICE_GET_CARD_FLAGS"><img border="0" height="32" width="27" src="Images/rightarrow.gif"></a></td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="10" border="0" width="100%">
<tr>
<td width="93%"><font face="Arial, Helvetica, sans-serif"><span class="Topic">
<blockquote>
<table width="100%" cellspacing="0" cellpadding="0">
<td>
<br>
<pre>
<span class="FUNCPROTOTYPE">
UINT8 SDDEVICE_GET_BUSWIDTH(PSDDEVICE pDevice)
</span>
</pre>
</td>
</table>
</blockquote>
</span></font></td>
</tr>
</table>
<hr>
<table cellpadding="15" cellspacing="0" border="0" width="100%">
<tr>
<td>
<p class="FUNCHEADINGS">Description:</p>
<blockquote>
<p class="BODYTEXT">Get the bus width.</p>
</blockquote>
<p class="FUNCHEADINGS">Parameters:</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Inputs:</p>
<blockquote>
<p class="BODYTEXT">
pDevice - the target device for this request
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Outputs:</p>
<blockquote>
<p class="BODYTEXT">
none
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Returns:</p>
<blockquote>
<p class="BODYCODE">
bus width: SDCONFIG_BUS_WIDTH_SPI, SDCONFIG_BUS_WIDTH_1_BIT, SDCONFIG_BUS_WIDTH_4_BIT
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="FUNCHEADINGS">Notes:</p>
<blockquote>
<p class="BODYTEXT">
Implemented as a macro.
<br>
</p>
</blockquote>
<p class="FUNCHEADINGS">Example: </p>
<blockquote>
<p class="BODYCODE">
<pre></pre>
</p>
</blockquote>
<p class="FUNCHEADINGS">See also:</p>
<blockquote>
<p class="BODYTEXT">
<a href="#FUNC_SDDEVICE_IS_BUSMODE_SPI">
SDDEVICE_IS_BUSMODE_SPI
</a>
<br>
</p>
</blockquote>
</td>
</tr>
</table>
<a name="FUNC_SDDEVICE_GET_CARD_FLAGS"></a>
<table cellpadding="4" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#0000FF" rowspan="2" width="40%"><a href="http://www.codetelligence.com"><img border="0" height="40" width="252" name="image" src="Images/codetelligence_lrg.gif"></a></td><td bgcolor="#0000FF" height="62" width="50%"><font face="Arial, Helvetica, sans-serif" size="5" color="#FFFFFF"><strong>Codetelligence Embedded SDIO Stack<br>Function Driver Documentation</strong></font></td><td bgcolor="#0000FF" height="62" width="10%"><td><a href="#FUNC_SDDEVICE_GET_BUSWIDTH"><img border="0" height="32" width="27" src="Images/leftarrow.gif"></a></td><td><a href="#FUNC_SDDEVICE_GET_CARD_RCA"><img border="0" height="32" width="27" src="Images/rightarrow.gif"></a></td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="10" border="0" width="100%">
<tr>
<td width="93%"><font face="Arial, Helvetica, sans-serif"><span class="Topic">
<blockquote>
<table width="100%" cellspacing="0" cellpadding="0">
<td>
<br>
<pre>
<span class="FUNCPROTOTYPE">
CARD_INFO_FLAGS SDDEVICE_GET_CARD_FLAGS(PSDDEVICE pDevice)
</span>
</pre>
</td>
</table>
</blockquote>
</span></font></td>
</tr>
</table>
<hr>
<table cellpadding="15" cellspacing="0" border="0" width="100%">
<tr>
<td>
<p class="FUNCHEADINGS">Description:</p>
<blockquote>
<p class="BODYTEXT">Get the card flags</p>
</blockquote>
<p class="FUNCHEADINGS">Parameters:</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Inputs:</p>
<blockquote>
<p class="BODYTEXT">
pDevice - the target device for this request
<br>
</p>
</blockquote>
</blockquote>
</p>
<p class="BODYTEXT">
<blockquote>
<p class="BODYTEXT">Outputs:</p>
<blockquote>
<p class="BODYTEXT">
none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -