mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_DISCO_F100RB/stm32f10x_sdio.h@126:549ba18ddd81, 2014-03-19 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Mar 19 16:00:09 2014 +0000
- Revision:
- 126:549ba18ddd81
Synchronized with git revision cf8fd1cf86b0cd85131dd24a6ded21cc6fe04827
Full URL: https://github.com/mbedmicro/mbed/commit/cf8fd1cf86b0cd85131dd24a6ded21cc6fe04827/
Conflicts:
workspace_tools/targets.py
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 126:549ba18ddd81 | 1 | /** |
mbed_official | 126:549ba18ddd81 | 2 | ****************************************************************************** |
mbed_official | 126:549ba18ddd81 | 3 | * @file stm32f10x_sdio.h |
mbed_official | 126:549ba18ddd81 | 4 | * @author MCD Application Team |
mbed_official | 126:549ba18ddd81 | 5 | * @version V3.6.1 |
mbed_official | 126:549ba18ddd81 | 6 | * @date 05-March-2012 |
mbed_official | 126:549ba18ddd81 | 7 | * @brief This file contains all the functions prototypes for the SDIO firmware |
mbed_official | 126:549ba18ddd81 | 8 | * library. |
mbed_official | 126:549ba18ddd81 | 9 | ******************************************************************************* |
mbed_official | 126:549ba18ddd81 | 10 | * Copyright (c) 2014, STMicroelectronics |
mbed_official | 126:549ba18ddd81 | 11 | * All rights reserved. |
mbed_official | 126:549ba18ddd81 | 12 | * |
mbed_official | 126:549ba18ddd81 | 13 | * Redistribution and use in source and binary forms, with or without |
mbed_official | 126:549ba18ddd81 | 14 | * modification, are permitted provided that the following conditions are met: |
mbed_official | 126:549ba18ddd81 | 15 | * |
mbed_official | 126:549ba18ddd81 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 126:549ba18ddd81 | 17 | * this list of conditions and the following disclaimer. |
mbed_official | 126:549ba18ddd81 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 126:549ba18ddd81 | 19 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 126:549ba18ddd81 | 20 | * and/or other materials provided with the distribution. |
mbed_official | 126:549ba18ddd81 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 126:549ba18ddd81 | 22 | * may be used to endorse or promote products derived from this software |
mbed_official | 126:549ba18ddd81 | 23 | * without specific prior written permission. |
mbed_official | 126:549ba18ddd81 | 24 | * |
mbed_official | 126:549ba18ddd81 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 126:549ba18ddd81 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 126:549ba18ddd81 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 126:549ba18ddd81 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 126:549ba18ddd81 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 126:549ba18ddd81 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 126:549ba18ddd81 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 126:549ba18ddd81 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 126:549ba18ddd81 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 126:549ba18ddd81 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 126:549ba18ddd81 | 35 | ******************************************************************************* |
mbed_official | 126:549ba18ddd81 | 36 | */ |
mbed_official | 126:549ba18ddd81 | 37 | |
mbed_official | 126:549ba18ddd81 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 126:549ba18ddd81 | 39 | #ifndef __STM32F10x_SDIO_H |
mbed_official | 126:549ba18ddd81 | 40 | #define __STM32F10x_SDIO_H |
mbed_official | 126:549ba18ddd81 | 41 | |
mbed_official | 126:549ba18ddd81 | 42 | #ifdef __cplusplus |
mbed_official | 126:549ba18ddd81 | 43 | extern "C" { |
mbed_official | 126:549ba18ddd81 | 44 | #endif |
mbed_official | 126:549ba18ddd81 | 45 | |
mbed_official | 126:549ba18ddd81 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 126:549ba18ddd81 | 47 | #include "stm32f10x.h" |
mbed_official | 126:549ba18ddd81 | 48 | |
mbed_official | 126:549ba18ddd81 | 49 | /** @addtogroup STM32F10x_StdPeriph_Driver |
mbed_official | 126:549ba18ddd81 | 50 | * @{ |
mbed_official | 126:549ba18ddd81 | 51 | */ |
mbed_official | 126:549ba18ddd81 | 52 | |
mbed_official | 126:549ba18ddd81 | 53 | /** @addtogroup SDIO |
mbed_official | 126:549ba18ddd81 | 54 | * @{ |
mbed_official | 126:549ba18ddd81 | 55 | */ |
mbed_official | 126:549ba18ddd81 | 56 | |
mbed_official | 126:549ba18ddd81 | 57 | /** @defgroup SDIO_Exported_Types |
mbed_official | 126:549ba18ddd81 | 58 | * @{ |
mbed_official | 126:549ba18ddd81 | 59 | */ |
mbed_official | 126:549ba18ddd81 | 60 | |
mbed_official | 126:549ba18ddd81 | 61 | typedef struct |
mbed_official | 126:549ba18ddd81 | 62 | { |
mbed_official | 126:549ba18ddd81 | 63 | uint32_t SDIO_ClockEdge; /*!< Specifies the clock transition on which the bit capture is made. |
mbed_official | 126:549ba18ddd81 | 64 | This parameter can be a value of @ref SDIO_Clock_Edge */ |
mbed_official | 126:549ba18ddd81 | 65 | |
mbed_official | 126:549ba18ddd81 | 66 | uint32_t SDIO_ClockBypass; /*!< Specifies whether the SDIO Clock divider bypass is |
mbed_official | 126:549ba18ddd81 | 67 | enabled or disabled. |
mbed_official | 126:549ba18ddd81 | 68 | This parameter can be a value of @ref SDIO_Clock_Bypass */ |
mbed_official | 126:549ba18ddd81 | 69 | |
mbed_official | 126:549ba18ddd81 | 70 | uint32_t SDIO_ClockPowerSave; /*!< Specifies whether SDIO Clock output is enabled or |
mbed_official | 126:549ba18ddd81 | 71 | disabled when the bus is idle. |
mbed_official | 126:549ba18ddd81 | 72 | This parameter can be a value of @ref SDIO_Clock_Power_Save */ |
mbed_official | 126:549ba18ddd81 | 73 | |
mbed_official | 126:549ba18ddd81 | 74 | uint32_t SDIO_BusWide; /*!< Specifies the SDIO bus width. |
mbed_official | 126:549ba18ddd81 | 75 | This parameter can be a value of @ref SDIO_Bus_Wide */ |
mbed_official | 126:549ba18ddd81 | 76 | |
mbed_official | 126:549ba18ddd81 | 77 | uint32_t SDIO_HardwareFlowControl; /*!< Specifies whether the SDIO hardware flow control is enabled or disabled. |
mbed_official | 126:549ba18ddd81 | 78 | This parameter can be a value of @ref SDIO_Hardware_Flow_Control */ |
mbed_official | 126:549ba18ddd81 | 79 | |
mbed_official | 126:549ba18ddd81 | 80 | uint8_t SDIO_ClockDiv; /*!< Specifies the clock frequency of the SDIO controller. |
mbed_official | 126:549ba18ddd81 | 81 | This parameter can be a value between 0x00 and 0xFF. */ |
mbed_official | 126:549ba18ddd81 | 82 | |
mbed_official | 126:549ba18ddd81 | 83 | } SDIO_InitTypeDef; |
mbed_official | 126:549ba18ddd81 | 84 | |
mbed_official | 126:549ba18ddd81 | 85 | typedef struct |
mbed_official | 126:549ba18ddd81 | 86 | { |
mbed_official | 126:549ba18ddd81 | 87 | uint32_t SDIO_Argument; /*!< Specifies the SDIO command argument which is sent |
mbed_official | 126:549ba18ddd81 | 88 | to a card as part of a command message. If a command |
mbed_official | 126:549ba18ddd81 | 89 | contains an argument, it must be loaded into this register |
mbed_official | 126:549ba18ddd81 | 90 | before writing the command to the command register */ |
mbed_official | 126:549ba18ddd81 | 91 | |
mbed_official | 126:549ba18ddd81 | 92 | uint32_t SDIO_CmdIndex; /*!< Specifies the SDIO command index. It must be lower than 0x40. */ |
mbed_official | 126:549ba18ddd81 | 93 | |
mbed_official | 126:549ba18ddd81 | 94 | uint32_t SDIO_Response; /*!< Specifies the SDIO response type. |
mbed_official | 126:549ba18ddd81 | 95 | This parameter can be a value of @ref SDIO_Response_Type */ |
mbed_official | 126:549ba18ddd81 | 96 | |
mbed_official | 126:549ba18ddd81 | 97 | uint32_t SDIO_Wait; /*!< Specifies whether SDIO wait-for-interrupt request is enabled or disabled. |
mbed_official | 126:549ba18ddd81 | 98 | This parameter can be a value of @ref SDIO_Wait_Interrupt_State */ |
mbed_official | 126:549ba18ddd81 | 99 | |
mbed_official | 126:549ba18ddd81 | 100 | uint32_t SDIO_CPSM; /*!< Specifies whether SDIO Command path state machine (CPSM) |
mbed_official | 126:549ba18ddd81 | 101 | is enabled or disabled. |
mbed_official | 126:549ba18ddd81 | 102 | This parameter can be a value of @ref SDIO_CPSM_State */ |
mbed_official | 126:549ba18ddd81 | 103 | } SDIO_CmdInitTypeDef; |
mbed_official | 126:549ba18ddd81 | 104 | |
mbed_official | 126:549ba18ddd81 | 105 | typedef struct |
mbed_official | 126:549ba18ddd81 | 106 | { |
mbed_official | 126:549ba18ddd81 | 107 | uint32_t SDIO_DataTimeOut; /*!< Specifies the data timeout period in card bus clock periods. */ |
mbed_official | 126:549ba18ddd81 | 108 | |
mbed_official | 126:549ba18ddd81 | 109 | uint32_t SDIO_DataLength; /*!< Specifies the number of data bytes to be transferred. */ |
mbed_official | 126:549ba18ddd81 | 110 | |
mbed_official | 126:549ba18ddd81 | 111 | uint32_t SDIO_DataBlockSize; /*!< Specifies the data block size for block transfer. |
mbed_official | 126:549ba18ddd81 | 112 | This parameter can be a value of @ref SDIO_Data_Block_Size */ |
mbed_official | 126:549ba18ddd81 | 113 | |
mbed_official | 126:549ba18ddd81 | 114 | uint32_t SDIO_TransferDir; /*!< Specifies the data transfer direction, whether the transfer |
mbed_official | 126:549ba18ddd81 | 115 | is a read or write. |
mbed_official | 126:549ba18ddd81 | 116 | This parameter can be a value of @ref SDIO_Transfer_Direction */ |
mbed_official | 126:549ba18ddd81 | 117 | |
mbed_official | 126:549ba18ddd81 | 118 | uint32_t SDIO_TransferMode; /*!< Specifies whether data transfer is in stream or block mode. |
mbed_official | 126:549ba18ddd81 | 119 | This parameter can be a value of @ref SDIO_Transfer_Type */ |
mbed_official | 126:549ba18ddd81 | 120 | |
mbed_official | 126:549ba18ddd81 | 121 | uint32_t SDIO_DPSM; /*!< Specifies whether SDIO Data path state machine (DPSM) |
mbed_official | 126:549ba18ddd81 | 122 | is enabled or disabled. |
mbed_official | 126:549ba18ddd81 | 123 | This parameter can be a value of @ref SDIO_DPSM_State */ |
mbed_official | 126:549ba18ddd81 | 124 | } SDIO_DataInitTypeDef; |
mbed_official | 126:549ba18ddd81 | 125 | |
mbed_official | 126:549ba18ddd81 | 126 | /** |
mbed_official | 126:549ba18ddd81 | 127 | * @} |
mbed_official | 126:549ba18ddd81 | 128 | */ |
mbed_official | 126:549ba18ddd81 | 129 | |
mbed_official | 126:549ba18ddd81 | 130 | /** @defgroup SDIO_Exported_Constants |
mbed_official | 126:549ba18ddd81 | 131 | * @{ |
mbed_official | 126:549ba18ddd81 | 132 | */ |
mbed_official | 126:549ba18ddd81 | 133 | |
mbed_official | 126:549ba18ddd81 | 134 | /** @defgroup SDIO_Clock_Edge |
mbed_official | 126:549ba18ddd81 | 135 | * @{ |
mbed_official | 126:549ba18ddd81 | 136 | */ |
mbed_official | 126:549ba18ddd81 | 137 | |
mbed_official | 126:549ba18ddd81 | 138 | #define SDIO_ClockEdge_Rising ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 139 | #define SDIO_ClockEdge_Falling ((uint32_t)0x00002000) |
mbed_official | 126:549ba18ddd81 | 140 | #define IS_SDIO_CLOCK_EDGE(EDGE) (((EDGE) == SDIO_ClockEdge_Rising) || \ |
mbed_official | 126:549ba18ddd81 | 141 | ((EDGE) == SDIO_ClockEdge_Falling)) |
mbed_official | 126:549ba18ddd81 | 142 | /** |
mbed_official | 126:549ba18ddd81 | 143 | * @} |
mbed_official | 126:549ba18ddd81 | 144 | */ |
mbed_official | 126:549ba18ddd81 | 145 | |
mbed_official | 126:549ba18ddd81 | 146 | /** @defgroup SDIO_Clock_Bypass |
mbed_official | 126:549ba18ddd81 | 147 | * @{ |
mbed_official | 126:549ba18ddd81 | 148 | */ |
mbed_official | 126:549ba18ddd81 | 149 | |
mbed_official | 126:549ba18ddd81 | 150 | #define SDIO_ClockBypass_Disable ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 151 | #define SDIO_ClockBypass_Enable ((uint32_t)0x00000400) |
mbed_official | 126:549ba18ddd81 | 152 | #define IS_SDIO_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDIO_ClockBypass_Disable) || \ |
mbed_official | 126:549ba18ddd81 | 153 | ((BYPASS) == SDIO_ClockBypass_Enable)) |
mbed_official | 126:549ba18ddd81 | 154 | /** |
mbed_official | 126:549ba18ddd81 | 155 | * @} |
mbed_official | 126:549ba18ddd81 | 156 | */ |
mbed_official | 126:549ba18ddd81 | 157 | |
mbed_official | 126:549ba18ddd81 | 158 | /** @defgroup SDIO_Clock_Power_Save |
mbed_official | 126:549ba18ddd81 | 159 | * @{ |
mbed_official | 126:549ba18ddd81 | 160 | */ |
mbed_official | 126:549ba18ddd81 | 161 | |
mbed_official | 126:549ba18ddd81 | 162 | #define SDIO_ClockPowerSave_Disable ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 163 | #define SDIO_ClockPowerSave_Enable ((uint32_t)0x00000200) |
mbed_official | 126:549ba18ddd81 | 164 | #define IS_SDIO_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDIO_ClockPowerSave_Disable) || \ |
mbed_official | 126:549ba18ddd81 | 165 | ((SAVE) == SDIO_ClockPowerSave_Enable)) |
mbed_official | 126:549ba18ddd81 | 166 | /** |
mbed_official | 126:549ba18ddd81 | 167 | * @} |
mbed_official | 126:549ba18ddd81 | 168 | */ |
mbed_official | 126:549ba18ddd81 | 169 | |
mbed_official | 126:549ba18ddd81 | 170 | /** @defgroup SDIO_Bus_Wide |
mbed_official | 126:549ba18ddd81 | 171 | * @{ |
mbed_official | 126:549ba18ddd81 | 172 | */ |
mbed_official | 126:549ba18ddd81 | 173 | |
mbed_official | 126:549ba18ddd81 | 174 | #define SDIO_BusWide_1b ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 175 | #define SDIO_BusWide_4b ((uint32_t)0x00000800) |
mbed_official | 126:549ba18ddd81 | 176 | #define SDIO_BusWide_8b ((uint32_t)0x00001000) |
mbed_official | 126:549ba18ddd81 | 177 | #define IS_SDIO_BUS_WIDE(WIDE) (((WIDE) == SDIO_BusWide_1b) || ((WIDE) == SDIO_BusWide_4b) || \ |
mbed_official | 126:549ba18ddd81 | 178 | ((WIDE) == SDIO_BusWide_8b)) |
mbed_official | 126:549ba18ddd81 | 179 | |
mbed_official | 126:549ba18ddd81 | 180 | /** |
mbed_official | 126:549ba18ddd81 | 181 | * @} |
mbed_official | 126:549ba18ddd81 | 182 | */ |
mbed_official | 126:549ba18ddd81 | 183 | |
mbed_official | 126:549ba18ddd81 | 184 | /** @defgroup SDIO_Hardware_Flow_Control |
mbed_official | 126:549ba18ddd81 | 185 | * @{ |
mbed_official | 126:549ba18ddd81 | 186 | */ |
mbed_official | 126:549ba18ddd81 | 187 | |
mbed_official | 126:549ba18ddd81 | 188 | #define SDIO_HardwareFlowControl_Disable ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 189 | #define SDIO_HardwareFlowControl_Enable ((uint32_t)0x00004000) |
mbed_official | 126:549ba18ddd81 | 190 | #define IS_SDIO_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDIO_HardwareFlowControl_Disable) || \ |
mbed_official | 126:549ba18ddd81 | 191 | ((CONTROL) == SDIO_HardwareFlowControl_Enable)) |
mbed_official | 126:549ba18ddd81 | 192 | /** |
mbed_official | 126:549ba18ddd81 | 193 | * @} |
mbed_official | 126:549ba18ddd81 | 194 | */ |
mbed_official | 126:549ba18ddd81 | 195 | |
mbed_official | 126:549ba18ddd81 | 196 | /** @defgroup SDIO_Power_State |
mbed_official | 126:549ba18ddd81 | 197 | * @{ |
mbed_official | 126:549ba18ddd81 | 198 | */ |
mbed_official | 126:549ba18ddd81 | 199 | |
mbed_official | 126:549ba18ddd81 | 200 | #define SDIO_PowerState_OFF ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 201 | #define SDIO_PowerState_ON ((uint32_t)0x00000003) |
mbed_official | 126:549ba18ddd81 | 202 | #define IS_SDIO_POWER_STATE(STATE) (((STATE) == SDIO_PowerState_OFF) || ((STATE) == SDIO_PowerState_ON)) |
mbed_official | 126:549ba18ddd81 | 203 | /** |
mbed_official | 126:549ba18ddd81 | 204 | * @} |
mbed_official | 126:549ba18ddd81 | 205 | */ |
mbed_official | 126:549ba18ddd81 | 206 | |
mbed_official | 126:549ba18ddd81 | 207 | |
mbed_official | 126:549ba18ddd81 | 208 | /** @defgroup SDIO_Interrupt_sources |
mbed_official | 126:549ba18ddd81 | 209 | * @{ |
mbed_official | 126:549ba18ddd81 | 210 | */ |
mbed_official | 126:549ba18ddd81 | 211 | |
mbed_official | 126:549ba18ddd81 | 212 | #define SDIO_IT_CCRCFAIL ((uint32_t)0x00000001) |
mbed_official | 126:549ba18ddd81 | 213 | #define SDIO_IT_DCRCFAIL ((uint32_t)0x00000002) |
mbed_official | 126:549ba18ddd81 | 214 | #define SDIO_IT_CTIMEOUT ((uint32_t)0x00000004) |
mbed_official | 126:549ba18ddd81 | 215 | #define SDIO_IT_DTIMEOUT ((uint32_t)0x00000008) |
mbed_official | 126:549ba18ddd81 | 216 | #define SDIO_IT_TXUNDERR ((uint32_t)0x00000010) |
mbed_official | 126:549ba18ddd81 | 217 | #define SDIO_IT_RXOVERR ((uint32_t)0x00000020) |
mbed_official | 126:549ba18ddd81 | 218 | #define SDIO_IT_CMDREND ((uint32_t)0x00000040) |
mbed_official | 126:549ba18ddd81 | 219 | #define SDIO_IT_CMDSENT ((uint32_t)0x00000080) |
mbed_official | 126:549ba18ddd81 | 220 | #define SDIO_IT_DATAEND ((uint32_t)0x00000100) |
mbed_official | 126:549ba18ddd81 | 221 | #define SDIO_IT_STBITERR ((uint32_t)0x00000200) |
mbed_official | 126:549ba18ddd81 | 222 | #define SDIO_IT_DBCKEND ((uint32_t)0x00000400) |
mbed_official | 126:549ba18ddd81 | 223 | #define SDIO_IT_CMDACT ((uint32_t)0x00000800) |
mbed_official | 126:549ba18ddd81 | 224 | #define SDIO_IT_TXACT ((uint32_t)0x00001000) |
mbed_official | 126:549ba18ddd81 | 225 | #define SDIO_IT_RXACT ((uint32_t)0x00002000) |
mbed_official | 126:549ba18ddd81 | 226 | #define SDIO_IT_TXFIFOHE ((uint32_t)0x00004000) |
mbed_official | 126:549ba18ddd81 | 227 | #define SDIO_IT_RXFIFOHF ((uint32_t)0x00008000) |
mbed_official | 126:549ba18ddd81 | 228 | #define SDIO_IT_TXFIFOF ((uint32_t)0x00010000) |
mbed_official | 126:549ba18ddd81 | 229 | #define SDIO_IT_RXFIFOF ((uint32_t)0x00020000) |
mbed_official | 126:549ba18ddd81 | 230 | #define SDIO_IT_TXFIFOE ((uint32_t)0x00040000) |
mbed_official | 126:549ba18ddd81 | 231 | #define SDIO_IT_RXFIFOE ((uint32_t)0x00080000) |
mbed_official | 126:549ba18ddd81 | 232 | #define SDIO_IT_TXDAVL ((uint32_t)0x00100000) |
mbed_official | 126:549ba18ddd81 | 233 | #define SDIO_IT_RXDAVL ((uint32_t)0x00200000) |
mbed_official | 126:549ba18ddd81 | 234 | #define SDIO_IT_SDIOIT ((uint32_t)0x00400000) |
mbed_official | 126:549ba18ddd81 | 235 | #define SDIO_IT_CEATAEND ((uint32_t)0x00800000) |
mbed_official | 126:549ba18ddd81 | 236 | #define IS_SDIO_IT(IT) ((((IT) & (uint32_t)0xFF000000) == 0x00) && ((IT) != (uint32_t)0x00)) |
mbed_official | 126:549ba18ddd81 | 237 | /** |
mbed_official | 126:549ba18ddd81 | 238 | * @} |
mbed_official | 126:549ba18ddd81 | 239 | */ |
mbed_official | 126:549ba18ddd81 | 240 | |
mbed_official | 126:549ba18ddd81 | 241 | /** @defgroup SDIO_Command_Index |
mbed_official | 126:549ba18ddd81 | 242 | * @{ |
mbed_official | 126:549ba18ddd81 | 243 | */ |
mbed_official | 126:549ba18ddd81 | 244 | |
mbed_official | 126:549ba18ddd81 | 245 | #define IS_SDIO_CMD_INDEX(INDEX) ((INDEX) < 0x40) |
mbed_official | 126:549ba18ddd81 | 246 | /** |
mbed_official | 126:549ba18ddd81 | 247 | * @} |
mbed_official | 126:549ba18ddd81 | 248 | */ |
mbed_official | 126:549ba18ddd81 | 249 | |
mbed_official | 126:549ba18ddd81 | 250 | /** @defgroup SDIO_Response_Type |
mbed_official | 126:549ba18ddd81 | 251 | * @{ |
mbed_official | 126:549ba18ddd81 | 252 | */ |
mbed_official | 126:549ba18ddd81 | 253 | |
mbed_official | 126:549ba18ddd81 | 254 | #define SDIO_Response_No ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 255 | #define SDIO_Response_Short ((uint32_t)0x00000040) |
mbed_official | 126:549ba18ddd81 | 256 | #define SDIO_Response_Long ((uint32_t)0x000000C0) |
mbed_official | 126:549ba18ddd81 | 257 | #define IS_SDIO_RESPONSE(RESPONSE) (((RESPONSE) == SDIO_Response_No) || \ |
mbed_official | 126:549ba18ddd81 | 258 | ((RESPONSE) == SDIO_Response_Short) || \ |
mbed_official | 126:549ba18ddd81 | 259 | ((RESPONSE) == SDIO_Response_Long)) |
mbed_official | 126:549ba18ddd81 | 260 | /** |
mbed_official | 126:549ba18ddd81 | 261 | * @} |
mbed_official | 126:549ba18ddd81 | 262 | */ |
mbed_official | 126:549ba18ddd81 | 263 | |
mbed_official | 126:549ba18ddd81 | 264 | /** @defgroup SDIO_Wait_Interrupt_State |
mbed_official | 126:549ba18ddd81 | 265 | * @{ |
mbed_official | 126:549ba18ddd81 | 266 | */ |
mbed_official | 126:549ba18ddd81 | 267 | |
mbed_official | 126:549ba18ddd81 | 268 | #define SDIO_Wait_No ((uint32_t)0x00000000) /*!< SDIO No Wait, TimeOut is enabled */ |
mbed_official | 126:549ba18ddd81 | 269 | #define SDIO_Wait_IT ((uint32_t)0x00000100) /*!< SDIO Wait Interrupt Request */ |
mbed_official | 126:549ba18ddd81 | 270 | #define SDIO_Wait_Pend ((uint32_t)0x00000200) /*!< SDIO Wait End of transfer */ |
mbed_official | 126:549ba18ddd81 | 271 | #define IS_SDIO_WAIT(WAIT) (((WAIT) == SDIO_Wait_No) || ((WAIT) == SDIO_Wait_IT) || \ |
mbed_official | 126:549ba18ddd81 | 272 | ((WAIT) == SDIO_Wait_Pend)) |
mbed_official | 126:549ba18ddd81 | 273 | /** |
mbed_official | 126:549ba18ddd81 | 274 | * @} |
mbed_official | 126:549ba18ddd81 | 275 | */ |
mbed_official | 126:549ba18ddd81 | 276 | |
mbed_official | 126:549ba18ddd81 | 277 | /** @defgroup SDIO_CPSM_State |
mbed_official | 126:549ba18ddd81 | 278 | * @{ |
mbed_official | 126:549ba18ddd81 | 279 | */ |
mbed_official | 126:549ba18ddd81 | 280 | |
mbed_official | 126:549ba18ddd81 | 281 | #define SDIO_CPSM_Disable ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 282 | #define SDIO_CPSM_Enable ((uint32_t)0x00000400) |
mbed_official | 126:549ba18ddd81 | 283 | #define IS_SDIO_CPSM(CPSM) (((CPSM) == SDIO_CPSM_Enable) || ((CPSM) == SDIO_CPSM_Disable)) |
mbed_official | 126:549ba18ddd81 | 284 | /** |
mbed_official | 126:549ba18ddd81 | 285 | * @} |
mbed_official | 126:549ba18ddd81 | 286 | */ |
mbed_official | 126:549ba18ddd81 | 287 | |
mbed_official | 126:549ba18ddd81 | 288 | /** @defgroup SDIO_Response_Registers |
mbed_official | 126:549ba18ddd81 | 289 | * @{ |
mbed_official | 126:549ba18ddd81 | 290 | */ |
mbed_official | 126:549ba18ddd81 | 291 | |
mbed_official | 126:549ba18ddd81 | 292 | #define SDIO_RESP1 ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 293 | #define SDIO_RESP2 ((uint32_t)0x00000004) |
mbed_official | 126:549ba18ddd81 | 294 | #define SDIO_RESP3 ((uint32_t)0x00000008) |
mbed_official | 126:549ba18ddd81 | 295 | #define SDIO_RESP4 ((uint32_t)0x0000000C) |
mbed_official | 126:549ba18ddd81 | 296 | #define IS_SDIO_RESP(RESP) (((RESP) == SDIO_RESP1) || ((RESP) == SDIO_RESP2) || \ |
mbed_official | 126:549ba18ddd81 | 297 | ((RESP) == SDIO_RESP3) || ((RESP) == SDIO_RESP4)) |
mbed_official | 126:549ba18ddd81 | 298 | /** |
mbed_official | 126:549ba18ddd81 | 299 | * @} |
mbed_official | 126:549ba18ddd81 | 300 | */ |
mbed_official | 126:549ba18ddd81 | 301 | |
mbed_official | 126:549ba18ddd81 | 302 | /** @defgroup SDIO_Data_Length |
mbed_official | 126:549ba18ddd81 | 303 | * @{ |
mbed_official | 126:549ba18ddd81 | 304 | */ |
mbed_official | 126:549ba18ddd81 | 305 | |
mbed_official | 126:549ba18ddd81 | 306 | #define IS_SDIO_DATA_LENGTH(LENGTH) ((LENGTH) <= 0x01FFFFFF) |
mbed_official | 126:549ba18ddd81 | 307 | /** |
mbed_official | 126:549ba18ddd81 | 308 | * @} |
mbed_official | 126:549ba18ddd81 | 309 | */ |
mbed_official | 126:549ba18ddd81 | 310 | |
mbed_official | 126:549ba18ddd81 | 311 | /** @defgroup SDIO_Data_Block_Size |
mbed_official | 126:549ba18ddd81 | 312 | * @{ |
mbed_official | 126:549ba18ddd81 | 313 | */ |
mbed_official | 126:549ba18ddd81 | 314 | |
mbed_official | 126:549ba18ddd81 | 315 | #define SDIO_DataBlockSize_1b ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 316 | #define SDIO_DataBlockSize_2b ((uint32_t)0x00000010) |
mbed_official | 126:549ba18ddd81 | 317 | #define SDIO_DataBlockSize_4b ((uint32_t)0x00000020) |
mbed_official | 126:549ba18ddd81 | 318 | #define SDIO_DataBlockSize_8b ((uint32_t)0x00000030) |
mbed_official | 126:549ba18ddd81 | 319 | #define SDIO_DataBlockSize_16b ((uint32_t)0x00000040) |
mbed_official | 126:549ba18ddd81 | 320 | #define SDIO_DataBlockSize_32b ((uint32_t)0x00000050) |
mbed_official | 126:549ba18ddd81 | 321 | #define SDIO_DataBlockSize_64b ((uint32_t)0x00000060) |
mbed_official | 126:549ba18ddd81 | 322 | #define SDIO_DataBlockSize_128b ((uint32_t)0x00000070) |
mbed_official | 126:549ba18ddd81 | 323 | #define SDIO_DataBlockSize_256b ((uint32_t)0x00000080) |
mbed_official | 126:549ba18ddd81 | 324 | #define SDIO_DataBlockSize_512b ((uint32_t)0x00000090) |
mbed_official | 126:549ba18ddd81 | 325 | #define SDIO_DataBlockSize_1024b ((uint32_t)0x000000A0) |
mbed_official | 126:549ba18ddd81 | 326 | #define SDIO_DataBlockSize_2048b ((uint32_t)0x000000B0) |
mbed_official | 126:549ba18ddd81 | 327 | #define SDIO_DataBlockSize_4096b ((uint32_t)0x000000C0) |
mbed_official | 126:549ba18ddd81 | 328 | #define SDIO_DataBlockSize_8192b ((uint32_t)0x000000D0) |
mbed_official | 126:549ba18ddd81 | 329 | #define SDIO_DataBlockSize_16384b ((uint32_t)0x000000E0) |
mbed_official | 126:549ba18ddd81 | 330 | #define IS_SDIO_BLOCK_SIZE(SIZE) (((SIZE) == SDIO_DataBlockSize_1b) || \ |
mbed_official | 126:549ba18ddd81 | 331 | ((SIZE) == SDIO_DataBlockSize_2b) || \ |
mbed_official | 126:549ba18ddd81 | 332 | ((SIZE) == SDIO_DataBlockSize_4b) || \ |
mbed_official | 126:549ba18ddd81 | 333 | ((SIZE) == SDIO_DataBlockSize_8b) || \ |
mbed_official | 126:549ba18ddd81 | 334 | ((SIZE) == SDIO_DataBlockSize_16b) || \ |
mbed_official | 126:549ba18ddd81 | 335 | ((SIZE) == SDIO_DataBlockSize_32b) || \ |
mbed_official | 126:549ba18ddd81 | 336 | ((SIZE) == SDIO_DataBlockSize_64b) || \ |
mbed_official | 126:549ba18ddd81 | 337 | ((SIZE) == SDIO_DataBlockSize_128b) || \ |
mbed_official | 126:549ba18ddd81 | 338 | ((SIZE) == SDIO_DataBlockSize_256b) || \ |
mbed_official | 126:549ba18ddd81 | 339 | ((SIZE) == SDIO_DataBlockSize_512b) || \ |
mbed_official | 126:549ba18ddd81 | 340 | ((SIZE) == SDIO_DataBlockSize_1024b) || \ |
mbed_official | 126:549ba18ddd81 | 341 | ((SIZE) == SDIO_DataBlockSize_2048b) || \ |
mbed_official | 126:549ba18ddd81 | 342 | ((SIZE) == SDIO_DataBlockSize_4096b) || \ |
mbed_official | 126:549ba18ddd81 | 343 | ((SIZE) == SDIO_DataBlockSize_8192b) || \ |
mbed_official | 126:549ba18ddd81 | 344 | ((SIZE) == SDIO_DataBlockSize_16384b)) |
mbed_official | 126:549ba18ddd81 | 345 | /** |
mbed_official | 126:549ba18ddd81 | 346 | * @} |
mbed_official | 126:549ba18ddd81 | 347 | */ |
mbed_official | 126:549ba18ddd81 | 348 | |
mbed_official | 126:549ba18ddd81 | 349 | /** @defgroup SDIO_Transfer_Direction |
mbed_official | 126:549ba18ddd81 | 350 | * @{ |
mbed_official | 126:549ba18ddd81 | 351 | */ |
mbed_official | 126:549ba18ddd81 | 352 | |
mbed_official | 126:549ba18ddd81 | 353 | #define SDIO_TransferDir_ToCard ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 354 | #define SDIO_TransferDir_ToSDIO ((uint32_t)0x00000002) |
mbed_official | 126:549ba18ddd81 | 355 | #define IS_SDIO_TRANSFER_DIR(DIR) (((DIR) == SDIO_TransferDir_ToCard) || \ |
mbed_official | 126:549ba18ddd81 | 356 | ((DIR) == SDIO_TransferDir_ToSDIO)) |
mbed_official | 126:549ba18ddd81 | 357 | /** |
mbed_official | 126:549ba18ddd81 | 358 | * @} |
mbed_official | 126:549ba18ddd81 | 359 | */ |
mbed_official | 126:549ba18ddd81 | 360 | |
mbed_official | 126:549ba18ddd81 | 361 | /** @defgroup SDIO_Transfer_Type |
mbed_official | 126:549ba18ddd81 | 362 | * @{ |
mbed_official | 126:549ba18ddd81 | 363 | */ |
mbed_official | 126:549ba18ddd81 | 364 | |
mbed_official | 126:549ba18ddd81 | 365 | #define SDIO_TransferMode_Block ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 366 | #define SDIO_TransferMode_Stream ((uint32_t)0x00000004) |
mbed_official | 126:549ba18ddd81 | 367 | #define IS_SDIO_TRANSFER_MODE(MODE) (((MODE) == SDIO_TransferMode_Stream) || \ |
mbed_official | 126:549ba18ddd81 | 368 | ((MODE) == SDIO_TransferMode_Block)) |
mbed_official | 126:549ba18ddd81 | 369 | /** |
mbed_official | 126:549ba18ddd81 | 370 | * @} |
mbed_official | 126:549ba18ddd81 | 371 | */ |
mbed_official | 126:549ba18ddd81 | 372 | |
mbed_official | 126:549ba18ddd81 | 373 | /** @defgroup SDIO_DPSM_State |
mbed_official | 126:549ba18ddd81 | 374 | * @{ |
mbed_official | 126:549ba18ddd81 | 375 | */ |
mbed_official | 126:549ba18ddd81 | 376 | |
mbed_official | 126:549ba18ddd81 | 377 | #define SDIO_DPSM_Disable ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 378 | #define SDIO_DPSM_Enable ((uint32_t)0x00000001) |
mbed_official | 126:549ba18ddd81 | 379 | #define IS_SDIO_DPSM(DPSM) (((DPSM) == SDIO_DPSM_Enable) || ((DPSM) == SDIO_DPSM_Disable)) |
mbed_official | 126:549ba18ddd81 | 380 | /** |
mbed_official | 126:549ba18ddd81 | 381 | * @} |
mbed_official | 126:549ba18ddd81 | 382 | */ |
mbed_official | 126:549ba18ddd81 | 383 | |
mbed_official | 126:549ba18ddd81 | 384 | /** @defgroup SDIO_Flags |
mbed_official | 126:549ba18ddd81 | 385 | * @{ |
mbed_official | 126:549ba18ddd81 | 386 | */ |
mbed_official | 126:549ba18ddd81 | 387 | |
mbed_official | 126:549ba18ddd81 | 388 | #define SDIO_FLAG_CCRCFAIL ((uint32_t)0x00000001) |
mbed_official | 126:549ba18ddd81 | 389 | #define SDIO_FLAG_DCRCFAIL ((uint32_t)0x00000002) |
mbed_official | 126:549ba18ddd81 | 390 | #define SDIO_FLAG_CTIMEOUT ((uint32_t)0x00000004) |
mbed_official | 126:549ba18ddd81 | 391 | #define SDIO_FLAG_DTIMEOUT ((uint32_t)0x00000008) |
mbed_official | 126:549ba18ddd81 | 392 | #define SDIO_FLAG_TXUNDERR ((uint32_t)0x00000010) |
mbed_official | 126:549ba18ddd81 | 393 | #define SDIO_FLAG_RXOVERR ((uint32_t)0x00000020) |
mbed_official | 126:549ba18ddd81 | 394 | #define SDIO_FLAG_CMDREND ((uint32_t)0x00000040) |
mbed_official | 126:549ba18ddd81 | 395 | #define SDIO_FLAG_CMDSENT ((uint32_t)0x00000080) |
mbed_official | 126:549ba18ddd81 | 396 | #define SDIO_FLAG_DATAEND ((uint32_t)0x00000100) |
mbed_official | 126:549ba18ddd81 | 397 | #define SDIO_FLAG_STBITERR ((uint32_t)0x00000200) |
mbed_official | 126:549ba18ddd81 | 398 | #define SDIO_FLAG_DBCKEND ((uint32_t)0x00000400) |
mbed_official | 126:549ba18ddd81 | 399 | #define SDIO_FLAG_CMDACT ((uint32_t)0x00000800) |
mbed_official | 126:549ba18ddd81 | 400 | #define SDIO_FLAG_TXACT ((uint32_t)0x00001000) |
mbed_official | 126:549ba18ddd81 | 401 | #define SDIO_FLAG_RXACT ((uint32_t)0x00002000) |
mbed_official | 126:549ba18ddd81 | 402 | #define SDIO_FLAG_TXFIFOHE ((uint32_t)0x00004000) |
mbed_official | 126:549ba18ddd81 | 403 | #define SDIO_FLAG_RXFIFOHF ((uint32_t)0x00008000) |
mbed_official | 126:549ba18ddd81 | 404 | #define SDIO_FLAG_TXFIFOF ((uint32_t)0x00010000) |
mbed_official | 126:549ba18ddd81 | 405 | #define SDIO_FLAG_RXFIFOF ((uint32_t)0x00020000) |
mbed_official | 126:549ba18ddd81 | 406 | #define SDIO_FLAG_TXFIFOE ((uint32_t)0x00040000) |
mbed_official | 126:549ba18ddd81 | 407 | #define SDIO_FLAG_RXFIFOE ((uint32_t)0x00080000) |
mbed_official | 126:549ba18ddd81 | 408 | #define SDIO_FLAG_TXDAVL ((uint32_t)0x00100000) |
mbed_official | 126:549ba18ddd81 | 409 | #define SDIO_FLAG_RXDAVL ((uint32_t)0x00200000) |
mbed_official | 126:549ba18ddd81 | 410 | #define SDIO_FLAG_SDIOIT ((uint32_t)0x00400000) |
mbed_official | 126:549ba18ddd81 | 411 | #define SDIO_FLAG_CEATAEND ((uint32_t)0x00800000) |
mbed_official | 126:549ba18ddd81 | 412 | #define IS_SDIO_FLAG(FLAG) (((FLAG) == SDIO_FLAG_CCRCFAIL) || \ |
mbed_official | 126:549ba18ddd81 | 413 | ((FLAG) == SDIO_FLAG_DCRCFAIL) || \ |
mbed_official | 126:549ba18ddd81 | 414 | ((FLAG) == SDIO_FLAG_CTIMEOUT) || \ |
mbed_official | 126:549ba18ddd81 | 415 | ((FLAG) == SDIO_FLAG_DTIMEOUT) || \ |
mbed_official | 126:549ba18ddd81 | 416 | ((FLAG) == SDIO_FLAG_TXUNDERR) || \ |
mbed_official | 126:549ba18ddd81 | 417 | ((FLAG) == SDIO_FLAG_RXOVERR) || \ |
mbed_official | 126:549ba18ddd81 | 418 | ((FLAG) == SDIO_FLAG_CMDREND) || \ |
mbed_official | 126:549ba18ddd81 | 419 | ((FLAG) == SDIO_FLAG_CMDSENT) || \ |
mbed_official | 126:549ba18ddd81 | 420 | ((FLAG) == SDIO_FLAG_DATAEND) || \ |
mbed_official | 126:549ba18ddd81 | 421 | ((FLAG) == SDIO_FLAG_STBITERR) || \ |
mbed_official | 126:549ba18ddd81 | 422 | ((FLAG) == SDIO_FLAG_DBCKEND) || \ |
mbed_official | 126:549ba18ddd81 | 423 | ((FLAG) == SDIO_FLAG_CMDACT) || \ |
mbed_official | 126:549ba18ddd81 | 424 | ((FLAG) == SDIO_FLAG_TXACT) || \ |
mbed_official | 126:549ba18ddd81 | 425 | ((FLAG) == SDIO_FLAG_RXACT) || \ |
mbed_official | 126:549ba18ddd81 | 426 | ((FLAG) == SDIO_FLAG_TXFIFOHE) || \ |
mbed_official | 126:549ba18ddd81 | 427 | ((FLAG) == SDIO_FLAG_RXFIFOHF) || \ |
mbed_official | 126:549ba18ddd81 | 428 | ((FLAG) == SDIO_FLAG_TXFIFOF) || \ |
mbed_official | 126:549ba18ddd81 | 429 | ((FLAG) == SDIO_FLAG_RXFIFOF) || \ |
mbed_official | 126:549ba18ddd81 | 430 | ((FLAG) == SDIO_FLAG_TXFIFOE) || \ |
mbed_official | 126:549ba18ddd81 | 431 | ((FLAG) == SDIO_FLAG_RXFIFOE) || \ |
mbed_official | 126:549ba18ddd81 | 432 | ((FLAG) == SDIO_FLAG_TXDAVL) || \ |
mbed_official | 126:549ba18ddd81 | 433 | ((FLAG) == SDIO_FLAG_RXDAVL) || \ |
mbed_official | 126:549ba18ddd81 | 434 | ((FLAG) == SDIO_FLAG_SDIOIT) || \ |
mbed_official | 126:549ba18ddd81 | 435 | ((FLAG) == SDIO_FLAG_CEATAEND)) |
mbed_official | 126:549ba18ddd81 | 436 | |
mbed_official | 126:549ba18ddd81 | 437 | #define IS_SDIO_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFF3FF800) == 0x00) && ((FLAG) != (uint32_t)0x00)) |
mbed_official | 126:549ba18ddd81 | 438 | |
mbed_official | 126:549ba18ddd81 | 439 | #define IS_SDIO_GET_IT(IT) (((IT) == SDIO_IT_CCRCFAIL) || \ |
mbed_official | 126:549ba18ddd81 | 440 | ((IT) == SDIO_IT_DCRCFAIL) || \ |
mbed_official | 126:549ba18ddd81 | 441 | ((IT) == SDIO_IT_CTIMEOUT) || \ |
mbed_official | 126:549ba18ddd81 | 442 | ((IT) == SDIO_IT_DTIMEOUT) || \ |
mbed_official | 126:549ba18ddd81 | 443 | ((IT) == SDIO_IT_TXUNDERR) || \ |
mbed_official | 126:549ba18ddd81 | 444 | ((IT) == SDIO_IT_RXOVERR) || \ |
mbed_official | 126:549ba18ddd81 | 445 | ((IT) == SDIO_IT_CMDREND) || \ |
mbed_official | 126:549ba18ddd81 | 446 | ((IT) == SDIO_IT_CMDSENT) || \ |
mbed_official | 126:549ba18ddd81 | 447 | ((IT) == SDIO_IT_DATAEND) || \ |
mbed_official | 126:549ba18ddd81 | 448 | ((IT) == SDIO_IT_STBITERR) || \ |
mbed_official | 126:549ba18ddd81 | 449 | ((IT) == SDIO_IT_DBCKEND) || \ |
mbed_official | 126:549ba18ddd81 | 450 | ((IT) == SDIO_IT_CMDACT) || \ |
mbed_official | 126:549ba18ddd81 | 451 | ((IT) == SDIO_IT_TXACT) || \ |
mbed_official | 126:549ba18ddd81 | 452 | ((IT) == SDIO_IT_RXACT) || \ |
mbed_official | 126:549ba18ddd81 | 453 | ((IT) == SDIO_IT_TXFIFOHE) || \ |
mbed_official | 126:549ba18ddd81 | 454 | ((IT) == SDIO_IT_RXFIFOHF) || \ |
mbed_official | 126:549ba18ddd81 | 455 | ((IT) == SDIO_IT_TXFIFOF) || \ |
mbed_official | 126:549ba18ddd81 | 456 | ((IT) == SDIO_IT_RXFIFOF) || \ |
mbed_official | 126:549ba18ddd81 | 457 | ((IT) == SDIO_IT_TXFIFOE) || \ |
mbed_official | 126:549ba18ddd81 | 458 | ((IT) == SDIO_IT_RXFIFOE) || \ |
mbed_official | 126:549ba18ddd81 | 459 | ((IT) == SDIO_IT_TXDAVL) || \ |
mbed_official | 126:549ba18ddd81 | 460 | ((IT) == SDIO_IT_RXDAVL) || \ |
mbed_official | 126:549ba18ddd81 | 461 | ((IT) == SDIO_IT_SDIOIT) || \ |
mbed_official | 126:549ba18ddd81 | 462 | ((IT) == SDIO_IT_CEATAEND)) |
mbed_official | 126:549ba18ddd81 | 463 | |
mbed_official | 126:549ba18ddd81 | 464 | #define IS_SDIO_CLEAR_IT(IT) ((((IT) & (uint32_t)0xFF3FF800) == 0x00) && ((IT) != (uint32_t)0x00)) |
mbed_official | 126:549ba18ddd81 | 465 | |
mbed_official | 126:549ba18ddd81 | 466 | /** |
mbed_official | 126:549ba18ddd81 | 467 | * @} |
mbed_official | 126:549ba18ddd81 | 468 | */ |
mbed_official | 126:549ba18ddd81 | 469 | |
mbed_official | 126:549ba18ddd81 | 470 | /** @defgroup SDIO_Read_Wait_Mode |
mbed_official | 126:549ba18ddd81 | 471 | * @{ |
mbed_official | 126:549ba18ddd81 | 472 | */ |
mbed_official | 126:549ba18ddd81 | 473 | |
mbed_official | 126:549ba18ddd81 | 474 | #define SDIO_ReadWaitMode_CLK ((uint32_t)0x00000001) |
mbed_official | 126:549ba18ddd81 | 475 | #define SDIO_ReadWaitMode_DATA2 ((uint32_t)0x00000000) |
mbed_official | 126:549ba18ddd81 | 476 | #define IS_SDIO_READWAIT_MODE(MODE) (((MODE) == SDIO_ReadWaitMode_CLK) || \ |
mbed_official | 126:549ba18ddd81 | 477 | ((MODE) == SDIO_ReadWaitMode_DATA2)) |
mbed_official | 126:549ba18ddd81 | 478 | /** |
mbed_official | 126:549ba18ddd81 | 479 | * @} |
mbed_official | 126:549ba18ddd81 | 480 | */ |
mbed_official | 126:549ba18ddd81 | 481 | |
mbed_official | 126:549ba18ddd81 | 482 | /** |
mbed_official | 126:549ba18ddd81 | 483 | * @} |
mbed_official | 126:549ba18ddd81 | 484 | */ |
mbed_official | 126:549ba18ddd81 | 485 | |
mbed_official | 126:549ba18ddd81 | 486 | /** @defgroup SDIO_Exported_Macros |
mbed_official | 126:549ba18ddd81 | 487 | * @{ |
mbed_official | 126:549ba18ddd81 | 488 | */ |
mbed_official | 126:549ba18ddd81 | 489 | |
mbed_official | 126:549ba18ddd81 | 490 | /** |
mbed_official | 126:549ba18ddd81 | 491 | * @} |
mbed_official | 126:549ba18ddd81 | 492 | */ |
mbed_official | 126:549ba18ddd81 | 493 | |
mbed_official | 126:549ba18ddd81 | 494 | /** @defgroup SDIO_Exported_Functions |
mbed_official | 126:549ba18ddd81 | 495 | * @{ |
mbed_official | 126:549ba18ddd81 | 496 | */ |
mbed_official | 126:549ba18ddd81 | 497 | |
mbed_official | 126:549ba18ddd81 | 498 | void SDIO_DeInit(void); |
mbed_official | 126:549ba18ddd81 | 499 | void SDIO_Init(SDIO_InitTypeDef* SDIO_InitStruct); |
mbed_official | 126:549ba18ddd81 | 500 | void SDIO_StructInit(SDIO_InitTypeDef* SDIO_InitStruct); |
mbed_official | 126:549ba18ddd81 | 501 | void SDIO_ClockCmd(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 502 | void SDIO_SetPowerState(uint32_t SDIO_PowerState); |
mbed_official | 126:549ba18ddd81 | 503 | uint32_t SDIO_GetPowerState(void); |
mbed_official | 126:549ba18ddd81 | 504 | void SDIO_ITConfig(uint32_t SDIO_IT, FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 505 | void SDIO_DMACmd(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 506 | void SDIO_SendCommand(SDIO_CmdInitTypeDef *SDIO_CmdInitStruct); |
mbed_official | 126:549ba18ddd81 | 507 | void SDIO_CmdStructInit(SDIO_CmdInitTypeDef* SDIO_CmdInitStruct); |
mbed_official | 126:549ba18ddd81 | 508 | uint8_t SDIO_GetCommandResponse(void); |
mbed_official | 126:549ba18ddd81 | 509 | uint32_t SDIO_GetResponse(uint32_t SDIO_RESP); |
mbed_official | 126:549ba18ddd81 | 510 | void SDIO_DataConfig(SDIO_DataInitTypeDef* SDIO_DataInitStruct); |
mbed_official | 126:549ba18ddd81 | 511 | void SDIO_DataStructInit(SDIO_DataInitTypeDef* SDIO_DataInitStruct); |
mbed_official | 126:549ba18ddd81 | 512 | uint32_t SDIO_GetDataCounter(void); |
mbed_official | 126:549ba18ddd81 | 513 | uint32_t SDIO_ReadData(void); |
mbed_official | 126:549ba18ddd81 | 514 | void SDIO_WriteData(uint32_t Data); |
mbed_official | 126:549ba18ddd81 | 515 | uint32_t SDIO_GetFIFOCount(void); |
mbed_official | 126:549ba18ddd81 | 516 | void SDIO_StartSDIOReadWait(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 517 | void SDIO_StopSDIOReadWait(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 518 | void SDIO_SetSDIOReadWaitMode(uint32_t SDIO_ReadWaitMode); |
mbed_official | 126:549ba18ddd81 | 519 | void SDIO_SetSDIOOperation(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 520 | void SDIO_SendSDIOSuspendCmd(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 521 | void SDIO_CommandCompletionCmd(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 522 | void SDIO_CEATAITCmd(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 523 | void SDIO_SendCEATACmd(FunctionalState NewState); |
mbed_official | 126:549ba18ddd81 | 524 | FlagStatus SDIO_GetFlagStatus(uint32_t SDIO_FLAG); |
mbed_official | 126:549ba18ddd81 | 525 | void SDIO_ClearFlag(uint32_t SDIO_FLAG); |
mbed_official | 126:549ba18ddd81 | 526 | ITStatus SDIO_GetITStatus(uint32_t SDIO_IT); |
mbed_official | 126:549ba18ddd81 | 527 | void SDIO_ClearITPendingBit(uint32_t SDIO_IT); |
mbed_official | 126:549ba18ddd81 | 528 | |
mbed_official | 126:549ba18ddd81 | 529 | #ifdef __cplusplus |
mbed_official | 126:549ba18ddd81 | 530 | } |
mbed_official | 126:549ba18ddd81 | 531 | #endif |
mbed_official | 126:549ba18ddd81 | 532 | |
mbed_official | 126:549ba18ddd81 | 533 | #endif /* __STM32F10x_SDIO_H */ |
mbed_official | 126:549ba18ddd81 | 534 | /** |
mbed_official | 126:549ba18ddd81 | 535 | * @} |
mbed_official | 126:549ba18ddd81 | 536 | */ |
mbed_official | 126:549ba18ddd81 | 537 | |
mbed_official | 126:549ba18ddd81 | 538 | /** |
mbed_official | 126:549ba18ddd81 | 539 | * @} |
mbed_official | 126:549ba18ddd81 | 540 | */ |
mbed_official | 126:549ba18ddd81 | 541 | |
mbed_official | 126:549ba18ddd81 | 542 | /** |
mbed_official | 126:549ba18ddd81 | 543 | * @} |
mbed_official | 126:549ba18ddd81 | 544 | */ |
mbed_official | 126:549ba18ddd81 | 545 | |
mbed_official | 126:549ba18ddd81 | 546 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |