⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hostc_structure.htm

📁 SDIO Linux documentation
💻 HTM
📖 第 1 页 / 共 2 页
字号:
				<td><strong>Flag</strong></td>

				<td><strong>Description</strong></td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_SUPPORTS_POWER</font></p>
				</td>

				<td>Host controller supports power management.</td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_BUS_1BIT</font></p>
				</td>

				<td>Host supports 1-bit mode (CMD/1-bit Data)</td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_BUS_4BIT</font></p>
				</td>

				<td>Host supports 4-bit mode (CMD/4-bit data), this applies to SD, SDIO and
				  MMC (4.0 or higher) cards.</td>
			</tr>
		<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_BUS_MMC8BIT</font></p>
				</td>

				<td>Host supports 8-bit mode (CMD/8-bit data), 
				  this applies to MMC (4.0 or higher) cards.</td>
		  </tr>
			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_BUS_SPI</font></p>
				</td>

				<td>Host supports SPI mode.</td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_READ_WAIT</font></p>
				</td>

				<td>Host supports Read-Wait protocol (see SDIO spec).</td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_MULTI_BLK_IRQ</font></p>
				</td>

				<td>Host supports detecting interrupts during mult-block
				transactions.</td>
			</tr>

			

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_SLOT_POLLING</font></p>
				</td>

				<td>Host requires slot polling for the detection of cards. The core
				uses a helper task/thread that will periodically issue SD/SDIO
				commands to the slot (roughly 1 second).&nbsp; A successful response
				to any command indicates the presence of a card.&nbsp; Once a card
				is initialized, the helper issues a command (roughly every 1
				second)&nbsp;to poll the card's presence.&nbsp;</td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_POWER_SWITCH</font></p>
				</td>

				<td>Host supports power cycling (power FET switch
				control).&nbsp;This flag indicates that the host can&nbsp;cycle
				power to the slot.&nbsp; This is useful for entering/leaving SPI
				mode operation. Cycling to SPI mode dynamically&nbsp;is reserved for
				future use.</td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_NO_SPI_CRC</font></p>
				</td>

				<td>Host operates SPI mode without CRC checking.&nbsp; This enhances
				host performance in generic SPI mode implementations.</td>
			</tr>

			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_AUTO_CMD12</font></p>
				</td>

				<td>Host can issue CMD12 automatically to stop transmission during
				multi-block reads/writes.</td>
			</tr>
			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_NO_4BIT_IRQ</font></p>
				</td>

				<td>Host can support SD memory cards in 4 bit mode however, SDIO cards must
				  operate in 1 bit mode due to the lack of clock control for
				  interrupt detection in 4 bit mode.</td>
			</tr>
			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_SD_HIGH_SPEED</font></p>
				</td>

				<td>Host supports SD Physical Specification 1.10 high speed mode. </td>
			</tr>
			<tr>
				<td>

				<p><font face="Courier New" size="2">SDHCD_ATTRIB_MMC_HIGH_SPEED</font></p>
				</td>

				<td>Host supports MMC high speed mode. In most cases, the host controller
				  can simply set his bit and let the busdriver use the higher
				  reported clock rates (up to 52Mhz). Only hosts that can
				  support the tighter I/O timming requirements for high speed
				  operation should set this bit.</td>
			</tr>
		</table>
		<br>
		<br>


		<p class="BODYTEXT"><br>
		<strong>SD/SDIO Bus Electrical&nbsp;Interface :</strong></p>

		<p class="BODYTEXT">The HCD can report limitations to it's bus
		interface.&nbsp; This includes limitations such as maximum clock rate
		support and data transfer parameters such as bytes allowed per block
		and blocks per transaction.&nbsp; Peripheral drivers can obtain these
		limits and behave accordingly&nbsp;and not exceed the hardware's
		capabilities.&nbsp; The host controller also indicates electrical
		parameters (voltage, current)&nbsp;that require configuration by the
		SDIO core and peripheral drivers.&nbsp;&nbsp; The host controller's
		advertised <font face="Courier New">SlotVoltageCaps</font> is a bit
		mask of supported voltage levels.&nbsp; The SD/SDIO initialization
		sequence&nbsp;allows a host to negotiate an optimal slot voltage based
		on card and host voltage capabilities.&nbsp;The host's &nbsp;<font
			face="Courier New">SlotVoltagePreferred</font>, offers the SDIO core
		a "hint"&nbsp; to a preferred voltage for maximum efficiency.&nbsp;
		Each host controller can set a maximum slot current budget (<font
			face="Courier New">MaxSlotCurrent</font>)&nbsp;that is managed by the
		SDIO core&nbsp;.&nbsp; All SD/SDIO function drivers&nbsp;must allocate
		slot current from this "pool" and can only proceed&nbsp;after the
		request is satisfied.</p>

		<p class="BODYTEXT">The following code demonstrates how the HCD
		structure is initialized and registered:</p>
		<pre>
       
        SET_SDIO_STACK_VERSION(&amp;pDeviceContext-&gt;Hcd);
        pDeviceContext-&gt;Hcd.Attributes = SDHCD_ATTRIB_BUS_1BIT      | 
                                         SDHCD_ATTRIB_BUS_4BIT      | 
                                         SDHCD_ATTRIB_MULTI_BLK_IRQ | 
                                         SDHCD_ATTRIB_AUTO_CMD12    | 
                                         SDHCD_ATTRIB_POWER_SWITCH ;
        pDeviceContext-&gt;Hcd.SlotNumber = 0;
        pDeviceContext-&gt;Hcd.MaxBlocksPerTrans = 1023;
        pDeviceContext-&gt;Hcd.MaxBytesPerBlock = 2048;
        pDeviceContext-&gt;Hcd.MaxSlotCurrent = 300;  // 300 mA
        pDeviceContext-&gt;Hcd.MaxClockRate = 24000000; // 24Mhz
        pDeviceContext-&gt;Hcd.SlotVoltageCaps = SLOT_POWER_3_3V | SLOT_POWER_1_8V;
        pDeviceContext-&gt;Hcd.SlotVoltagePreferred = SLOT_POWER_3_3V;
             // set our instance context
        pDeviceContext-&gt;Hcd.pContext = pDeviceContext;
             // setup callback pointers
        pDeviceContext-&gt;Hcd.pRequest = HcdRequest;
        pDeviceContext-&gt;Hcd.pConfigure = HcdConfig;
        pDeviceContext-&gt;Hcd.pDevice = &amp;pPCIdevice-&gt;dev;
         
        // initialize hardware.....
        
        // register host 
       
        if (!SDIO_SUCCESS((status = SDIO_RegisterHostController(&amp;pDeviceContext-&gt;Hcd)))) {
            .. failed
        } 
</pre>

		<p><!-- InstanceEndEditable -->
&nbsp;<br/></table></td></tr>
<table width="100%" border="0" cellspacing="0" cellpadding="2" >
  <tr> <td><div align="right"><a href="#TopTopic">Back to top</a></div></td></tr>
  <tr bgcolor="#0000FF"> 
    <td> 
      <font color="#FFFFFF"face="Arial, Helvetica, sans-serif"><strong>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -