2 ******************************************************************************
\r
3 * @file stm32l1xx_sdio.h
\r
4 * @author MCD Application Team
\r
6 * @date 05-March-2012
\r
7 * @brief This file contains all the functions prototypes for the SDIO firmware
\r
9 ******************************************************************************
\r
12 * <h2><center>© COPYRIGHT 2012 STMicroelectronics</center></h2>
\r
14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
\r
15 * You may not use this file except in compliance with the License.
\r
16 * You may obtain a copy of the License at:
\r
18 * http://www.st.com/software_license_agreement_liberty_v2
\r
20 * Unless required by applicable law or agreed to in writing, software
\r
21 * distributed under the License is distributed on an "AS IS" BASIS,
\r
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
23 * See the License for the specific language governing permissions and
\r
24 * limitations under the License.
\r
26 ******************************************************************************
\r
29 /* Define to prevent recursive inclusion -------------------------------------*/
\r
30 #ifndef __STM32L1xx_SDIO_H
\r
31 #define __STM32L1xx_SDIO_H
\r
37 /* Includes ------------------------------------------------------------------*/
\r
38 #include "stm32l1xx.h"
\r
40 /** @addtogroup STM32L1xx_StdPeriph_Driver
\r
44 /** @addtogroup SDIO
\r
48 /* Exported types ------------------------------------------------------------*/
\r
52 uint32_t SDIO_ClockEdge; /*!< Specifies the clock transition on which the bit capture is made.
\r
53 This parameter can be a value of @ref SDIO_Clock_Edge */
\r
55 uint32_t SDIO_ClockBypass; /*!< Specifies whether the SDIO Clock divider bypass is
\r
56 enabled or disabled.
\r
57 This parameter can be a value of @ref SDIO_Clock_Bypass */
\r
59 uint32_t SDIO_ClockPowerSave; /*!< Specifies whether SDIO Clock output is enabled or
\r
60 disabled when the bus is idle.
\r
61 This parameter can be a value of @ref SDIO_Clock_Power_Save */
\r
63 uint32_t SDIO_BusWide; /*!< Specifies the SDIO bus width.
\r
64 This parameter can be a value of @ref SDIO_Bus_Wide */
\r
66 uint32_t SDIO_HardwareFlowControl; /*!< Specifies whether the SDIO hardware flow control is enabled or disabled.
\r
67 This parameter can be a value of @ref SDIO_Hardware_Flow_Control */
\r
69 uint8_t SDIO_ClockDiv; /*!< Specifies the clock frequency of the SDIO controller.
\r
70 This parameter can be a value between 0x00 and 0xFF. */
\r
76 uint32_t SDIO_Argument; /*!< Specifies the SDIO command argument which is sent
\r
77 to a card as part of a command message. If a command
\r
78 contains an argument, it must be loaded into this register
\r
79 before writing the command to the command register */
\r
81 uint32_t SDIO_CmdIndex; /*!< Specifies the SDIO command index. It must be lower than 0x40. */
\r
83 uint32_t SDIO_Response; /*!< Specifies the SDIO response type.
\r
84 This parameter can be a value of @ref SDIO_Response_Type */
\r
86 uint32_t SDIO_Wait; /*!< Specifies whether SDIO wait-for-interrupt request is enabled or disabled.
\r
87 This parameter can be a value of @ref SDIO_Wait_Interrupt_State */
\r
89 uint32_t SDIO_CPSM; /*!< Specifies whether SDIO Command path state machine (CPSM)
\r
90 is enabled or disabled.
\r
91 This parameter can be a value of @ref SDIO_CPSM_State */
\r
92 } SDIO_CmdInitTypeDef;
\r
96 uint32_t SDIO_DataTimeOut; /*!< Specifies the data timeout period in card bus clock periods. */
\r
98 uint32_t SDIO_DataLength; /*!< Specifies the number of data bytes to be transferred. */
\r
100 uint32_t SDIO_DataBlockSize; /*!< Specifies the data block size for block transfer.
\r
101 This parameter can be a value of @ref SDIO_Data_Block_Size */
\r
103 uint32_t SDIO_TransferDir; /*!< Specifies the data transfer direction, whether the transfer
\r
104 is a read or write.
\r
105 This parameter can be a value of @ref SDIO_Transfer_Direction */
\r
107 uint32_t SDIO_TransferMode; /*!< Specifies whether data transfer is in stream or block mode.
\r
108 This parameter can be a value of @ref SDIO_Transfer_Type */
\r
110 uint32_t SDIO_DPSM; /*!< Specifies whether SDIO Data path state machine (DPSM)
\r
111 is enabled or disabled.
\r
112 This parameter can be a value of @ref SDIO_DPSM_State */
\r
113 } SDIO_DataInitTypeDef;
\r
115 /* Exported constants --------------------------------------------------------*/
\r
117 /** @defgroup SDIO_Exported_Constants
\r
121 /** @defgroup SDIO_Clock_Edge
\r
125 #define SDIO_ClockEdge_Rising ((uint32_t)0x00000000)
\r
126 #define SDIO_ClockEdge_Falling ((uint32_t)0x00002000)
\r
127 #define IS_SDIO_CLOCK_EDGE(EDGE) (((EDGE) == SDIO_ClockEdge_Rising) || \
\r
128 ((EDGE) == SDIO_ClockEdge_Falling))
\r
133 /** @defgroup SDIO_Clock_Bypass
\r
137 #define SDIO_ClockBypass_Disable ((uint32_t)0x00000000)
\r
138 #define SDIO_ClockBypass_Enable ((uint32_t)0x00000400)
\r
139 #define IS_SDIO_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDIO_ClockBypass_Disable) || \
\r
140 ((BYPASS) == SDIO_ClockBypass_Enable))
\r
145 /** @defgroup SDIO_Clock_Power_Save
\r
149 #define SDIO_ClockPowerSave_Disable ((uint32_t)0x00000000)
\r
150 #define SDIO_ClockPowerSave_Enable ((uint32_t)0x00000200)
\r
151 #define IS_SDIO_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDIO_ClockPowerSave_Disable) || \
\r
152 ((SAVE) == SDIO_ClockPowerSave_Enable))
\r
157 /** @defgroup SDIO_Bus_Wide
\r
161 #define SDIO_BusWide_1b ((uint32_t)0x00000000)
\r
162 #define SDIO_BusWide_4b ((uint32_t)0x00000800)
\r
163 #define SDIO_BusWide_8b ((uint32_t)0x00001000)
\r
164 #define IS_SDIO_BUS_WIDE(WIDE) (((WIDE) == SDIO_BusWide_1b) || ((WIDE) == SDIO_BusWide_4b) || \
\r
165 ((WIDE) == SDIO_BusWide_8b))
\r
171 /** @defgroup SDIO_Hardware_Flow_Control
\r
175 #define SDIO_HardwareFlowControl_Disable ((uint32_t)0x00000000)
\r
176 #define SDIO_HardwareFlowControl_Enable ((uint32_t)0x00004000)
\r
177 #define IS_SDIO_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDIO_HardwareFlowControl_Disable) || \
\r
178 ((CONTROL) == SDIO_HardwareFlowControl_Enable))
\r
183 /** @defgroup SDIO_Power_State
\r
187 #define SDIO_PowerState_OFF ((uint32_t)0x00000000)
\r
188 #define SDIO_PowerState_ON ((uint32_t)0x00000003)
\r
189 #define IS_SDIO_POWER_STATE(STATE) (((STATE) == SDIO_PowerState_OFF) || ((STATE) == SDIO_PowerState_ON))
\r
195 /** @defgroup SDIO_Interrupt_soucres
\r
199 #define SDIO_IT_CCRCFAIL ((uint32_t)0x00000001)
\r
200 #define SDIO_IT_DCRCFAIL ((uint32_t)0x00000002)
\r
201 #define SDIO_IT_CTIMEOUT ((uint32_t)0x00000004)
\r
202 #define SDIO_IT_DTIMEOUT ((uint32_t)0x00000008)
\r
203 #define SDIO_IT_TXUNDERR ((uint32_t)0x00000010)
\r
204 #define SDIO_IT_RXOVERR ((uint32_t)0x00000020)
\r
205 #define SDIO_IT_CMDREND ((uint32_t)0x00000040)
\r
206 #define SDIO_IT_CMDSENT ((uint32_t)0x00000080)
\r
207 #define SDIO_IT_DATAEND ((uint32_t)0x00000100)
\r
208 #define SDIO_IT_STBITERR ((uint32_t)0x00000200)
\r
209 #define SDIO_IT_DBCKEND ((uint32_t)0x00000400)
\r
210 #define SDIO_IT_CMDACT ((uint32_t)0x00000800)
\r
211 #define SDIO_IT_TXACT ((uint32_t)0x00001000)
\r
212 #define SDIO_IT_RXACT ((uint32_t)0x00002000)
\r
213 #define SDIO_IT_TXFIFOHE ((uint32_t)0x00004000)
\r
214 #define SDIO_IT_RXFIFOHF ((uint32_t)0x00008000)
\r
215 #define SDIO_IT_TXFIFOF ((uint32_t)0x00010000)
\r
216 #define SDIO_IT_RXFIFOF ((uint32_t)0x00020000)
\r
217 #define SDIO_IT_TXFIFOE ((uint32_t)0x00040000)
\r
218 #define SDIO_IT_RXFIFOE ((uint32_t)0x00080000)
\r
219 #define SDIO_IT_TXDAVL ((uint32_t)0x00100000)
\r
220 #define SDIO_IT_RXDAVL ((uint32_t)0x00200000)
\r
221 #define SDIO_IT_SDIOIT ((uint32_t)0x00400000)
\r
222 #define SDIO_IT_CEATAEND ((uint32_t)0x00800000)
\r
223 #define IS_SDIO_IT(IT) ((((IT) & (uint32_t)0xFF000000) == 0x00) && ((IT) != (uint32_t)0x00))
\r
228 /** @defgroup SDIO_Command_Index
\r
232 #define IS_SDIO_CMD_INDEX(INDEX) ((INDEX) < 0x40)
\r
237 /** @defgroup SDIO_Response_Type
\r
241 #define SDIO_Response_No ((uint32_t)0x00000000)
\r
242 #define SDIO_Response_Short ((uint32_t)0x00000040)
\r
243 #define SDIO_Response_Long ((uint32_t)0x000000C0)
\r
244 #define IS_SDIO_RESPONSE(RESPONSE) (((RESPONSE) == SDIO_Response_No) || \
\r
245 ((RESPONSE) == SDIO_Response_Short) || \
\r
246 ((RESPONSE) == SDIO_Response_Long))
\r
251 /** @defgroup SDIO_Wait_Interrupt_State
\r
255 #define SDIO_Wait_No ((uint32_t)0x00000000) /*!< SDIO No Wait, TimeOut is enabled */
\r
256 #define SDIO_Wait_IT ((uint32_t)0x00000100) /*!< SDIO Wait Interrupt Request */
\r
257 #define SDIO_Wait_Pend ((uint32_t)0x00000200) /*!< SDIO Wait End of transfer */
\r
258 #define IS_SDIO_WAIT(WAIT) (((WAIT) == SDIO_Wait_No) || ((WAIT) == SDIO_Wait_IT) || \
\r
259 ((WAIT) == SDIO_Wait_Pend))
\r
264 /** @defgroup SDIO_CPSM_State
\r
268 #define SDIO_CPSM_Disable ((uint32_t)0x00000000)
\r
269 #define SDIO_CPSM_Enable ((uint32_t)0x00000400)
\r
270 #define IS_SDIO_CPSM(CPSM) (((CPSM) == SDIO_CPSM_Enable) || ((CPSM) == SDIO_CPSM_Disable))
\r
275 /** @defgroup SDIO_Response_Registers
\r
279 #define SDIO_RESP1 ((uint32_t)0x00000000)
\r
280 #define SDIO_RESP2 ((uint32_t)0x00000004)
\r
281 #define SDIO_RESP3 ((uint32_t)0x00000008)
\r
282 #define SDIO_RESP4 ((uint32_t)0x0000000C)
\r
283 #define IS_SDIO_RESP(RESP) (((RESP) == SDIO_RESP1) || ((RESP) == SDIO_RESP2) || \
\r
284 ((RESP) == SDIO_RESP3) || ((RESP) == SDIO_RESP4))
\r
289 /** @defgroup SDIO_Data_Length
\r
293 #define IS_SDIO_DATA_LENGTH(LENGTH) ((LENGTH) <= 0x01FFFFFF)
\r
298 /** @defgroup SDIO_Data_Block_Size
\r
302 #define SDIO_DataBlockSize_1b ((uint32_t)0x00000000)
\r
303 #define SDIO_DataBlockSize_2b ((uint32_t)0x00000010)
\r
304 #define SDIO_DataBlockSize_4b ((uint32_t)0x00000020)
\r
305 #define SDIO_DataBlockSize_8b ((uint32_t)0x00000030)
\r
306 #define SDIO_DataBlockSize_16b ((uint32_t)0x00000040)
\r
307 #define SDIO_DataBlockSize_32b ((uint32_t)0x00000050)
\r
308 #define SDIO_DataBlockSize_64b ((uint32_t)0x00000060)
\r
309 #define SDIO_DataBlockSize_128b ((uint32_t)0x00000070)
\r
310 #define SDIO_DataBlockSize_256b ((uint32_t)0x00000080)
\r
311 #define SDIO_DataBlockSize_512b ((uint32_t)0x00000090)
\r
312 #define SDIO_DataBlockSize_1024b ((uint32_t)0x000000A0)
\r
313 #define SDIO_DataBlockSize_2048b ((uint32_t)0x000000B0)
\r
314 #define SDIO_DataBlockSize_4096b ((uint32_t)0x000000C0)
\r
315 #define SDIO_DataBlockSize_8192b ((uint32_t)0x000000D0)
\r
316 #define SDIO_DataBlockSize_16384b ((uint32_t)0x000000E0)
\r
317 #define IS_SDIO_BLOCK_SIZE(SIZE) (((SIZE) == SDIO_DataBlockSize_1b) || \
\r
318 ((SIZE) == SDIO_DataBlockSize_2b) || \
\r
319 ((SIZE) == SDIO_DataBlockSize_4b) || \
\r
320 ((SIZE) == SDIO_DataBlockSize_8b) || \
\r
321 ((SIZE) == SDIO_DataBlockSize_16b) || \
\r
322 ((SIZE) == SDIO_DataBlockSize_32b) || \
\r
323 ((SIZE) == SDIO_DataBlockSize_64b) || \
\r
324 ((SIZE) == SDIO_DataBlockSize_128b) || \
\r
325 ((SIZE) == SDIO_DataBlockSize_256b) || \
\r
326 ((SIZE) == SDIO_DataBlockSize_512b) || \
\r
327 ((SIZE) == SDIO_DataBlockSize_1024b) || \
\r
328 ((SIZE) == SDIO_DataBlockSize_2048b) || \
\r
329 ((SIZE) == SDIO_DataBlockSize_4096b) || \
\r
330 ((SIZE) == SDIO_DataBlockSize_8192b) || \
\r
331 ((SIZE) == SDIO_DataBlockSize_16384b))
\r
336 /** @defgroup SDIO_Transfer_Direction
\r
340 #define SDIO_TransferDir_ToCard ((uint32_t)0x00000000)
\r
341 #define SDIO_TransferDir_ToSDIO ((uint32_t)0x00000002)
\r
342 #define IS_SDIO_TRANSFER_DIR(DIR) (((DIR) == SDIO_TransferDir_ToCard) || \
\r
343 ((DIR) == SDIO_TransferDir_ToSDIO))
\r
348 /** @defgroup SDIO_Transfer_Type
\r
352 #define SDIO_TransferMode_Block ((uint32_t)0x00000000)
\r
353 #define SDIO_TransferMode_Stream ((uint32_t)0x00000004)
\r
354 #define IS_SDIO_TRANSFER_MODE(MODE) (((MODE) == SDIO_TransferMode_Stream) || \
\r
355 ((MODE) == SDIO_TransferMode_Block))
\r
360 /** @defgroup SDIO_DPSM_State
\r
364 #define SDIO_DPSM_Disable ((uint32_t)0x00000000)
\r
365 #define SDIO_DPSM_Enable ((uint32_t)0x00000001)
\r
366 #define IS_SDIO_DPSM(DPSM) (((DPSM) == SDIO_DPSM_Enable) || ((DPSM) == SDIO_DPSM_Disable))
\r
371 /** @defgroup SDIO_Flags
\r
375 #define SDIO_FLAG_CCRCFAIL ((uint32_t)0x00000001)
\r
376 #define SDIO_FLAG_DCRCFAIL ((uint32_t)0x00000002)
\r
377 #define SDIO_FLAG_CTIMEOUT ((uint32_t)0x00000004)
\r
378 #define SDIO_FLAG_DTIMEOUT ((uint32_t)0x00000008)
\r
379 #define SDIO_FLAG_TXUNDERR ((uint32_t)0x00000010)
\r
380 #define SDIO_FLAG_RXOVERR ((uint32_t)0x00000020)
\r
381 #define SDIO_FLAG_CMDREND ((uint32_t)0x00000040)
\r
382 #define SDIO_FLAG_CMDSENT ((uint32_t)0x00000080)
\r
383 #define SDIO_FLAG_DATAEND ((uint32_t)0x00000100)
\r
384 #define SDIO_FLAG_STBITERR ((uint32_t)0x00000200)
\r
385 #define SDIO_FLAG_DBCKEND ((uint32_t)0x00000400)
\r
386 #define SDIO_FLAG_CMDACT ((uint32_t)0x00000800)
\r
387 #define SDIO_FLAG_TXACT ((uint32_t)0x00001000)
\r
388 #define SDIO_FLAG_RXACT ((uint32_t)0x00002000)
\r
389 #define SDIO_FLAG_TXFIFOHE ((uint32_t)0x00004000)
\r
390 #define SDIO_FLAG_RXFIFOHF ((uint32_t)0x00008000)
\r
391 #define SDIO_FLAG_TXFIFOF ((uint32_t)0x00010000)
\r
392 #define SDIO_FLAG_RXFIFOF ((uint32_t)0x00020000)
\r
393 #define SDIO_FLAG_TXFIFOE ((uint32_t)0x00040000)
\r
394 #define SDIO_FLAG_RXFIFOE ((uint32_t)0x00080000)
\r
395 #define SDIO_FLAG_TXDAVL ((uint32_t)0x00100000)
\r
396 #define SDIO_FLAG_RXDAVL ((uint32_t)0x00200000)
\r
397 #define SDIO_FLAG_SDIOIT ((uint32_t)0x00400000)
\r
398 #define SDIO_FLAG_CEATAEND ((uint32_t)0x00800000)
\r
399 #define IS_SDIO_FLAG(FLAG) (((FLAG) == SDIO_FLAG_CCRCFAIL) || \
\r
400 ((FLAG) == SDIO_FLAG_DCRCFAIL) || \
\r
401 ((FLAG) == SDIO_FLAG_CTIMEOUT) || \
\r
402 ((FLAG) == SDIO_FLAG_DTIMEOUT) || \
\r
403 ((FLAG) == SDIO_FLAG_TXUNDERR) || \
\r
404 ((FLAG) == SDIO_FLAG_RXOVERR) || \
\r
405 ((FLAG) == SDIO_FLAG_CMDREND) || \
\r
406 ((FLAG) == SDIO_FLAG_CMDSENT) || \
\r
407 ((FLAG) == SDIO_FLAG_DATAEND) || \
\r
408 ((FLAG) == SDIO_FLAG_STBITERR) || \
\r
409 ((FLAG) == SDIO_FLAG_DBCKEND) || \
\r
410 ((FLAG) == SDIO_FLAG_CMDACT) || \
\r
411 ((FLAG) == SDIO_FLAG_TXACT) || \
\r
412 ((FLAG) == SDIO_FLAG_RXACT) || \
\r
413 ((FLAG) == SDIO_FLAG_TXFIFOHE) || \
\r
414 ((FLAG) == SDIO_FLAG_RXFIFOHF) || \
\r
415 ((FLAG) == SDIO_FLAG_TXFIFOF) || \
\r
416 ((FLAG) == SDIO_FLAG_RXFIFOF) || \
\r
417 ((FLAG) == SDIO_FLAG_TXFIFOE) || \
\r
418 ((FLAG) == SDIO_FLAG_RXFIFOE) || \
\r
419 ((FLAG) == SDIO_FLAG_TXDAVL) || \
\r
420 ((FLAG) == SDIO_FLAG_RXDAVL) || \
\r
421 ((FLAG) == SDIO_FLAG_SDIOIT) || \
\r
422 ((FLAG) == SDIO_FLAG_CEATAEND))
\r
424 #define IS_SDIO_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFF3FF800) == 0x00) && ((FLAG) != (uint32_t)0x00))
\r
426 #define IS_SDIO_GET_IT(IT) (((IT) == SDIO_IT_CCRCFAIL) || \
\r
427 ((IT) == SDIO_IT_DCRCFAIL) || \
\r
428 ((IT) == SDIO_IT_CTIMEOUT) || \
\r
429 ((IT) == SDIO_IT_DTIMEOUT) || \
\r
430 ((IT) == SDIO_IT_TXUNDERR) || \
\r
431 ((IT) == SDIO_IT_RXOVERR) || \
\r
432 ((IT) == SDIO_IT_CMDREND) || \
\r
433 ((IT) == SDIO_IT_CMDSENT) || \
\r
434 ((IT) == SDIO_IT_DATAEND) || \
\r
435 ((IT) == SDIO_IT_STBITERR) || \
\r
436 ((IT) == SDIO_IT_DBCKEND) || \
\r
437 ((IT) == SDIO_IT_CMDACT) || \
\r
438 ((IT) == SDIO_IT_TXACT) || \
\r
439 ((IT) == SDIO_IT_RXACT) || \
\r
440 ((IT) == SDIO_IT_TXFIFOHE) || \
\r
441 ((IT) == SDIO_IT_RXFIFOHF) || \
\r
442 ((IT) == SDIO_IT_TXFIFOF) || \
\r
443 ((IT) == SDIO_IT_RXFIFOF) || \
\r
444 ((IT) == SDIO_IT_TXFIFOE) || \
\r
445 ((IT) == SDIO_IT_RXFIFOE) || \
\r
446 ((IT) == SDIO_IT_TXDAVL) || \
\r
447 ((IT) == SDIO_IT_RXDAVL) || \
\r
448 ((IT) == SDIO_IT_SDIOIT) || \
\r
449 ((IT) == SDIO_IT_CEATAEND))
\r
451 #define IS_SDIO_CLEAR_IT(IT) ((((IT) & (uint32_t)0xFF3FF800) == 0x00) && ((IT) != (uint32_t)0x00))
\r
457 /** @defgroup SDIO_Read_Wait_Mode
\r
461 #define SDIO_ReadWaitMode_CLK ((uint32_t)0x00000001)
\r
462 #define SDIO_ReadWaitMode_DATA2 ((uint32_t)0x00000000)
\r
463 #define IS_SDIO_READWAIT_MODE(MODE) (((MODE) == SDIO_ReadWaitMode_CLK) || \
\r
464 ((MODE) == SDIO_ReadWaitMode_DATA2))
\r
473 /* Exported macro ------------------------------------------------------------*/
\r
474 /* Exported functions ------------------------------------------------------- */
\r
475 /* Function used to set the SDIO configuration to the default reset state ****/
\r
476 void SDIO_DeInit(void);
\r
478 /* Initialization and Configuration functions *********************************/
\r
479 void SDIO_Init(SDIO_InitTypeDef* SDIO_InitStruct);
\r
480 void SDIO_StructInit(SDIO_InitTypeDef* SDIO_InitStruct);
\r
481 void SDIO_ClockCmd(FunctionalState NewState);
\r
482 void SDIO_SetPowerState(uint32_t SDIO_PowerState);
\r
483 uint32_t SDIO_GetPowerState(void);
\r
485 /* DMA transfers management functions *****************************************/
\r
486 void SDIO_DMACmd(FunctionalState NewState);
\r
488 /* Command path state machine (CPSM) management functions *********************/
\r
489 void SDIO_SendCommand(SDIO_CmdInitTypeDef *SDIO_CmdInitStruct);
\r
490 void SDIO_CmdStructInit(SDIO_CmdInitTypeDef* SDIO_CmdInitStruct);
\r
491 uint8_t SDIO_GetCommandResponse(void);
\r
492 uint32_t SDIO_GetResponse(uint32_t SDIO_RESP);
\r
494 /* Data path state machine (DPSM) management functions ************************/
\r
495 void SDIO_DataConfig(SDIO_DataInitTypeDef* SDIO_DataInitStruct);
\r
496 void SDIO_DataStructInit(SDIO_DataInitTypeDef* SDIO_DataInitStruct);
\r
497 uint32_t SDIO_GetDataCounter(void);
\r
498 uint32_t SDIO_ReadData(void);
\r
499 void SDIO_WriteData(uint32_t Data);
\r
500 uint32_t SDIO_GetFIFOCount(void);
\r
502 /* SDIO IO Cards mode management functions ************************************/
\r
503 void SDIO_StartSDIOReadWait(FunctionalState NewState);
\r
504 void SDIO_StopSDIOReadWait(FunctionalState NewState);
\r
505 void SDIO_SetSDIOReadWaitMode(uint32_t SDIO_ReadWaitMode);
\r
506 void SDIO_SetSDIOOperation(FunctionalState NewState);
\r
507 void SDIO_SendSDIOSuspendCmd(FunctionalState NewState);
\r
509 /* CE-ATA mode management functions *******************************************/
\r
510 void SDIO_CommandCompletionCmd(FunctionalState NewState);
\r
511 void SDIO_CEATAITCmd(FunctionalState NewState);
\r
512 void SDIO_SendCEATACmd(FunctionalState NewState);
\r
514 /* Interrupts and flags management functions **********************************/
\r
515 void SDIO_ITConfig(uint32_t SDIO_IT, FunctionalState NewState);
\r
516 FlagStatus SDIO_GetFlagStatus(uint32_t SDIO_FLAG);
\r
517 void SDIO_ClearFlag(uint32_t SDIO_FLAG);
\r
518 ITStatus SDIO_GetITStatus(uint32_t SDIO_IT);
\r
519 void SDIO_ClearITPendingBit(uint32_t SDIO_IT);
\r
525 #endif /* __STM32L1xx_SDIO_H */
\r
535 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r