A bundled STM32F10x Std Periph and CMSIS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

533 lines
21 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32f10x_sdio.h
  4. * @author MCD Application Team
  5. * @version V3.5.0
  6. * @date 11-March-2011
  7. * @brief This file contains all the functions prototypes for the SDIO firmware
  8. * library.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  13. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  14. * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  15. * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  16. * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  17. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  18. *
  19. * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
  20. ******************************************************************************
  21. */
  22. /* Define to prevent recursive inclusion -------------------------------------*/
  23. #ifndef __STM32F10x_SDIO_H
  24. #define __STM32F10x_SDIO_H
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. /* Includes ------------------------------------------------------------------*/
  29. #include "stm32f10x.h"
  30. #include "stm32f10x_assert.h"
  31. /** @addtogroup STM32F10x_StdPeriph_Driver
  32. * @{
  33. */
  34. /** @addtogroup SDIO
  35. * @{
  36. */
  37. /** @defgroup SDIO_Exported_Types
  38. * @{
  39. */
  40. typedef struct
  41. {
  42. uint32_t SDIO_ClockEdge; /*!< Specifies the clock transition on which the bit capture is made.
  43. This parameter can be a value of @ref SDIO_Clock_Edge */
  44. uint32_t SDIO_ClockBypass; /*!< Specifies whether the SDIO Clock divider bypass is
  45. enabled or disabled.
  46. This parameter can be a value of @ref SDIO_Clock_Bypass */
  47. uint32_t SDIO_ClockPowerSave; /*!< Specifies whether SDIO Clock output is enabled or
  48. disabled when the bus is idle.
  49. This parameter can be a value of @ref SDIO_Clock_Power_Save */
  50. uint32_t SDIO_BusWide; /*!< Specifies the SDIO bus width.
  51. This parameter can be a value of @ref SDIO_Bus_Wide */
  52. uint32_t SDIO_HardwareFlowControl; /*!< Specifies whether the SDIO hardware flow control is enabled or disabled.
  53. This parameter can be a value of @ref SDIO_Hardware_Flow_Control */
  54. uint8_t SDIO_ClockDiv; /*!< Specifies the clock frequency of the SDIO controller.
  55. This parameter can be a value between 0x00 and 0xFF. */
  56. } SDIO_InitTypeDef;
  57. typedef struct
  58. {
  59. uint32_t SDIO_Argument; /*!< Specifies the SDIO command argument which is sent
  60. to a card as part of a command message. If a command
  61. contains an argument, it must be loaded into this register
  62. before writing the command to the command register */
  63. uint32_t SDIO_CmdIndex; /*!< Specifies the SDIO command index. It must be lower than 0x40. */
  64. uint32_t SDIO_Response; /*!< Specifies the SDIO response type.
  65. This parameter can be a value of @ref SDIO_Response_Type */
  66. uint32_t SDIO_Wait; /*!< Specifies whether SDIO wait-for-interrupt request is enabled or disabled.
  67. This parameter can be a value of @ref SDIO_Wait_Interrupt_State */
  68. uint32_t SDIO_CPSM; /*!< Specifies whether SDIO Command path state machine (CPSM)
  69. is enabled or disabled.
  70. This parameter can be a value of @ref SDIO_CPSM_State */
  71. } SDIO_CmdInitTypeDef;
  72. typedef struct
  73. {
  74. uint32_t SDIO_DataTimeOut; /*!< Specifies the data timeout period in card bus clock periods. */
  75. uint32_t SDIO_DataLength; /*!< Specifies the number of data bytes to be transferred. */
  76. uint32_t SDIO_DataBlockSize; /*!< Specifies the data block size for block transfer.
  77. This parameter can be a value of @ref SDIO_Data_Block_Size */
  78. uint32_t SDIO_TransferDir; /*!< Specifies the data transfer direction, whether the transfer
  79. is a read or write.
  80. This parameter can be a value of @ref SDIO_Transfer_Direction */
  81. uint32_t SDIO_TransferMode; /*!< Specifies whether data transfer is in stream or block mode.
  82. This parameter can be a value of @ref SDIO_Transfer_Type */
  83. uint32_t SDIO_DPSM; /*!< Specifies whether SDIO Data path state machine (DPSM)
  84. is enabled or disabled.
  85. This parameter can be a value of @ref SDIO_DPSM_State */
  86. } SDIO_DataInitTypeDef;
  87. /**
  88. * @}
  89. */
  90. /** @defgroup SDIO_Exported_Constants
  91. * @{
  92. */
  93. /** @defgroup SDIO_Clock_Edge
  94. * @{
  95. */
  96. #define SDIO_ClockEdge_Rising ((uint32_t)0x00000000)
  97. #define SDIO_ClockEdge_Falling ((uint32_t)0x00002000)
  98. #define IS_SDIO_CLOCK_EDGE(EDGE) (((EDGE) == SDIO_ClockEdge_Rising) || \
  99. ((EDGE) == SDIO_ClockEdge_Falling))
  100. /**
  101. * @}
  102. */
  103. /** @defgroup SDIO_Clock_Bypass
  104. * @{
  105. */
  106. #define SDIO_ClockBypass_Disable ((uint32_t)0x00000000)
  107. #define SDIO_ClockBypass_Enable ((uint32_t)0x00000400)
  108. #define IS_SDIO_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDIO_ClockBypass_Disable) || \
  109. ((BYPASS) == SDIO_ClockBypass_Enable))
  110. /**
  111. * @}
  112. */
  113. /** @defgroup SDIO_Clock_Power_Save
  114. * @{
  115. */
  116. #define SDIO_ClockPowerSave_Disable ((uint32_t)0x00000000)
  117. #define SDIO_ClockPowerSave_Enable ((uint32_t)0x00000200)
  118. #define IS_SDIO_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDIO_ClockPowerSave_Disable) || \
  119. ((SAVE) == SDIO_ClockPowerSave_Enable))
  120. /**
  121. * @}
  122. */
  123. /** @defgroup SDIO_Bus_Wide
  124. * @{
  125. */
  126. #define SDIO_BusWide_1b ((uint32_t)0x00000000)
  127. #define SDIO_BusWide_4b ((uint32_t)0x00000800)
  128. #define SDIO_BusWide_8b ((uint32_t)0x00001000)
  129. #define IS_SDIO_BUS_WIDE(WIDE) (((WIDE) == SDIO_BusWide_1b) || ((WIDE) == SDIO_BusWide_4b) || \
  130. ((WIDE) == SDIO_BusWide_8b))
  131. /**
  132. * @}
  133. */
  134. /** @defgroup SDIO_Hardware_Flow_Control
  135. * @{
  136. */
  137. #define SDIO_HardwareFlowControl_Disable ((uint32_t)0x00000000)
  138. #define SDIO_HardwareFlowControl_Enable ((uint32_t)0x00004000)
  139. #define IS_SDIO_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDIO_HardwareFlowControl_Disable) || \
  140. ((CONTROL) == SDIO_HardwareFlowControl_Enable))
  141. /**
  142. * @}
  143. */
  144. /** @defgroup SDIO_Power_State
  145. * @{
  146. */
  147. #define SDIO_PowerState_OFF ((uint32_t)0x00000000)
  148. #define SDIO_PowerState_ON ((uint32_t)0x00000003)
  149. #define IS_SDIO_POWER_STATE(STATE) (((STATE) == SDIO_PowerState_OFF) || ((STATE) == SDIO_PowerState_ON))
  150. /**
  151. * @}
  152. */
  153. /** @defgroup SDIO_Interrupt_sources
  154. * @{
  155. */
  156. #define SDIO_IT_CCRCFAIL ((uint32_t)0x00000001)
  157. #define SDIO_IT_DCRCFAIL ((uint32_t)0x00000002)
  158. #define SDIO_IT_CTIMEOUT ((uint32_t)0x00000004)
  159. #define SDIO_IT_DTIMEOUT ((uint32_t)0x00000008)
  160. #define SDIO_IT_TXUNDERR ((uint32_t)0x00000010)
  161. #define SDIO_IT_RXOVERR ((uint32_t)0x00000020)
  162. #define SDIO_IT_CMDREND ((uint32_t)0x00000040)
  163. #define SDIO_IT_CMDSENT ((uint32_t)0x00000080)
  164. #define SDIO_IT_DATAEND ((uint32_t)0x00000100)
  165. #define SDIO_IT_STBITERR ((uint32_t)0x00000200)
  166. #define SDIO_IT_DBCKEND ((uint32_t)0x00000400)
  167. #define SDIO_IT_CMDACT ((uint32_t)0x00000800)
  168. #define SDIO_IT_TXACT ((uint32_t)0x00001000)
  169. #define SDIO_IT_RXACT ((uint32_t)0x00002000)
  170. #define SDIO_IT_TXFIFOHE ((uint32_t)0x00004000)
  171. #define SDIO_IT_RXFIFOHF ((uint32_t)0x00008000)
  172. #define SDIO_IT_TXFIFOF ((uint32_t)0x00010000)
  173. #define SDIO_IT_RXFIFOF ((uint32_t)0x00020000)
  174. #define SDIO_IT_TXFIFOE ((uint32_t)0x00040000)
  175. #define SDIO_IT_RXFIFOE ((uint32_t)0x00080000)
  176. #define SDIO_IT_TXDAVL ((uint32_t)0x00100000)
  177. #define SDIO_IT_RXDAVL ((uint32_t)0x00200000)
  178. #define SDIO_IT_SDIOIT ((uint32_t)0x00400000)
  179. #define SDIO_IT_CEATAEND ((uint32_t)0x00800000)
  180. #define IS_SDIO_IT(IT) ((((IT) & (uint32_t)0xFF000000) == 0x00) && ((IT) != (uint32_t)0x00))
  181. /**
  182. * @}
  183. */
  184. /** @defgroup SDIO_Command_Index
  185. * @{
  186. */
  187. #define IS_SDIO_CMD_INDEX(INDEX) ((INDEX) < 0x40)
  188. /**
  189. * @}
  190. */
  191. /** @defgroup SDIO_Response_Type
  192. * @{
  193. */
  194. #define SDIO_Response_No ((uint32_t)0x00000000)
  195. #define SDIO_Response_Short ((uint32_t)0x00000040)
  196. #define SDIO_Response_Long ((uint32_t)0x000000C0)
  197. #define IS_SDIO_RESPONSE(RESPONSE) (((RESPONSE) == SDIO_Response_No) || \
  198. ((RESPONSE) == SDIO_Response_Short) || \
  199. ((RESPONSE) == SDIO_Response_Long))
  200. /**
  201. * @}
  202. */
  203. /** @defgroup SDIO_Wait_Interrupt_State
  204. * @{
  205. */
  206. #define SDIO_Wait_No ((uint32_t)0x00000000) /*!< SDIO No Wait, TimeOut is enabled */
  207. #define SDIO_Wait_IT ((uint32_t)0x00000100) /*!< SDIO Wait Interrupt Request */
  208. #define SDIO_Wait_Pend ((uint32_t)0x00000200) /*!< SDIO Wait End of transfer */
  209. #define IS_SDIO_WAIT(WAIT) (((WAIT) == SDIO_Wait_No) || ((WAIT) == SDIO_Wait_IT) || \
  210. ((WAIT) == SDIO_Wait_Pend))
  211. /**
  212. * @}
  213. */
  214. /** @defgroup SDIO_CPSM_State
  215. * @{
  216. */
  217. #define SDIO_CPSM_Disable ((uint32_t)0x00000000)
  218. #define SDIO_CPSM_Enable ((uint32_t)0x00000400)
  219. #define IS_SDIO_CPSM(CPSM) (((CPSM) == SDIO_CPSM_Enable) || ((CPSM) == SDIO_CPSM_Disable))
  220. /**
  221. * @}
  222. */
  223. /** @defgroup SDIO_Response_Registers
  224. * @{
  225. */
  226. #define SDIO_RESP1 ((uint32_t)0x00000000)
  227. #define SDIO_RESP2 ((uint32_t)0x00000004)
  228. #define SDIO_RESP3 ((uint32_t)0x00000008)
  229. #define SDIO_RESP4 ((uint32_t)0x0000000C)
  230. #define IS_SDIO_RESP(RESP) (((RESP) == SDIO_RESP1) || ((RESP) == SDIO_RESP2) || \
  231. ((RESP) == SDIO_RESP3) || ((RESP) == SDIO_RESP4))
  232. /**
  233. * @}
  234. */
  235. /** @defgroup SDIO_Data_Length
  236. * @{
  237. */
  238. #define IS_SDIO_DATA_LENGTH(LENGTH) ((LENGTH) <= 0x01FFFFFF)
  239. /**
  240. * @}
  241. */
  242. /** @defgroup SDIO_Data_Block_Size
  243. * @{
  244. */
  245. #define SDIO_DataBlockSize_1b ((uint32_t)0x00000000)
  246. #define SDIO_DataBlockSize_2b ((uint32_t)0x00000010)
  247. #define SDIO_DataBlockSize_4b ((uint32_t)0x00000020)
  248. #define SDIO_DataBlockSize_8b ((uint32_t)0x00000030)
  249. #define SDIO_DataBlockSize_16b ((uint32_t)0x00000040)
  250. #define SDIO_DataBlockSize_32b ((uint32_t)0x00000050)
  251. #define SDIO_DataBlockSize_64b ((uint32_t)0x00000060)
  252. #define SDIO_DataBlockSize_128b ((uint32_t)0x00000070)
  253. #define SDIO_DataBlockSize_256b ((uint32_t)0x00000080)
  254. #define SDIO_DataBlockSize_512b ((uint32_t)0x00000090)
  255. #define SDIO_DataBlockSize_1024b ((uint32_t)0x000000A0)
  256. #define SDIO_DataBlockSize_2048b ((uint32_t)0x000000B0)
  257. #define SDIO_DataBlockSize_4096b ((uint32_t)0x000000C0)
  258. #define SDIO_DataBlockSize_8192b ((uint32_t)0x000000D0)
  259. #define SDIO_DataBlockSize_16384b ((uint32_t)0x000000E0)
  260. #define IS_SDIO_BLOCK_SIZE(SIZE) (((SIZE) == SDIO_DataBlockSize_1b) || \
  261. ((SIZE) == SDIO_DataBlockSize_2b) || \
  262. ((SIZE) == SDIO_DataBlockSize_4b) || \
  263. ((SIZE) == SDIO_DataBlockSize_8b) || \
  264. ((SIZE) == SDIO_DataBlockSize_16b) || \
  265. ((SIZE) == SDIO_DataBlockSize_32b) || \
  266. ((SIZE) == SDIO_DataBlockSize_64b) || \
  267. ((SIZE) == SDIO_DataBlockSize_128b) || \
  268. ((SIZE) == SDIO_DataBlockSize_256b) || \
  269. ((SIZE) == SDIO_DataBlockSize_512b) || \
  270. ((SIZE) == SDIO_DataBlockSize_1024b) || \
  271. ((SIZE) == SDIO_DataBlockSize_2048b) || \
  272. ((SIZE) == SDIO_DataBlockSize_4096b) || \
  273. ((SIZE) == SDIO_DataBlockSize_8192b) || \
  274. ((SIZE) == SDIO_DataBlockSize_16384b))
  275. /**
  276. * @}
  277. */
  278. /** @defgroup SDIO_Transfer_Direction
  279. * @{
  280. */
  281. #define SDIO_TransferDir_ToCard ((uint32_t)0x00000000)
  282. #define SDIO_TransferDir_ToSDIO ((uint32_t)0x00000002)
  283. #define IS_SDIO_TRANSFER_DIR(DIR) (((DIR) == SDIO_TransferDir_ToCard) || \
  284. ((DIR) == SDIO_TransferDir_ToSDIO))
  285. /**
  286. * @}
  287. */
  288. /** @defgroup SDIO_Transfer_Type
  289. * @{
  290. */
  291. #define SDIO_TransferMode_Block ((uint32_t)0x00000000)
  292. #define SDIO_TransferMode_Stream ((uint32_t)0x00000004)
  293. #define IS_SDIO_TRANSFER_MODE(MODE) (((MODE) == SDIO_TransferMode_Stream) || \
  294. ((MODE) == SDIO_TransferMode_Block))
  295. /**
  296. * @}
  297. */
  298. /** @defgroup SDIO_DPSM_State
  299. * @{
  300. */
  301. #define SDIO_DPSM_Disable ((uint32_t)0x00000000)
  302. #define SDIO_DPSM_Enable ((uint32_t)0x00000001)
  303. #define IS_SDIO_DPSM(DPSM) (((DPSM) == SDIO_DPSM_Enable) || ((DPSM) == SDIO_DPSM_Disable))
  304. /**
  305. * @}
  306. */
  307. /** @defgroup SDIO_Flags
  308. * @{
  309. */
  310. #define SDIO_FLAG_CCRCFAIL ((uint32_t)0x00000001)
  311. #define SDIO_FLAG_DCRCFAIL ((uint32_t)0x00000002)
  312. #define SDIO_FLAG_CTIMEOUT ((uint32_t)0x00000004)
  313. #define SDIO_FLAG_DTIMEOUT ((uint32_t)0x00000008)
  314. #define SDIO_FLAG_TXUNDERR ((uint32_t)0x00000010)
  315. #define SDIO_FLAG_RXOVERR ((uint32_t)0x00000020)
  316. #define SDIO_FLAG_CMDREND ((uint32_t)0x00000040)
  317. #define SDIO_FLAG_CMDSENT ((uint32_t)0x00000080)
  318. #define SDIO_FLAG_DATAEND ((uint32_t)0x00000100)
  319. #define SDIO_FLAG_STBITERR ((uint32_t)0x00000200)
  320. #define SDIO_FLAG_DBCKEND ((uint32_t)0x00000400)
  321. #define SDIO_FLAG_CMDACT ((uint32_t)0x00000800)
  322. #define SDIO_FLAG_TXACT ((uint32_t)0x00001000)
  323. #define SDIO_FLAG_RXACT ((uint32_t)0x00002000)
  324. #define SDIO_FLAG_TXFIFOHE ((uint32_t)0x00004000)
  325. #define SDIO_FLAG_RXFIFOHF ((uint32_t)0x00008000)
  326. #define SDIO_FLAG_TXFIFOF ((uint32_t)0x00010000)
  327. #define SDIO_FLAG_RXFIFOF ((uint32_t)0x00020000)
  328. #define SDIO_FLAG_TXFIFOE ((uint32_t)0x00040000)
  329. #define SDIO_FLAG_RXFIFOE ((uint32_t)0x00080000)
  330. #define SDIO_FLAG_TXDAVL ((uint32_t)0x00100000)
  331. #define SDIO_FLAG_RXDAVL ((uint32_t)0x00200000)
  332. #define SDIO_FLAG_SDIOIT ((uint32_t)0x00400000)
  333. #define SDIO_FLAG_CEATAEND ((uint32_t)0x00800000)
  334. #define IS_SDIO_FLAG(FLAG) (((FLAG) == SDIO_FLAG_CCRCFAIL) || \
  335. ((FLAG) == SDIO_FLAG_DCRCFAIL) || \
  336. ((FLAG) == SDIO_FLAG_CTIMEOUT) || \
  337. ((FLAG) == SDIO_FLAG_DTIMEOUT) || \
  338. ((FLAG) == SDIO_FLAG_TXUNDERR) || \
  339. ((FLAG) == SDIO_FLAG_RXOVERR) || \
  340. ((FLAG) == SDIO_FLAG_CMDREND) || \
  341. ((FLAG) == SDIO_FLAG_CMDSENT) || \
  342. ((FLAG) == SDIO_FLAG_DATAEND) || \
  343. ((FLAG) == SDIO_FLAG_STBITERR) || \
  344. ((FLAG) == SDIO_FLAG_DBCKEND) || \
  345. ((FLAG) == SDIO_FLAG_CMDACT) || \
  346. ((FLAG) == SDIO_FLAG_TXACT) || \
  347. ((FLAG) == SDIO_FLAG_RXACT) || \
  348. ((FLAG) == SDIO_FLAG_TXFIFOHE) || \
  349. ((FLAG) == SDIO_FLAG_RXFIFOHF) || \
  350. ((FLAG) == SDIO_FLAG_TXFIFOF) || \
  351. ((FLAG) == SDIO_FLAG_RXFIFOF) || \
  352. ((FLAG) == SDIO_FLAG_TXFIFOE) || \
  353. ((FLAG) == SDIO_FLAG_RXFIFOE) || \
  354. ((FLAG) == SDIO_FLAG_TXDAVL) || \
  355. ((FLAG) == SDIO_FLAG_RXDAVL) || \
  356. ((FLAG) == SDIO_FLAG_SDIOIT) || \
  357. ((FLAG) == SDIO_FLAG_CEATAEND))
  358. #define IS_SDIO_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFF3FF800) == 0x00) && ((FLAG) != (uint32_t)0x00))
  359. #define IS_SDIO_GET_IT(IT) (((IT) == SDIO_IT_CCRCFAIL) || \
  360. ((IT) == SDIO_IT_DCRCFAIL) || \
  361. ((IT) == SDIO_IT_CTIMEOUT) || \
  362. ((IT) == SDIO_IT_DTIMEOUT) || \
  363. ((IT) == SDIO_IT_TXUNDERR) || \
  364. ((IT) == SDIO_IT_RXOVERR) || \
  365. ((IT) == SDIO_IT_CMDREND) || \
  366. ((IT) == SDIO_IT_CMDSENT) || \
  367. ((IT) == SDIO_IT_DATAEND) || \
  368. ((IT) == SDIO_IT_STBITERR) || \
  369. ((IT) == SDIO_IT_DBCKEND) || \
  370. ((IT) == SDIO_IT_CMDACT) || \
  371. ((IT) == SDIO_IT_TXACT) || \
  372. ((IT) == SDIO_IT_RXACT) || \
  373. ((IT) == SDIO_IT_TXFIFOHE) || \
  374. ((IT) == SDIO_IT_RXFIFOHF) || \
  375. ((IT) == SDIO_IT_TXFIFOF) || \
  376. ((IT) == SDIO_IT_RXFIFOF) || \
  377. ((IT) == SDIO_IT_TXFIFOE) || \
  378. ((IT) == SDIO_IT_RXFIFOE) || \
  379. ((IT) == SDIO_IT_TXDAVL) || \
  380. ((IT) == SDIO_IT_RXDAVL) || \
  381. ((IT) == SDIO_IT_SDIOIT) || \
  382. ((IT) == SDIO_IT_CEATAEND))
  383. #define IS_SDIO_CLEAR_IT(IT) ((((IT) & (uint32_t)0xFF3FF800) == 0x00) && ((IT) != (uint32_t)0x00))
  384. /**
  385. * @}
  386. */
  387. /** @defgroup SDIO_Read_Wait_Mode
  388. * @{
  389. */
  390. #define SDIO_ReadWaitMode_CLK ((uint32_t)0x00000001)
  391. #define SDIO_ReadWaitMode_DATA2 ((uint32_t)0x00000000)
  392. #define IS_SDIO_READWAIT_MODE(MODE) (((MODE) == SDIO_ReadWaitMode_CLK) || \
  393. ((MODE) == SDIO_ReadWaitMode_DATA2))
  394. /**
  395. * @}
  396. */
  397. /**
  398. * @}
  399. */
  400. /** @defgroup SDIO_Exported_Macros
  401. * @{
  402. */
  403. /**
  404. * @}
  405. */
  406. /** @defgroup SDIO_Exported_Functions
  407. * @{
  408. */
  409. void SDIO_DeInit(void);
  410. void SDIO_Init(SDIO_InitTypeDef* SDIO_InitStruct);
  411. void SDIO_StructInit(SDIO_InitTypeDef* SDIO_InitStruct);
  412. void SDIO_ClockCmd(FunctionalState NewState);
  413. void SDIO_SetPowerState(uint32_t SDIO_PowerState);
  414. uint32_t SDIO_GetPowerState(void);
  415. void SDIO_ITConfig(uint32_t SDIO_IT, FunctionalState NewState);
  416. void SDIO_DMACmd(FunctionalState NewState);
  417. void SDIO_SendCommand(SDIO_CmdInitTypeDef *SDIO_CmdInitStruct);
  418. void SDIO_CmdStructInit(SDIO_CmdInitTypeDef* SDIO_CmdInitStruct);
  419. uint8_t SDIO_GetCommandResponse(void);
  420. uint32_t SDIO_GetResponse(uint32_t SDIO_RESP);
  421. void SDIO_DataConfig(SDIO_DataInitTypeDef* SDIO_DataInitStruct);
  422. void SDIO_DataStructInit(SDIO_DataInitTypeDef* SDIO_DataInitStruct);
  423. uint32_t SDIO_GetDataCounter(void);
  424. uint32_t SDIO_ReadData(void);
  425. void SDIO_WriteData(uint32_t Data);
  426. uint32_t SDIO_GetFIFOCount(void);
  427. void SDIO_StartSDIOReadWait(FunctionalState NewState);
  428. void SDIO_StopSDIOReadWait(FunctionalState NewState);
  429. void SDIO_SetSDIOReadWaitMode(uint32_t SDIO_ReadWaitMode);
  430. void SDIO_SetSDIOOperation(FunctionalState NewState);
  431. void SDIO_SendSDIOSuspendCmd(FunctionalState NewState);
  432. void SDIO_CommandCompletionCmd(FunctionalState NewState);
  433. void SDIO_CEATAITCmd(FunctionalState NewState);
  434. void SDIO_SendCEATACmd(FunctionalState NewState);
  435. FlagStatus SDIO_GetFlagStatus(uint32_t SDIO_FLAG);
  436. void SDIO_ClearFlag(uint32_t SDIO_FLAG);
  437. ITStatus SDIO_GetITStatus(uint32_t SDIO_IT);
  438. void SDIO_ClearITPendingBit(uint32_t SDIO_IT);
  439. #ifdef __cplusplus
  440. }
  441. #endif
  442. #endif /* __STM32F10x_SDIO_H */
  443. /**
  444. * @}
  445. */
  446. /**
  447. * @}
  448. */
  449. /**
  450. * @}
  451. */
  452. /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/