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