mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/stm32f4xx_ll_sdmmc.h@235:685d5f11838f, 2014-06-23 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Jun 23 14:00:09 2014 +0100
- Revision:
- 235:685d5f11838f
Synchronized with git revision 9728c76667962b289ee9c4c687ef9f115db48cd3
Full URL: https://github.com/mbedmicro/mbed/commit/9728c76667962b289ee9c4c687ef9f115db48cd3/
[NUCLEO_F411RE] Add all target files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 235:685d5f11838f | 1 | /** |
mbed_official | 235:685d5f11838f | 2 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 3 | * @file stm32f4xx_ll_sdmmc.h |
mbed_official | 235:685d5f11838f | 4 | * @author MCD Application Team |
mbed_official | 235:685d5f11838f | 5 | * @version V1.1.0 |
mbed_official | 235:685d5f11838f | 6 | * @date 19-June-2014 |
mbed_official | 235:685d5f11838f | 7 | * @brief Header file of SDMMC HAL module. |
mbed_official | 235:685d5f11838f | 8 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 9 | * @attention |
mbed_official | 235:685d5f11838f | 10 | * |
mbed_official | 235:685d5f11838f | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 235:685d5f11838f | 12 | * |
mbed_official | 235:685d5f11838f | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 235:685d5f11838f | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 235:685d5f11838f | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 235:685d5f11838f | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 235:685d5f11838f | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 235:685d5f11838f | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 235:685d5f11838f | 19 | * and/or other materials provided with the distribution. |
mbed_official | 235:685d5f11838f | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 235:685d5f11838f | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 235:685d5f11838f | 22 | * without specific prior written permission. |
mbed_official | 235:685d5f11838f | 23 | * |
mbed_official | 235:685d5f11838f | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 235:685d5f11838f | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 235:685d5f11838f | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 235:685d5f11838f | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 235:685d5f11838f | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 235:685d5f11838f | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 235:685d5f11838f | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 235:685d5f11838f | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 235:685d5f11838f | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 235:685d5f11838f | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 235:685d5f11838f | 34 | * |
mbed_official | 235:685d5f11838f | 35 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 36 | */ |
mbed_official | 235:685d5f11838f | 37 | |
mbed_official | 235:685d5f11838f | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 235:685d5f11838f | 39 | #ifndef __STM32F4xx_LL_SDMMC_H |
mbed_official | 235:685d5f11838f | 40 | #define __STM32F4xx_LL_SDMMC_H |
mbed_official | 235:685d5f11838f | 41 | |
mbed_official | 235:685d5f11838f | 42 | #ifdef __cplusplus |
mbed_official | 235:685d5f11838f | 43 | extern "C" { |
mbed_official | 235:685d5f11838f | 44 | #endif |
mbed_official | 235:685d5f11838f | 45 | |
mbed_official | 235:685d5f11838f | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 47 | #include "stm32f4xx_hal_def.h" |
mbed_official | 235:685d5f11838f | 48 | |
mbed_official | 235:685d5f11838f | 49 | /** @addtogroup STM32F4xx_Driver |
mbed_official | 235:685d5f11838f | 50 | * @{ |
mbed_official | 235:685d5f11838f | 51 | */ |
mbed_official | 235:685d5f11838f | 52 | |
mbed_official | 235:685d5f11838f | 53 | /** @addtogroup SDMMC |
mbed_official | 235:685d5f11838f | 54 | * @{ |
mbed_official | 235:685d5f11838f | 55 | */ |
mbed_official | 235:685d5f11838f | 56 | |
mbed_official | 235:685d5f11838f | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 58 | |
mbed_official | 235:685d5f11838f | 59 | /** @defgroup SDIO_Exported_Types SDIO Exported Types |
mbed_official | 235:685d5f11838f | 60 | * @{ |
mbed_official | 235:685d5f11838f | 61 | */ |
mbed_official | 235:685d5f11838f | 62 | |
mbed_official | 235:685d5f11838f | 63 | /** |
mbed_official | 235:685d5f11838f | 64 | * @brief SDMMC Configuration Structure definition |
mbed_official | 235:685d5f11838f | 65 | */ |
mbed_official | 235:685d5f11838f | 66 | typedef struct |
mbed_official | 235:685d5f11838f | 67 | { |
mbed_official | 235:685d5f11838f | 68 | uint32_t ClockEdge; /*!< Specifies the clock transition on which the bit capture is made. |
mbed_official | 235:685d5f11838f | 69 | This parameter can be a value of @ref SDIO_Clock_Edge */ |
mbed_official | 235:685d5f11838f | 70 | |
mbed_official | 235:685d5f11838f | 71 | uint32_t ClockBypass; /*!< Specifies whether the SDIO Clock divider bypass is |
mbed_official | 235:685d5f11838f | 72 | enabled or disabled. |
mbed_official | 235:685d5f11838f | 73 | This parameter can be a value of @ref SDIO_Clock_Bypass */ |
mbed_official | 235:685d5f11838f | 74 | |
mbed_official | 235:685d5f11838f | 75 | uint32_t ClockPowerSave; /*!< Specifies whether SDIO Clock output is enabled or |
mbed_official | 235:685d5f11838f | 76 | disabled when the bus is idle. |
mbed_official | 235:685d5f11838f | 77 | This parameter can be a value of @ref SDIO_Clock_Power_Save */ |
mbed_official | 235:685d5f11838f | 78 | |
mbed_official | 235:685d5f11838f | 79 | uint32_t BusWide; /*!< Specifies the SDIO bus width. |
mbed_official | 235:685d5f11838f | 80 | This parameter can be a value of @ref SDIO_Bus_Wide */ |
mbed_official | 235:685d5f11838f | 81 | |
mbed_official | 235:685d5f11838f | 82 | uint32_t HardwareFlowControl; /*!< Specifies whether the SDIO hardware flow control is enabled or disabled. |
mbed_official | 235:685d5f11838f | 83 | This parameter can be a value of @ref SDIO_Hardware_Flow_Control */ |
mbed_official | 235:685d5f11838f | 84 | |
mbed_official | 235:685d5f11838f | 85 | uint32_t ClockDiv; /*!< Specifies the clock frequency of the SDIO controller. |
mbed_official | 235:685d5f11838f | 86 | This parameter can be a value between Min_Data = 0 and Max_Data = 255 */ |
mbed_official | 235:685d5f11838f | 87 | |
mbed_official | 235:685d5f11838f | 88 | }SDIO_InitTypeDef; |
mbed_official | 235:685d5f11838f | 89 | |
mbed_official | 235:685d5f11838f | 90 | |
mbed_official | 235:685d5f11838f | 91 | /** |
mbed_official | 235:685d5f11838f | 92 | * @brief SDIO Command Control structure |
mbed_official | 235:685d5f11838f | 93 | */ |
mbed_official | 235:685d5f11838f | 94 | typedef struct |
mbed_official | 235:685d5f11838f | 95 | { |
mbed_official | 235:685d5f11838f | 96 | uint32_t Argument; /*!< Specifies the SDIO command argument which is sent |
mbed_official | 235:685d5f11838f | 97 | to a card as part of a command message. If a command |
mbed_official | 235:685d5f11838f | 98 | contains an argument, it must be loaded into this register |
mbed_official | 235:685d5f11838f | 99 | before writing the command to the command register. */ |
mbed_official | 235:685d5f11838f | 100 | |
mbed_official | 235:685d5f11838f | 101 | uint32_t CmdIndex; /*!< Specifies the SDIO command index. It must be Min_Data = 0 and |
mbed_official | 235:685d5f11838f | 102 | Max_Data = 64 */ |
mbed_official | 235:685d5f11838f | 103 | |
mbed_official | 235:685d5f11838f | 104 | uint32_t Response; /*!< Specifies the SDIO response type. |
mbed_official | 235:685d5f11838f | 105 | This parameter can be a value of @ref SDIO_Response_Type */ |
mbed_official | 235:685d5f11838f | 106 | |
mbed_official | 235:685d5f11838f | 107 | uint32_t WaitForInterrupt; /*!< Specifies whether SDIO wait for interrupt request is |
mbed_official | 235:685d5f11838f | 108 | enabled or disabled. |
mbed_official | 235:685d5f11838f | 109 | This parameter can be a value of @ref SDIO_Wait_Interrupt_State */ |
mbed_official | 235:685d5f11838f | 110 | |
mbed_official | 235:685d5f11838f | 111 | uint32_t CPSM; /*!< Specifies whether SDIO Command path state machine (CPSM) |
mbed_official | 235:685d5f11838f | 112 | is enabled or disabled. |
mbed_official | 235:685d5f11838f | 113 | This parameter can be a value of @ref SDIO_CPSM_State */ |
mbed_official | 235:685d5f11838f | 114 | }SDIO_CmdInitTypeDef; |
mbed_official | 235:685d5f11838f | 115 | |
mbed_official | 235:685d5f11838f | 116 | |
mbed_official | 235:685d5f11838f | 117 | /** |
mbed_official | 235:685d5f11838f | 118 | * @brief SDIO Data Control structure |
mbed_official | 235:685d5f11838f | 119 | */ |
mbed_official | 235:685d5f11838f | 120 | typedef struct |
mbed_official | 235:685d5f11838f | 121 | { |
mbed_official | 235:685d5f11838f | 122 | uint32_t DataTimeOut; /*!< Specifies the data timeout period in card bus clock periods. */ |
mbed_official | 235:685d5f11838f | 123 | |
mbed_official | 235:685d5f11838f | 124 | uint32_t DataLength; /*!< Specifies the number of data bytes to be transferred. */ |
mbed_official | 235:685d5f11838f | 125 | |
mbed_official | 235:685d5f11838f | 126 | uint32_t DataBlockSize; /*!< Specifies the data block size for block transfer. |
mbed_official | 235:685d5f11838f | 127 | This parameter can be a value of @ref SDIO_Data_Block_Size */ |
mbed_official | 235:685d5f11838f | 128 | |
mbed_official | 235:685d5f11838f | 129 | uint32_t TransferDir; /*!< Specifies the data transfer direction, whether the transfer |
mbed_official | 235:685d5f11838f | 130 | is a read or write. |
mbed_official | 235:685d5f11838f | 131 | This parameter can be a value of @ref SDIO_Transfer_Direction */ |
mbed_official | 235:685d5f11838f | 132 | |
mbed_official | 235:685d5f11838f | 133 | uint32_t TransferMode; /*!< Specifies whether data transfer is in stream or block mode. |
mbed_official | 235:685d5f11838f | 134 | This parameter can be a value of @ref SDIO_Transfer_Type */ |
mbed_official | 235:685d5f11838f | 135 | |
mbed_official | 235:685d5f11838f | 136 | uint32_t DPSM; /*!< Specifies whether SDIO Data path state machine (DPSM) |
mbed_official | 235:685d5f11838f | 137 | is enabled or disabled. |
mbed_official | 235:685d5f11838f | 138 | This parameter can be a value of @ref SDIO_DPSM_State */ |
mbed_official | 235:685d5f11838f | 139 | }SDIO_DataInitTypeDef; |
mbed_official | 235:685d5f11838f | 140 | |
mbed_official | 235:685d5f11838f | 141 | /** |
mbed_official | 235:685d5f11838f | 142 | * @} |
mbed_official | 235:685d5f11838f | 143 | */ |
mbed_official | 235:685d5f11838f | 144 | |
mbed_official | 235:685d5f11838f | 145 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 146 | |
mbed_official | 235:685d5f11838f | 147 | /** @defgroup SDIO_Exported_Constants |
mbed_official | 235:685d5f11838f | 148 | * @{ |
mbed_official | 235:685d5f11838f | 149 | */ |
mbed_official | 235:685d5f11838f | 150 | |
mbed_official | 235:685d5f11838f | 151 | /** @defgroup SDIO_Clock_Edge |
mbed_official | 235:685d5f11838f | 152 | * @{ |
mbed_official | 235:685d5f11838f | 153 | */ |
mbed_official | 235:685d5f11838f | 154 | #define SDIO_CLOCK_EDGE_RISING ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 155 | #define SDIO_CLOCK_EDGE_FALLING SDIO_CLKCR_NEGEDGE |
mbed_official | 235:685d5f11838f | 156 | |
mbed_official | 235:685d5f11838f | 157 | #define IS_SDIO_CLOCK_EDGE(EDGE) (((EDGE) == SDIO_CLOCK_EDGE_RISING) || \ |
mbed_official | 235:685d5f11838f | 158 | ((EDGE) == SDIO_CLOCK_EDGE_FALLING)) |
mbed_official | 235:685d5f11838f | 159 | /** |
mbed_official | 235:685d5f11838f | 160 | * @} |
mbed_official | 235:685d5f11838f | 161 | */ |
mbed_official | 235:685d5f11838f | 162 | |
mbed_official | 235:685d5f11838f | 163 | /** @defgroup SDIO_Clock_Bypass |
mbed_official | 235:685d5f11838f | 164 | * @{ |
mbed_official | 235:685d5f11838f | 165 | */ |
mbed_official | 235:685d5f11838f | 166 | #define SDIO_CLOCK_BYPASS_DISABLE ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 167 | #define SDIO_CLOCK_BYPASS_ENABLE SDIO_CLKCR_BYPASS |
mbed_official | 235:685d5f11838f | 168 | |
mbed_official | 235:685d5f11838f | 169 | #define IS_SDIO_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDIO_CLOCK_BYPASS_DISABLE) || \ |
mbed_official | 235:685d5f11838f | 170 | ((BYPASS) == SDIO_CLOCK_BYPASS_ENABLE)) |
mbed_official | 235:685d5f11838f | 171 | /** |
mbed_official | 235:685d5f11838f | 172 | * @} |
mbed_official | 235:685d5f11838f | 173 | */ |
mbed_official | 235:685d5f11838f | 174 | |
mbed_official | 235:685d5f11838f | 175 | /** @defgroup SDIO_Clock_Power_Save |
mbed_official | 235:685d5f11838f | 176 | * @{ |
mbed_official | 235:685d5f11838f | 177 | */ |
mbed_official | 235:685d5f11838f | 178 | #define SDIO_CLOCK_POWER_SAVE_DISABLE ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 179 | #define SDIO_CLOCK_POWER_SAVE_ENABLE SDIO_CLKCR_PWRSAV |
mbed_official | 235:685d5f11838f | 180 | |
mbed_official | 235:685d5f11838f | 181 | #define IS_SDIO_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDIO_CLOCK_POWER_SAVE_DISABLE) || \ |
mbed_official | 235:685d5f11838f | 182 | ((SAVE) == SDIO_CLOCK_POWER_SAVE_ENABLE)) |
mbed_official | 235:685d5f11838f | 183 | /** |
mbed_official | 235:685d5f11838f | 184 | * @} |
mbed_official | 235:685d5f11838f | 185 | */ |
mbed_official | 235:685d5f11838f | 186 | |
mbed_official | 235:685d5f11838f | 187 | /** @defgroup SDIO_Bus_Wide |
mbed_official | 235:685d5f11838f | 188 | * @{ |
mbed_official | 235:685d5f11838f | 189 | */ |
mbed_official | 235:685d5f11838f | 190 | #define SDIO_BUS_WIDE_1B ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 191 | #define SDIO_BUS_WIDE_4B SDIO_CLKCR_WIDBUS_0 |
mbed_official | 235:685d5f11838f | 192 | #define SDIO_BUS_WIDE_8B SDIO_CLKCR_WIDBUS_1 |
mbed_official | 235:685d5f11838f | 193 | |
mbed_official | 235:685d5f11838f | 194 | #define IS_SDIO_BUS_WIDE(WIDE) (((WIDE) == SDIO_BUS_WIDE_1B) || \ |
mbed_official | 235:685d5f11838f | 195 | ((WIDE) == SDIO_BUS_WIDE_4B) || \ |
mbed_official | 235:685d5f11838f | 196 | ((WIDE) == SDIO_BUS_WIDE_8B)) |
mbed_official | 235:685d5f11838f | 197 | /** |
mbed_official | 235:685d5f11838f | 198 | * @} |
mbed_official | 235:685d5f11838f | 199 | */ |
mbed_official | 235:685d5f11838f | 200 | |
mbed_official | 235:685d5f11838f | 201 | /** @defgroup SDIO_Hardware_Flow_Control |
mbed_official | 235:685d5f11838f | 202 | * @{ |
mbed_official | 235:685d5f11838f | 203 | */ |
mbed_official | 235:685d5f11838f | 204 | #define SDIO_HARDWARE_FLOW_CONTROL_DISABLE ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 205 | #define SDIO_HARDWARE_FLOW_CONTROL_ENABLE SDIO_CLKCR_HWFC_EN |
mbed_official | 235:685d5f11838f | 206 | |
mbed_official | 235:685d5f11838f | 207 | #define IS_SDIO_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDIO_HARDWARE_FLOW_CONTROL_DISABLE) || \ |
mbed_official | 235:685d5f11838f | 208 | ((CONTROL) == SDIO_HARDWARE_FLOW_CONTROL_ENABLE)) |
mbed_official | 235:685d5f11838f | 209 | /** |
mbed_official | 235:685d5f11838f | 210 | * @} |
mbed_official | 235:685d5f11838f | 211 | */ |
mbed_official | 235:685d5f11838f | 212 | |
mbed_official | 235:685d5f11838f | 213 | /** @defgroup SDIO_Clock_Division |
mbed_official | 235:685d5f11838f | 214 | * @{ |
mbed_official | 235:685d5f11838f | 215 | */ |
mbed_official | 235:685d5f11838f | 216 | #define IS_SDIO_CLKDIV(DIV) ((DIV) <= 0xFF) |
mbed_official | 235:685d5f11838f | 217 | /** |
mbed_official | 235:685d5f11838f | 218 | * @} |
mbed_official | 235:685d5f11838f | 219 | */ |
mbed_official | 235:685d5f11838f | 220 | |
mbed_official | 235:685d5f11838f | 221 | /** @defgroup SDIO_Command_Index |
mbed_official | 235:685d5f11838f | 222 | * @{ |
mbed_official | 235:685d5f11838f | 223 | */ |
mbed_official | 235:685d5f11838f | 224 | #define IS_SDIO_CMD_INDEX(INDEX) ((INDEX) < 0x40) |
mbed_official | 235:685d5f11838f | 225 | /** |
mbed_official | 235:685d5f11838f | 226 | * @} |
mbed_official | 235:685d5f11838f | 227 | */ |
mbed_official | 235:685d5f11838f | 228 | |
mbed_official | 235:685d5f11838f | 229 | /** @defgroup SDIO_Response_Type |
mbed_official | 235:685d5f11838f | 230 | * @{ |
mbed_official | 235:685d5f11838f | 231 | */ |
mbed_official | 235:685d5f11838f | 232 | #define SDIO_RESPONSE_NO ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 233 | #define SDIO_RESPONSE_SHORT SDIO_CMD_WAITRESP_0 |
mbed_official | 235:685d5f11838f | 234 | #define SDIO_RESPONSE_LONG SDIO_CMD_WAITRESP |
mbed_official | 235:685d5f11838f | 235 | |
mbed_official | 235:685d5f11838f | 236 | #define IS_SDIO_RESPONSE(RESPONSE) (((RESPONSE) == SDIO_RESPONSE_NO) || \ |
mbed_official | 235:685d5f11838f | 237 | ((RESPONSE) == SDIO_RESPONSE_SHORT) || \ |
mbed_official | 235:685d5f11838f | 238 | ((RESPONSE) == SDIO_RESPONSE_LONG)) |
mbed_official | 235:685d5f11838f | 239 | /** |
mbed_official | 235:685d5f11838f | 240 | * @} |
mbed_official | 235:685d5f11838f | 241 | */ |
mbed_official | 235:685d5f11838f | 242 | |
mbed_official | 235:685d5f11838f | 243 | /** @defgroup SDIO_Wait_Interrupt_State |
mbed_official | 235:685d5f11838f | 244 | * @{ |
mbed_official | 235:685d5f11838f | 245 | */ |
mbed_official | 235:685d5f11838f | 246 | #define SDIO_WAIT_NO ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 247 | #define SDIO_WAIT_IT SDIO_CMD_WAITINT |
mbed_official | 235:685d5f11838f | 248 | #define SDIO_WAIT_PEND SDIO_CMD_WAITPEND |
mbed_official | 235:685d5f11838f | 249 | |
mbed_official | 235:685d5f11838f | 250 | #define IS_SDIO_WAIT(WAIT) (((WAIT) == SDIO_WAIT_NO) || \ |
mbed_official | 235:685d5f11838f | 251 | ((WAIT) == SDIO_WAIT_IT) || \ |
mbed_official | 235:685d5f11838f | 252 | ((WAIT) == SDIO_WAIT_PEND)) |
mbed_official | 235:685d5f11838f | 253 | /** |
mbed_official | 235:685d5f11838f | 254 | * @} |
mbed_official | 235:685d5f11838f | 255 | */ |
mbed_official | 235:685d5f11838f | 256 | |
mbed_official | 235:685d5f11838f | 257 | /** @defgroup SDIO_CPSM_State |
mbed_official | 235:685d5f11838f | 258 | * @{ |
mbed_official | 235:685d5f11838f | 259 | */ |
mbed_official | 235:685d5f11838f | 260 | #define SDIO_CPSM_DISABLE ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 261 | #define SDIO_CPSM_ENABLE SDIO_CMD_CPSMEN |
mbed_official | 235:685d5f11838f | 262 | |
mbed_official | 235:685d5f11838f | 263 | #define IS_SDIO_CPSM(CPSM) (((CPSM) == SDIO_CPSM_DISABLE) || \ |
mbed_official | 235:685d5f11838f | 264 | ((CPSM) == SDIO_CPSM_ENABLE)) |
mbed_official | 235:685d5f11838f | 265 | /** |
mbed_official | 235:685d5f11838f | 266 | * @} |
mbed_official | 235:685d5f11838f | 267 | */ |
mbed_official | 235:685d5f11838f | 268 | |
mbed_official | 235:685d5f11838f | 269 | /** @defgroup SDIO_Response_Registers |
mbed_official | 235:685d5f11838f | 270 | * @{ |
mbed_official | 235:685d5f11838f | 271 | */ |
mbed_official | 235:685d5f11838f | 272 | #define SDIO_RESP1 ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 273 | #define SDIO_RESP2 ((uint32_t)0x00000004) |
mbed_official | 235:685d5f11838f | 274 | #define SDIO_RESP3 ((uint32_t)0x00000008) |
mbed_official | 235:685d5f11838f | 275 | #define SDIO_RESP4 ((uint32_t)0x0000000C) |
mbed_official | 235:685d5f11838f | 276 | |
mbed_official | 235:685d5f11838f | 277 | #define IS_SDIO_RESP(RESP) (((RESP) == SDIO_RESP1) || \ |
mbed_official | 235:685d5f11838f | 278 | ((RESP) == SDIO_RESP2) || \ |
mbed_official | 235:685d5f11838f | 279 | ((RESP) == SDIO_RESP3) || \ |
mbed_official | 235:685d5f11838f | 280 | ((RESP) == SDIO_RESP4)) |
mbed_official | 235:685d5f11838f | 281 | /** |
mbed_official | 235:685d5f11838f | 282 | * @} |
mbed_official | 235:685d5f11838f | 283 | */ |
mbed_official | 235:685d5f11838f | 284 | |
mbed_official | 235:685d5f11838f | 285 | /** @defgroup SDIO_Data_Length |
mbed_official | 235:685d5f11838f | 286 | * @{ |
mbed_official | 235:685d5f11838f | 287 | */ |
mbed_official | 235:685d5f11838f | 288 | #define IS_SDIO_DATA_LENGTH(LENGTH) ((LENGTH) <= 0x01FFFFFF) |
mbed_official | 235:685d5f11838f | 289 | /** |
mbed_official | 235:685d5f11838f | 290 | * @} |
mbed_official | 235:685d5f11838f | 291 | */ |
mbed_official | 235:685d5f11838f | 292 | |
mbed_official | 235:685d5f11838f | 293 | /** @defgroup SDIO_Data_Block_Size |
mbed_official | 235:685d5f11838f | 294 | * @{ |
mbed_official | 235:685d5f11838f | 295 | */ |
mbed_official | 235:685d5f11838f | 296 | #define SDIO_DATABLOCK_SIZE_1B ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 297 | #define SDIO_DATABLOCK_SIZE_2B SDIO_DCTRL_DBLOCKSIZE_0 |
mbed_official | 235:685d5f11838f | 298 | #define SDIO_DATABLOCK_SIZE_4B SDIO_DCTRL_DBLOCKSIZE_1 |
mbed_official | 235:685d5f11838f | 299 | #define SDIO_DATABLOCK_SIZE_8B ((uint32_t)0x00000030) |
mbed_official | 235:685d5f11838f | 300 | #define SDIO_DATABLOCK_SIZE_16B SDIO_DCTRL_DBLOCKSIZE_2 |
mbed_official | 235:685d5f11838f | 301 | #define SDIO_DATABLOCK_SIZE_32B ((uint32_t)0x00000050) |
mbed_official | 235:685d5f11838f | 302 | #define SDIO_DATABLOCK_SIZE_64B ((uint32_t)0x00000060) |
mbed_official | 235:685d5f11838f | 303 | #define SDIO_DATABLOCK_SIZE_128B ((uint32_t)0x00000070) |
mbed_official | 235:685d5f11838f | 304 | #define SDIO_DATABLOCK_SIZE_256B SDIO_DCTRL_DBLOCKSIZE_3 |
mbed_official | 235:685d5f11838f | 305 | #define SDIO_DATABLOCK_SIZE_512B ((uint32_t)0x00000090) |
mbed_official | 235:685d5f11838f | 306 | #define SDIO_DATABLOCK_SIZE_1024B ((uint32_t)0x000000A0) |
mbed_official | 235:685d5f11838f | 307 | #define SDIO_DATABLOCK_SIZE_2048B ((uint32_t)0x000000B0) |
mbed_official | 235:685d5f11838f | 308 | #define SDIO_DATABLOCK_SIZE_4096B ((uint32_t)0x000000C0) |
mbed_official | 235:685d5f11838f | 309 | #define SDIO_DATABLOCK_SIZE_8192B ((uint32_t)0x000000D0) |
mbed_official | 235:685d5f11838f | 310 | #define SDIO_DATABLOCK_SIZE_16384B ((uint32_t)0x000000E0) |
mbed_official | 235:685d5f11838f | 311 | |
mbed_official | 235:685d5f11838f | 312 | #define IS_SDIO_BLOCK_SIZE(SIZE) (((SIZE) == SDIO_DATABLOCK_SIZE_1B) || \ |
mbed_official | 235:685d5f11838f | 313 | ((SIZE) == SDIO_DATABLOCK_SIZE_2B) || \ |
mbed_official | 235:685d5f11838f | 314 | ((SIZE) == SDIO_DATABLOCK_SIZE_4B) || \ |
mbed_official | 235:685d5f11838f | 315 | ((SIZE) == SDIO_DATABLOCK_SIZE_8B) || \ |
mbed_official | 235:685d5f11838f | 316 | ((SIZE) == SDIO_DATABLOCK_SIZE_16B) || \ |
mbed_official | 235:685d5f11838f | 317 | ((SIZE) == SDIO_DATABLOCK_SIZE_32B) || \ |
mbed_official | 235:685d5f11838f | 318 | ((SIZE) == SDIO_DATABLOCK_SIZE_64B) || \ |
mbed_official | 235:685d5f11838f | 319 | ((SIZE) == SDIO_DATABLOCK_SIZE_128B) || \ |
mbed_official | 235:685d5f11838f | 320 | ((SIZE) == SDIO_DATABLOCK_SIZE_256B) || \ |
mbed_official | 235:685d5f11838f | 321 | ((SIZE) == SDIO_DATABLOCK_SIZE_512B) || \ |
mbed_official | 235:685d5f11838f | 322 | ((SIZE) == SDIO_DATABLOCK_SIZE_1024B) || \ |
mbed_official | 235:685d5f11838f | 323 | ((SIZE) == SDIO_DATABLOCK_SIZE_2048B) || \ |
mbed_official | 235:685d5f11838f | 324 | ((SIZE) == SDIO_DATABLOCK_SIZE_4096B) || \ |
mbed_official | 235:685d5f11838f | 325 | ((SIZE) == SDIO_DATABLOCK_SIZE_8192B) || \ |
mbed_official | 235:685d5f11838f | 326 | ((SIZE) == SDIO_DATABLOCK_SIZE_16384B)) |
mbed_official | 235:685d5f11838f | 327 | /** |
mbed_official | 235:685d5f11838f | 328 | * @} |
mbed_official | 235:685d5f11838f | 329 | */ |
mbed_official | 235:685d5f11838f | 330 | |
mbed_official | 235:685d5f11838f | 331 | /** @defgroup SDIO_Transfer_Direction |
mbed_official | 235:685d5f11838f | 332 | * @{ |
mbed_official | 235:685d5f11838f | 333 | */ |
mbed_official | 235:685d5f11838f | 334 | #define SDIO_TRANSFER_DIR_TO_CARD ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 335 | #define SDIO_TRANSFER_DIR_TO_SDIO SDIO_DCTRL_DTDIR |
mbed_official | 235:685d5f11838f | 336 | |
mbed_official | 235:685d5f11838f | 337 | #define IS_SDIO_TRANSFER_DIR(DIR) (((DIR) == SDIO_TRANSFER_DIR_TO_CARD) || \ |
mbed_official | 235:685d5f11838f | 338 | ((DIR) == SDIO_TRANSFER_DIR_TO_SDIO)) |
mbed_official | 235:685d5f11838f | 339 | /** |
mbed_official | 235:685d5f11838f | 340 | * @} |
mbed_official | 235:685d5f11838f | 341 | */ |
mbed_official | 235:685d5f11838f | 342 | |
mbed_official | 235:685d5f11838f | 343 | /** @defgroup SDIO_Transfer_Type |
mbed_official | 235:685d5f11838f | 344 | * @{ |
mbed_official | 235:685d5f11838f | 345 | */ |
mbed_official | 235:685d5f11838f | 346 | #define SDIO_TRANSFER_MODE_BLOCK ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 347 | #define SDIO_TRANSFER_MODE_STREAM SDIO_DCTRL_DTMODE |
mbed_official | 235:685d5f11838f | 348 | |
mbed_official | 235:685d5f11838f | 349 | #define IS_SDIO_TRANSFER_MODE(MODE) (((MODE) == SDIO_TRANSFER_MODE_BLOCK) || \ |
mbed_official | 235:685d5f11838f | 350 | ((MODE) == SDIO_TRANSFER_MODE_STREAM)) |
mbed_official | 235:685d5f11838f | 351 | /** |
mbed_official | 235:685d5f11838f | 352 | * @} |
mbed_official | 235:685d5f11838f | 353 | */ |
mbed_official | 235:685d5f11838f | 354 | |
mbed_official | 235:685d5f11838f | 355 | /** @defgroup SDIO_DPSM_State |
mbed_official | 235:685d5f11838f | 356 | * @{ |
mbed_official | 235:685d5f11838f | 357 | */ |
mbed_official | 235:685d5f11838f | 358 | #define SDIO_DPSM_DISABLE ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 359 | #define SDIO_DPSM_ENABLE SDIO_DCTRL_DTEN |
mbed_official | 235:685d5f11838f | 360 | |
mbed_official | 235:685d5f11838f | 361 | #define IS_SDIO_DPSM(DPSM) (((DPSM) == SDIO_DPSM_DISABLE) ||\ |
mbed_official | 235:685d5f11838f | 362 | ((DPSM) == SDIO_DPSM_ENABLE)) |
mbed_official | 235:685d5f11838f | 363 | /** |
mbed_official | 235:685d5f11838f | 364 | * @} |
mbed_official | 235:685d5f11838f | 365 | */ |
mbed_official | 235:685d5f11838f | 366 | |
mbed_official | 235:685d5f11838f | 367 | /** @defgroup SDIO_Read_Wait_Mode |
mbed_official | 235:685d5f11838f | 368 | * @{ |
mbed_official | 235:685d5f11838f | 369 | */ |
mbed_official | 235:685d5f11838f | 370 | #define SDIO_READ_WAIT_MODE_CLK ((uint32_t)0x00000000) |
mbed_official | 235:685d5f11838f | 371 | #define SDIO_READ_WAIT_MODE_DATA2 ((uint32_t)0x00000001) |
mbed_official | 235:685d5f11838f | 372 | |
mbed_official | 235:685d5f11838f | 373 | #define IS_SDIO_READWAIT_MODE(MODE) (((MODE) == SDIO_READ_WAIT_MODE_CLK) || \ |
mbed_official | 235:685d5f11838f | 374 | ((MODE) == SDIO_READ_WAIT_MODE_DATA2)) |
mbed_official | 235:685d5f11838f | 375 | /** |
mbed_official | 235:685d5f11838f | 376 | * @} |
mbed_official | 235:685d5f11838f | 377 | */ |
mbed_official | 235:685d5f11838f | 378 | |
mbed_official | 235:685d5f11838f | 379 | /** @defgroup SDIO_Interrupt_sources |
mbed_official | 235:685d5f11838f | 380 | * @{ |
mbed_official | 235:685d5f11838f | 381 | */ |
mbed_official | 235:685d5f11838f | 382 | #define SDIO_IT_CCRCFAIL SDIO_STA_CCRCFAIL |
mbed_official | 235:685d5f11838f | 383 | #define SDIO_IT_DCRCFAIL SDIO_STA_DCRCFAIL |
mbed_official | 235:685d5f11838f | 384 | #define SDIO_IT_CTIMEOUT SDIO_STA_CTIMEOUT |
mbed_official | 235:685d5f11838f | 385 | #define SDIO_IT_DTIMEOUT SDIO_STA_DTIMEOUT |
mbed_official | 235:685d5f11838f | 386 | #define SDIO_IT_TXUNDERR SDIO_STA_TXUNDERR |
mbed_official | 235:685d5f11838f | 387 | #define SDIO_IT_RXOVERR SDIO_STA_RXOVERR |
mbed_official | 235:685d5f11838f | 388 | #define SDIO_IT_CMDREND SDIO_STA_CMDREND |
mbed_official | 235:685d5f11838f | 389 | #define SDIO_IT_CMDSENT SDIO_STA_CMDSENT |
mbed_official | 235:685d5f11838f | 390 | #define SDIO_IT_DATAEND SDIO_STA_DATAEND |
mbed_official | 235:685d5f11838f | 391 | #define SDIO_IT_STBITERR SDIO_STA_STBITERR |
mbed_official | 235:685d5f11838f | 392 | #define SDIO_IT_DBCKEND SDIO_STA_DBCKEND |
mbed_official | 235:685d5f11838f | 393 | #define SDIO_IT_CMDACT SDIO_STA_CMDACT |
mbed_official | 235:685d5f11838f | 394 | #define SDIO_IT_TXACT SDIO_STA_TXACT |
mbed_official | 235:685d5f11838f | 395 | #define SDIO_IT_RXACT SDIO_STA_RXACT |
mbed_official | 235:685d5f11838f | 396 | #define SDIO_IT_TXFIFOHE SDIO_STA_TXFIFOHE |
mbed_official | 235:685d5f11838f | 397 | #define SDIO_IT_RXFIFOHF SDIO_STA_RXFIFOHF |
mbed_official | 235:685d5f11838f | 398 | #define SDIO_IT_TXFIFOF SDIO_STA_TXFIFOF |
mbed_official | 235:685d5f11838f | 399 | #define SDIO_IT_RXFIFOF SDIO_STA_RXFIFOF |
mbed_official | 235:685d5f11838f | 400 | #define SDIO_IT_TXFIFOE SDIO_STA_TXFIFOE |
mbed_official | 235:685d5f11838f | 401 | #define SDIO_IT_RXFIFOE SDIO_STA_RXFIFOE |
mbed_official | 235:685d5f11838f | 402 | #define SDIO_IT_TXDAVL SDIO_STA_TXDAVL |
mbed_official | 235:685d5f11838f | 403 | #define SDIO_IT_RXDAVL SDIO_STA_RXDAVL |
mbed_official | 235:685d5f11838f | 404 | #define SDIO_IT_SDIOIT SDIO_STA_SDIOIT |
mbed_official | 235:685d5f11838f | 405 | #define SDIO_IT_CEATAEND SDIO_STA_CEATAEND |
mbed_official | 235:685d5f11838f | 406 | |
mbed_official | 235:685d5f11838f | 407 | #define IS_SDIO_IT(IT) ((((IT) & (uint32_t)0xFF000000) == 0x00) && ((IT) != (uint32_t)0x00)) |
mbed_official | 235:685d5f11838f | 408 | /** |
mbed_official | 235:685d5f11838f | 409 | * @} |
mbed_official | 235:685d5f11838f | 410 | */ |
mbed_official | 235:685d5f11838f | 411 | |
mbed_official | 235:685d5f11838f | 412 | /** @defgroup SDIO_Flags |
mbed_official | 235:685d5f11838f | 413 | * @{ |
mbed_official | 235:685d5f11838f | 414 | */ |
mbed_official | 235:685d5f11838f | 415 | #define SDIO_FLAG_CCRCFAIL SDIO_STA_CCRCFAIL |
mbed_official | 235:685d5f11838f | 416 | #define SDIO_FLAG_DCRCFAIL SDIO_STA_DCRCFAIL |
mbed_official | 235:685d5f11838f | 417 | #define SDIO_FLAG_CTIMEOUT SDIO_STA_CTIMEOUT |
mbed_official | 235:685d5f11838f | 418 | #define SDIO_FLAG_DTIMEOUT SDIO_STA_DTIMEOUT |
mbed_official | 235:685d5f11838f | 419 | #define SDIO_FLAG_TXUNDERR SDIO_STA_TXUNDERR |
mbed_official | 235:685d5f11838f | 420 | #define SDIO_FLAG_RXOVERR SDIO_STA_RXOVERR |
mbed_official | 235:685d5f11838f | 421 | #define SDIO_FLAG_CMDREND SDIO_STA_CMDREND |
mbed_official | 235:685d5f11838f | 422 | #define SDIO_FLAG_CMDSENT SDIO_STA_CMDSENT |
mbed_official | 235:685d5f11838f | 423 | #define SDIO_FLAG_DATAEND SDIO_STA_DATAEND |
mbed_official | 235:685d5f11838f | 424 | #define SDIO_FLAG_STBITERR SDIO_STA_STBITERR |
mbed_official | 235:685d5f11838f | 425 | #define SDIO_FLAG_DBCKEND SDIO_STA_DBCKEND |
mbed_official | 235:685d5f11838f | 426 | #define SDIO_FLAG_CMDACT SDIO_STA_CMDACT |
mbed_official | 235:685d5f11838f | 427 | #define SDIO_FLAG_TXACT SDIO_STA_TXACT |
mbed_official | 235:685d5f11838f | 428 | #define SDIO_FLAG_RXACT SDIO_STA_RXACT |
mbed_official | 235:685d5f11838f | 429 | #define SDIO_FLAG_TXFIFOHE SDIO_STA_TXFIFOHE |
mbed_official | 235:685d5f11838f | 430 | #define SDIO_FLAG_RXFIFOHF SDIO_STA_RXFIFOHF |
mbed_official | 235:685d5f11838f | 431 | #define SDIO_FLAG_TXFIFOF SDIO_STA_TXFIFOF |
mbed_official | 235:685d5f11838f | 432 | #define SDIO_FLAG_RXFIFOF SDIO_STA_RXFIFOF |
mbed_official | 235:685d5f11838f | 433 | #define SDIO_FLAG_TXFIFOE SDIO_STA_TXFIFOE |
mbed_official | 235:685d5f11838f | 434 | #define SDIO_FLAG_RXFIFOE SDIO_STA_RXFIFOE |
mbed_official | 235:685d5f11838f | 435 | #define SDIO_FLAG_TXDAVL SDIO_STA_TXDAVL |
mbed_official | 235:685d5f11838f | 436 | #define SDIO_FLAG_RXDAVL SDIO_STA_RXDAVL |
mbed_official | 235:685d5f11838f | 437 | #define SDIO_FLAG_SDIOIT SDIO_STA_SDIOIT |
mbed_official | 235:685d5f11838f | 438 | #define SDIO_FLAG_CEATAEND SDIO_STA_CEATAEND |
mbed_official | 235:685d5f11838f | 439 | |
mbed_official | 235:685d5f11838f | 440 | #define IS_SDIO_FLAG(FLAG) (((FLAG) == SDIO_FLAG_CCRCFAIL) || \ |
mbed_official | 235:685d5f11838f | 441 | ((FLAG) == SDIO_FLAG_DCRCFAIL) || \ |
mbed_official | 235:685d5f11838f | 442 | ((FLAG) == SDIO_FLAG_CTIMEOUT) || \ |
mbed_official | 235:685d5f11838f | 443 | ((FLAG) == SDIO_FLAG_DTIMEOUT) || \ |
mbed_official | 235:685d5f11838f | 444 | ((FLAG) == SDIO_FLAG_TXUNDERR) || \ |
mbed_official | 235:685d5f11838f | 445 | ((FLAG) == SDIO_FLAG_RXOVERR) || \ |
mbed_official | 235:685d5f11838f | 446 | ((FLAG) == SDIO_FLAG_CMDREND) || \ |
mbed_official | 235:685d5f11838f | 447 | ((FLAG) == SDIO_FLAG_CMDSENT) || \ |
mbed_official | 235:685d5f11838f | 448 | ((FLAG) == SDIO_FLAG_DATAEND) || \ |
mbed_official | 235:685d5f11838f | 449 | ((FLAG) == SDIO_FLAG_STBITERR) || \ |
mbed_official | 235:685d5f11838f | 450 | ((FLAG) == SDIO_FLAG_DBCKEND) || \ |
mbed_official | 235:685d5f11838f | 451 | ((FLAG) == SDIO_FLAG_CMDACT) || \ |
mbed_official | 235:685d5f11838f | 452 | ((FLAG) == SDIO_FLAG_TXACT) || \ |
mbed_official | 235:685d5f11838f | 453 | ((FLAG) == SDIO_FLAG_RXACT) || \ |
mbed_official | 235:685d5f11838f | 454 | ((FLAG) == SDIO_FLAG_TXFIFOHE) || \ |
mbed_official | 235:685d5f11838f | 455 | ((FLAG) == SDIO_FLAG_RXFIFOHF) || \ |
mbed_official | 235:685d5f11838f | 456 | ((FLAG) == SDIO_FLAG_TXFIFOF) || \ |
mbed_official | 235:685d5f11838f | 457 | ((FLAG) == SDIO_FLAG_RXFIFOF) || \ |
mbed_official | 235:685d5f11838f | 458 | ((FLAG) == SDIO_FLAG_TXFIFOE) || \ |
mbed_official | 235:685d5f11838f | 459 | ((FLAG) == SDIO_FLAG_RXFIFOE) || \ |
mbed_official | 235:685d5f11838f | 460 | ((FLAG) == SDIO_FLAG_TXDAVL) || \ |
mbed_official | 235:685d5f11838f | 461 | ((FLAG) == SDIO_FLAG_RXDAVL) || \ |
mbed_official | 235:685d5f11838f | 462 | ((FLAG) == SDIO_FLAG_SDIOIT) || \ |
mbed_official | 235:685d5f11838f | 463 | ((FLAG) == SDIO_FLAG_CEATAEND)) |
mbed_official | 235:685d5f11838f | 464 | |
mbed_official | 235:685d5f11838f | 465 | #define IS_SDIO_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFF3FF800) == 0x00) && ((FLAG) != (uint32_t)0x00)) |
mbed_official | 235:685d5f11838f | 466 | |
mbed_official | 235:685d5f11838f | 467 | #define IS_SDIO_GET_IT(IT) (((IT) == SDIO_IT_CCRCFAIL) || \ |
mbed_official | 235:685d5f11838f | 468 | ((IT) == SDIO_IT_DCRCFAIL) || \ |
mbed_official | 235:685d5f11838f | 469 | ((IT) == SDIO_IT_CTIMEOUT) || \ |
mbed_official | 235:685d5f11838f | 470 | ((IT) == SDIO_IT_DTIMEOUT) || \ |
mbed_official | 235:685d5f11838f | 471 | ((IT) == SDIO_IT_TXUNDERR) || \ |
mbed_official | 235:685d5f11838f | 472 | ((IT) == SDIO_IT_RXOVERR) || \ |
mbed_official | 235:685d5f11838f | 473 | ((IT) == SDIO_IT_CMDREND) || \ |
mbed_official | 235:685d5f11838f | 474 | ((IT) == SDIO_IT_CMDSENT) || \ |
mbed_official | 235:685d5f11838f | 475 | ((IT) == SDIO_IT_DATAEND) || \ |
mbed_official | 235:685d5f11838f | 476 | ((IT) == SDIO_IT_STBITERR) || \ |
mbed_official | 235:685d5f11838f | 477 | ((IT) == SDIO_IT_DBCKEND) || \ |
mbed_official | 235:685d5f11838f | 478 | ((IT) == SDIO_IT_CMDACT) || \ |
mbed_official | 235:685d5f11838f | 479 | ((IT) == SDIO_IT_TXACT) || \ |
mbed_official | 235:685d5f11838f | 480 | ((IT) == SDIO_IT_RXACT) || \ |
mbed_official | 235:685d5f11838f | 481 | ((IT) == SDIO_IT_TXFIFOHE) || \ |
mbed_official | 235:685d5f11838f | 482 | ((IT) == SDIO_IT_RXFIFOHF) || \ |
mbed_official | 235:685d5f11838f | 483 | ((IT) == SDIO_IT_TXFIFOF) || \ |
mbed_official | 235:685d5f11838f | 484 | ((IT) == SDIO_IT_RXFIFOF) || \ |
mbed_official | 235:685d5f11838f | 485 | ((IT) == SDIO_IT_TXFIFOE) || \ |
mbed_official | 235:685d5f11838f | 486 | ((IT) == SDIO_IT_RXFIFOE) || \ |
mbed_official | 235:685d5f11838f | 487 | ((IT) == SDIO_IT_TXDAVL) || \ |
mbed_official | 235:685d5f11838f | 488 | ((IT) == SDIO_IT_RXDAVL) || \ |
mbed_official | 235:685d5f11838f | 489 | ((IT) == SDIO_IT_SDIOIT) || \ |
mbed_official | 235:685d5f11838f | 490 | ((IT) == SDIO_IT_CEATAEND)) |
mbed_official | 235:685d5f11838f | 491 | |
mbed_official | 235:685d5f11838f | 492 | #define IS_SDIO_CLEAR_IT(IT) ((((IT) & (uint32_t)0xFF3FF800) == 0x00) && ((IT) != (uint32_t)0x00)) |
mbed_official | 235:685d5f11838f | 493 | |
mbed_official | 235:685d5f11838f | 494 | /** |
mbed_official | 235:685d5f11838f | 495 | * @} |
mbed_official | 235:685d5f11838f | 496 | */ |
mbed_official | 235:685d5f11838f | 497 | |
mbed_official | 235:685d5f11838f | 498 | |
mbed_official | 235:685d5f11838f | 499 | /** @defgroup SDIO_Instance_definition |
mbed_official | 235:685d5f11838f | 500 | * @{ |
mbed_official | 235:685d5f11838f | 501 | */ |
mbed_official | 235:685d5f11838f | 502 | #define IS_SDIO_ALL_INSTANCE(INSTANCE) ((INSTANCE) == SDIO) |
mbed_official | 235:685d5f11838f | 503 | |
mbed_official | 235:685d5f11838f | 504 | /** |
mbed_official | 235:685d5f11838f | 505 | * @} |
mbed_official | 235:685d5f11838f | 506 | */ |
mbed_official | 235:685d5f11838f | 507 | |
mbed_official | 235:685d5f11838f | 508 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 509 | /* ------------ SDIO registers bit address in the alias region -------------- */ |
mbed_official | 235:685d5f11838f | 510 | #define SDIO_OFFSET (SDIO_BASE - PERIPH_BASE) |
mbed_official | 235:685d5f11838f | 511 | |
mbed_official | 235:685d5f11838f | 512 | /* --- CLKCR Register ---*/ |
mbed_official | 235:685d5f11838f | 513 | /* Alias word address of CLKEN bit */ |
mbed_official | 235:685d5f11838f | 514 | #define CLKCR_OFFSET (SDIO_OFFSET + 0x04) |
mbed_official | 235:685d5f11838f | 515 | #define CLKEN_BitNumber 0x08 |
mbed_official | 235:685d5f11838f | 516 | #define CLKCR_CLKEN_BB (PERIPH_BB_BASE + (CLKCR_OFFSET * 32) + (CLKEN_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 517 | |
mbed_official | 235:685d5f11838f | 518 | /* --- CMD Register ---*/ |
mbed_official | 235:685d5f11838f | 519 | /* Alias word address of SDIOSUSPEND bit */ |
mbed_official | 235:685d5f11838f | 520 | #define CMD_OFFSET (SDIO_OFFSET + 0x0C) |
mbed_official | 235:685d5f11838f | 521 | #define SDIOSUSPEND_BitNumber 0x0B |
mbed_official | 235:685d5f11838f | 522 | #define CMD_SDIOSUSPEND_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (SDIOSUSPEND_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 523 | |
mbed_official | 235:685d5f11838f | 524 | /* Alias word address of ENCMDCOMPL bit */ |
mbed_official | 235:685d5f11838f | 525 | #define ENCMDCOMPL_BitNumber 0x0C |
mbed_official | 235:685d5f11838f | 526 | #define CMD_ENCMDCOMPL_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (ENCMDCOMPL_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 527 | |
mbed_official | 235:685d5f11838f | 528 | /* Alias word address of NIEN bit */ |
mbed_official | 235:685d5f11838f | 529 | #define NIEN_BitNumber 0x0D |
mbed_official | 235:685d5f11838f | 530 | #define CMD_NIEN_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (NIEN_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 531 | |
mbed_official | 235:685d5f11838f | 532 | /* Alias word address of ATACMD bit */ |
mbed_official | 235:685d5f11838f | 533 | #define ATACMD_BitNumber 0x0E |
mbed_official | 235:685d5f11838f | 534 | #define CMD_ATACMD_BB (PERIPH_BB_BASE + (CMD_OFFSET * 32) + (ATACMD_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 535 | |
mbed_official | 235:685d5f11838f | 536 | /* --- DCTRL Register ---*/ |
mbed_official | 235:685d5f11838f | 537 | /* Alias word address of DMAEN bit */ |
mbed_official | 235:685d5f11838f | 538 | #define DCTRL_OFFSET (SDIO_OFFSET + 0x2C) |
mbed_official | 235:685d5f11838f | 539 | #define DMAEN_BitNumber 0x03 |
mbed_official | 235:685d5f11838f | 540 | #define DCTRL_DMAEN_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (DMAEN_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 541 | |
mbed_official | 235:685d5f11838f | 542 | /* Alias word address of RWSTART bit */ |
mbed_official | 235:685d5f11838f | 543 | #define RWSTART_BitNumber 0x08 |
mbed_official | 235:685d5f11838f | 544 | #define DCTRL_RWSTART_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWSTART_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 545 | |
mbed_official | 235:685d5f11838f | 546 | /* Alias word address of RWSTOP bit */ |
mbed_official | 235:685d5f11838f | 547 | #define RWSTOP_BitNumber 0x09 |
mbed_official | 235:685d5f11838f | 548 | #define DCTRL_RWSTOP_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWSTOP_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 549 | |
mbed_official | 235:685d5f11838f | 550 | /* Alias word address of RWMOD bit */ |
mbed_official | 235:685d5f11838f | 551 | #define RWMOD_BitNumber 0x0A |
mbed_official | 235:685d5f11838f | 552 | #define DCTRL_RWMOD_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (RWMOD_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 553 | |
mbed_official | 235:685d5f11838f | 554 | /* Alias word address of SDIOEN bit */ |
mbed_official | 235:685d5f11838f | 555 | #define SDIOEN_BitNumber 0x0B |
mbed_official | 235:685d5f11838f | 556 | #define DCTRL_SDIOEN_BB (PERIPH_BB_BASE + (DCTRL_OFFSET * 32) + (SDIOEN_BitNumber * 4)) |
mbed_official | 235:685d5f11838f | 557 | |
mbed_official | 235:685d5f11838f | 558 | /* ---------------------- SDIO registers bit mask --------------------------- */ |
mbed_official | 235:685d5f11838f | 559 | /* --- CLKCR Register ---*/ |
mbed_official | 235:685d5f11838f | 560 | /* CLKCR register clear mask */ |
mbed_official | 235:685d5f11838f | 561 | #define CLKCR_CLEAR_MASK ((uint32_t)(SDIO_CLKCR_CLKDIV | SDIO_CLKCR_PWRSAV |\ |
mbed_official | 235:685d5f11838f | 562 | SDIO_CLKCR_BYPASS | SDIO_CLKCR_WIDBUS |\ |
mbed_official | 235:685d5f11838f | 563 | SDIO_CLKCR_NEGEDGE | SDIO_CLKCR_HWFC_EN)) |
mbed_official | 235:685d5f11838f | 564 | |
mbed_official | 235:685d5f11838f | 565 | /* --- PWRCTRL Register ---*/ |
mbed_official | 235:685d5f11838f | 566 | /* --- DCTRL Register ---*/ |
mbed_official | 235:685d5f11838f | 567 | /* SDIO DCTRL Clear Mask */ |
mbed_official | 235:685d5f11838f | 568 | #define DCTRL_CLEAR_MASK ((uint32_t)(SDIO_DCTRL_DTEN | SDIO_DCTRL_DTDIR |\ |
mbed_official | 235:685d5f11838f | 569 | SDIO_DCTRL_DTMODE | SDIO_DCTRL_DBLOCKSIZE)) |
mbed_official | 235:685d5f11838f | 570 | |
mbed_official | 235:685d5f11838f | 571 | /* --- CMD Register ---*/ |
mbed_official | 235:685d5f11838f | 572 | /* CMD Register clear mask */ |
mbed_official | 235:685d5f11838f | 573 | #define CMD_CLEAR_MASK ((uint32_t)(SDIO_CMD_CMDINDEX | SDIO_CMD_WAITRESP |\ |
mbed_official | 235:685d5f11838f | 574 | SDIO_CMD_WAITINT | SDIO_CMD_WAITPEND |\ |
mbed_official | 235:685d5f11838f | 575 | SDIO_CMD_CPSMEN | SDIO_CMD_SDIOSUSPEND)) |
mbed_official | 235:685d5f11838f | 576 | |
mbed_official | 235:685d5f11838f | 577 | /* SDIO RESP Registers Address */ |
mbed_official | 235:685d5f11838f | 578 | #define SDIO_RESP_ADDR ((uint32_t)(SDIO_BASE + 0x14)) |
mbed_official | 235:685d5f11838f | 579 | |
mbed_official | 235:685d5f11838f | 580 | /* SDIO Intialization Frequency (400KHz max) */ |
mbed_official | 235:685d5f11838f | 581 | #define SDIO_INIT_CLK_DIV ((uint8_t)0x76) |
mbed_official | 235:685d5f11838f | 582 | |
mbed_official | 235:685d5f11838f | 583 | /* SDIO Data Transfer Frequency (25MHz max) */ |
mbed_official | 235:685d5f11838f | 584 | #define SDIO_TRANSFER_CLK_DIV ((uint8_t)0x0) |
mbed_official | 235:685d5f11838f | 585 | |
mbed_official | 235:685d5f11838f | 586 | /** @defgroup SDIO_Interrupt_Clock |
mbed_official | 235:685d5f11838f | 587 | * @brief macros to handle interrupts and specific clock configurations |
mbed_official | 235:685d5f11838f | 588 | * @{ |
mbed_official | 235:685d5f11838f | 589 | */ |
mbed_official | 235:685d5f11838f | 590 | |
mbed_official | 235:685d5f11838f | 591 | /** |
mbed_official | 235:685d5f11838f | 592 | * @brief Enable the SDIO device. |
mbed_official | 235:685d5f11838f | 593 | * @param None |
mbed_official | 235:685d5f11838f | 594 | * @retval None |
mbed_official | 235:685d5f11838f | 595 | */ |
mbed_official | 235:685d5f11838f | 596 | #define __SDIO_ENABLE() (*(__IO uint32_t *)CLKCR_CLKEN_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 597 | |
mbed_official | 235:685d5f11838f | 598 | /** |
mbed_official | 235:685d5f11838f | 599 | * @brief Disable the SDIO device. |
mbed_official | 235:685d5f11838f | 600 | * @param None |
mbed_official | 235:685d5f11838f | 601 | * @retval None |
mbed_official | 235:685d5f11838f | 602 | */ |
mbed_official | 235:685d5f11838f | 603 | #define __SDIO_DISABLE() (*(__IO uint32_t *)CLKCR_CLKEN_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 604 | |
mbed_official | 235:685d5f11838f | 605 | /** |
mbed_official | 235:685d5f11838f | 606 | * @brief Enable the SDIO DMA transfer. |
mbed_official | 235:685d5f11838f | 607 | * @param None |
mbed_official | 235:685d5f11838f | 608 | * @retval None |
mbed_official | 235:685d5f11838f | 609 | */ |
mbed_official | 235:685d5f11838f | 610 | #define __SDIO_DMA_ENABLE() (*(__IO uint32_t *)DCTRL_DMAEN_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 611 | |
mbed_official | 235:685d5f11838f | 612 | /** |
mbed_official | 235:685d5f11838f | 613 | * @brief Disable the SDIO DMA transfer. |
mbed_official | 235:685d5f11838f | 614 | * @param None |
mbed_official | 235:685d5f11838f | 615 | * @retval None |
mbed_official | 235:685d5f11838f | 616 | */ |
mbed_official | 235:685d5f11838f | 617 | #define __SDIO_DMA_DISABLE() (*(__IO uint32_t *)DCTRL_DMAEN_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 618 | |
mbed_official | 235:685d5f11838f | 619 | /** |
mbed_official | 235:685d5f11838f | 620 | * @brief Enable the SDIO device interrupt. |
mbed_official | 235:685d5f11838f | 621 | * @param __INSTANCE__ : Pointer to SDIO register base |
mbed_official | 235:685d5f11838f | 622 | * @param __INTERRUPT__ : specifies the SDIO interrupt sources to be enabled. |
mbed_official | 235:685d5f11838f | 623 | * This parameter can be one or a combination of the following values: |
mbed_official | 235:685d5f11838f | 624 | * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 625 | * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 626 | * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt |
mbed_official | 235:685d5f11838f | 627 | * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt |
mbed_official | 235:685d5f11838f | 628 | * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt |
mbed_official | 235:685d5f11838f | 629 | * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt |
mbed_official | 235:685d5f11838f | 630 | * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt |
mbed_official | 235:685d5f11838f | 631 | * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt |
mbed_official | 235:685d5f11838f | 632 | * @arg SDIO_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt |
mbed_official | 235:685d5f11838f | 633 | * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide |
mbed_official | 235:685d5f11838f | 634 | * bus mode interrupt |
mbed_official | 235:685d5f11838f | 635 | * @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt |
mbed_official | 235:685d5f11838f | 636 | * @arg SDIO_IT_CMDACT: Command transfer in progress interrupt |
mbed_official | 235:685d5f11838f | 637 | * @arg SDIO_IT_TXACT: Data transmit in progress interrupt |
mbed_official | 235:685d5f11838f | 638 | * @arg SDIO_IT_RXACT: Data receive in progress interrupt |
mbed_official | 235:685d5f11838f | 639 | * @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt |
mbed_official | 235:685d5f11838f | 640 | * @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt |
mbed_official | 235:685d5f11838f | 641 | * @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt |
mbed_official | 235:685d5f11838f | 642 | * @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt |
mbed_official | 235:685d5f11838f | 643 | * @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt |
mbed_official | 235:685d5f11838f | 644 | * @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt |
mbed_official | 235:685d5f11838f | 645 | * @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt |
mbed_official | 235:685d5f11838f | 646 | * @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt |
mbed_official | 235:685d5f11838f | 647 | * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt |
mbed_official | 235:685d5f11838f | 648 | * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61 interrupt |
mbed_official | 235:685d5f11838f | 649 | * @retval None |
mbed_official | 235:685d5f11838f | 650 | */ |
mbed_official | 235:685d5f11838f | 651 | #define __SDIO_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->MASK |= (__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 652 | |
mbed_official | 235:685d5f11838f | 653 | /** |
mbed_official | 235:685d5f11838f | 654 | * @brief Disable the SDIO device interrupt. |
mbed_official | 235:685d5f11838f | 655 | * @param __INSTANCE__ : Pointer to SDIO register base |
mbed_official | 235:685d5f11838f | 656 | * @param __INTERRUPT__ : specifies the SDIO interrupt sources to be disabled. |
mbed_official | 235:685d5f11838f | 657 | * This parameter can be one or a combination of the following values: |
mbed_official | 235:685d5f11838f | 658 | * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 659 | * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 660 | * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt |
mbed_official | 235:685d5f11838f | 661 | * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt |
mbed_official | 235:685d5f11838f | 662 | * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt |
mbed_official | 235:685d5f11838f | 663 | * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt |
mbed_official | 235:685d5f11838f | 664 | * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt |
mbed_official | 235:685d5f11838f | 665 | * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt |
mbed_official | 235:685d5f11838f | 666 | * @arg SDIO_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt |
mbed_official | 235:685d5f11838f | 667 | * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide |
mbed_official | 235:685d5f11838f | 668 | * bus mode interrupt |
mbed_official | 235:685d5f11838f | 669 | * @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt |
mbed_official | 235:685d5f11838f | 670 | * @arg SDIO_IT_CMDACT: Command transfer in progress interrupt |
mbed_official | 235:685d5f11838f | 671 | * @arg SDIO_IT_TXACT: Data transmit in progress interrupt |
mbed_official | 235:685d5f11838f | 672 | * @arg SDIO_IT_RXACT: Data receive in progress interrupt |
mbed_official | 235:685d5f11838f | 673 | * @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt |
mbed_official | 235:685d5f11838f | 674 | * @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt |
mbed_official | 235:685d5f11838f | 675 | * @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt |
mbed_official | 235:685d5f11838f | 676 | * @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt |
mbed_official | 235:685d5f11838f | 677 | * @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt |
mbed_official | 235:685d5f11838f | 678 | * @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt |
mbed_official | 235:685d5f11838f | 679 | * @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt |
mbed_official | 235:685d5f11838f | 680 | * @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt |
mbed_official | 235:685d5f11838f | 681 | * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt |
mbed_official | 235:685d5f11838f | 682 | * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61 interrupt |
mbed_official | 235:685d5f11838f | 683 | * @retval None |
mbed_official | 235:685d5f11838f | 684 | */ |
mbed_official | 235:685d5f11838f | 685 | #define __SDIO_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->MASK &= ~(__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 686 | |
mbed_official | 235:685d5f11838f | 687 | /** |
mbed_official | 235:685d5f11838f | 688 | * @brief Checks whether the specified SDIO flag is set or not. |
mbed_official | 235:685d5f11838f | 689 | * @param __INSTANCE__ : Pointer to SDIO register base |
mbed_official | 235:685d5f11838f | 690 | * @param __FLAG__: specifies the flag to check. |
mbed_official | 235:685d5f11838f | 691 | * This parameter can be one of the following values: |
mbed_official | 235:685d5f11838f | 692 | * @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed) |
mbed_official | 235:685d5f11838f | 693 | * @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed) |
mbed_official | 235:685d5f11838f | 694 | * @arg SDIO_FLAG_CTIMEOUT: Command response timeout |
mbed_official | 235:685d5f11838f | 695 | * @arg SDIO_FLAG_DTIMEOUT: Data timeout |
mbed_official | 235:685d5f11838f | 696 | * @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error |
mbed_official | 235:685d5f11838f | 697 | * @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error |
mbed_official | 235:685d5f11838f | 698 | * @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed) |
mbed_official | 235:685d5f11838f | 699 | * @arg SDIO_FLAG_CMDSENT: Command sent (no response required) |
mbed_official | 235:685d5f11838f | 700 | * @arg SDIO_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero) |
mbed_official | 235:685d5f11838f | 701 | * @arg SDIO_FLAG_STBITERR: Start bit not detected on all data signals in wide bus mode. |
mbed_official | 235:685d5f11838f | 702 | * @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed) |
mbed_official | 235:685d5f11838f | 703 | * @arg SDIO_FLAG_CMDACT: Command transfer in progress |
mbed_official | 235:685d5f11838f | 704 | * @arg SDIO_FLAG_TXACT: Data transmit in progress |
mbed_official | 235:685d5f11838f | 705 | * @arg SDIO_FLAG_RXACT: Data receive in progress |
mbed_official | 235:685d5f11838f | 706 | * @arg SDIO_FLAG_TXFIFOHE: Transmit FIFO Half Empty |
mbed_official | 235:685d5f11838f | 707 | * @arg SDIO_FLAG_RXFIFOHF: Receive FIFO Half Full |
mbed_official | 235:685d5f11838f | 708 | * @arg SDIO_FLAG_TXFIFOF: Transmit FIFO full |
mbed_official | 235:685d5f11838f | 709 | * @arg SDIO_FLAG_RXFIFOF: Receive FIFO full |
mbed_official | 235:685d5f11838f | 710 | * @arg SDIO_FLAG_TXFIFOE: Transmit FIFO empty |
mbed_official | 235:685d5f11838f | 711 | * @arg SDIO_FLAG_RXFIFOE: Receive FIFO empty |
mbed_official | 235:685d5f11838f | 712 | * @arg SDIO_FLAG_TXDAVL: Data available in transmit FIFO |
mbed_official | 235:685d5f11838f | 713 | * @arg SDIO_FLAG_RXDAVL: Data available in receive FIFO |
mbed_official | 235:685d5f11838f | 714 | * @arg SDIO_FLAG_SDIOIT: SD I/O interrupt received |
mbed_official | 235:685d5f11838f | 715 | * @arg SDIO_FLAG_CEATAEND: CE-ATA command completion signal received for CMD61 |
mbed_official | 235:685d5f11838f | 716 | * @retval The new state of SDIO_FLAG (SET or RESET). |
mbed_official | 235:685d5f11838f | 717 | */ |
mbed_official | 235:685d5f11838f | 718 | #define __SDIO_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->STA &(__FLAG__)) != RESET) |
mbed_official | 235:685d5f11838f | 719 | |
mbed_official | 235:685d5f11838f | 720 | |
mbed_official | 235:685d5f11838f | 721 | /** |
mbed_official | 235:685d5f11838f | 722 | * @brief Clears the SDIO pending flags. |
mbed_official | 235:685d5f11838f | 723 | * @param __INSTANCE__ : Pointer to SDIO register base |
mbed_official | 235:685d5f11838f | 724 | * @param __FLAG__: specifies the flag to clear. |
mbed_official | 235:685d5f11838f | 725 | * This parameter can be one or a combination of the following values: |
mbed_official | 235:685d5f11838f | 726 | * @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed) |
mbed_official | 235:685d5f11838f | 727 | * @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed) |
mbed_official | 235:685d5f11838f | 728 | * @arg SDIO_FLAG_CTIMEOUT: Command response timeout |
mbed_official | 235:685d5f11838f | 729 | * @arg SDIO_FLAG_DTIMEOUT: Data timeout |
mbed_official | 235:685d5f11838f | 730 | * @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error |
mbed_official | 235:685d5f11838f | 731 | * @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error |
mbed_official | 235:685d5f11838f | 732 | * @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed) |
mbed_official | 235:685d5f11838f | 733 | * @arg SDIO_FLAG_CMDSENT: Command sent (no response required) |
mbed_official | 235:685d5f11838f | 734 | * @arg SDIO_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero) |
mbed_official | 235:685d5f11838f | 735 | * @arg SDIO_FLAG_STBITERR: Start bit not detected on all data signals in wide bus mode |
mbed_official | 235:685d5f11838f | 736 | * @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed) |
mbed_official | 235:685d5f11838f | 737 | * @arg SDIO_FLAG_SDIOIT: SD I/O interrupt received |
mbed_official | 235:685d5f11838f | 738 | * @arg SDIO_FLAG_CEATAEND: CE-ATA command completion signal received for CMD61 |
mbed_official | 235:685d5f11838f | 739 | * @retval None |
mbed_official | 235:685d5f11838f | 740 | */ |
mbed_official | 235:685d5f11838f | 741 | #define __SDIO_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->ICR = (__FLAG__)) |
mbed_official | 235:685d5f11838f | 742 | |
mbed_official | 235:685d5f11838f | 743 | /** |
mbed_official | 235:685d5f11838f | 744 | * @brief Checks whether the specified SDIO interrupt has occurred or not. |
mbed_official | 235:685d5f11838f | 745 | * @param __INSTANCE__ : Pointer to SDIO register base |
mbed_official | 235:685d5f11838f | 746 | * @param __INTERRUPT__: specifies the SDIO interrupt source to check. |
mbed_official | 235:685d5f11838f | 747 | * This parameter can be one of the following values: |
mbed_official | 235:685d5f11838f | 748 | * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 749 | * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 750 | * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt |
mbed_official | 235:685d5f11838f | 751 | * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt |
mbed_official | 235:685d5f11838f | 752 | * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt |
mbed_official | 235:685d5f11838f | 753 | * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt |
mbed_official | 235:685d5f11838f | 754 | * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt |
mbed_official | 235:685d5f11838f | 755 | * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt |
mbed_official | 235:685d5f11838f | 756 | * @arg SDIO_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt |
mbed_official | 235:685d5f11838f | 757 | * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide |
mbed_official | 235:685d5f11838f | 758 | * bus mode interrupt |
mbed_official | 235:685d5f11838f | 759 | * @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt |
mbed_official | 235:685d5f11838f | 760 | * @arg SDIO_IT_CMDACT: Command transfer in progress interrupt |
mbed_official | 235:685d5f11838f | 761 | * @arg SDIO_IT_TXACT: Data transmit in progress interrupt |
mbed_official | 235:685d5f11838f | 762 | * @arg SDIO_IT_RXACT: Data receive in progress interrupt |
mbed_official | 235:685d5f11838f | 763 | * @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt |
mbed_official | 235:685d5f11838f | 764 | * @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt |
mbed_official | 235:685d5f11838f | 765 | * @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt |
mbed_official | 235:685d5f11838f | 766 | * @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt |
mbed_official | 235:685d5f11838f | 767 | * @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt |
mbed_official | 235:685d5f11838f | 768 | * @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt |
mbed_official | 235:685d5f11838f | 769 | * @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt |
mbed_official | 235:685d5f11838f | 770 | * @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt |
mbed_official | 235:685d5f11838f | 771 | * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt |
mbed_official | 235:685d5f11838f | 772 | * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61 interrupt |
mbed_official | 235:685d5f11838f | 773 | * @retval The new state of SDIO_IT (SET or RESET). |
mbed_official | 235:685d5f11838f | 774 | */ |
mbed_official | 235:685d5f11838f | 775 | #define __SDIO_GET_IT (__INSTANCE__, __INTERRUPT__) (((__INSTANCE__)->STA &(__INTERRUPT__)) == (__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 776 | |
mbed_official | 235:685d5f11838f | 777 | /** |
mbed_official | 235:685d5f11838f | 778 | * @brief Clears the SDIO's interrupt pending bits. |
mbed_official | 235:685d5f11838f | 779 | * @param __INSTANCE__ : Pointer to SDIO register base |
mbed_official | 235:685d5f11838f | 780 | * @param __INTERRUPT__: specifies the interrupt pending bit to clear. |
mbed_official | 235:685d5f11838f | 781 | * This parameter can be one or a combination of the following values: |
mbed_official | 235:685d5f11838f | 782 | * @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 783 | * @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt |
mbed_official | 235:685d5f11838f | 784 | * @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt |
mbed_official | 235:685d5f11838f | 785 | * @arg SDIO_IT_DTIMEOUT: Data timeout interrupt |
mbed_official | 235:685d5f11838f | 786 | * @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt |
mbed_official | 235:685d5f11838f | 787 | * @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt |
mbed_official | 235:685d5f11838f | 788 | * @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt |
mbed_official | 235:685d5f11838f | 789 | * @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt |
mbed_official | 235:685d5f11838f | 790 | * @arg SDIO_IT_DATAEND: Data end (data counter, SDIO_DCOUNT, is zero) interrupt |
mbed_official | 235:685d5f11838f | 791 | * @arg SDIO_IT_STBITERR: Start bit not detected on all data signals in wide |
mbed_official | 235:685d5f11838f | 792 | * bus mode interrupt |
mbed_official | 235:685d5f11838f | 793 | * @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt |
mbed_official | 235:685d5f11838f | 794 | * @arg SDIO_IT_CEATAEND: CE-ATA command completion signal received for CMD61 |
mbed_official | 235:685d5f11838f | 795 | * @retval None |
mbed_official | 235:685d5f11838f | 796 | */ |
mbed_official | 235:685d5f11838f | 797 | #define __SDIO_CLEAR_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->ICR = (__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 798 | |
mbed_official | 235:685d5f11838f | 799 | /** |
mbed_official | 235:685d5f11838f | 800 | * @brief Enable Start the SD I/O Read Wait operation. |
mbed_official | 235:685d5f11838f | 801 | * @param None |
mbed_official | 235:685d5f11838f | 802 | * @retval None |
mbed_official | 235:685d5f11838f | 803 | */ |
mbed_official | 235:685d5f11838f | 804 | #define __SDIO_START_READWAIT_ENABLE() (*(__IO uint32_t *) DCTRL_RWSTART_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 805 | |
mbed_official | 235:685d5f11838f | 806 | /** |
mbed_official | 235:685d5f11838f | 807 | * @brief Disable Start the SD I/O Read Wait operations. |
mbed_official | 235:685d5f11838f | 808 | * @param None |
mbed_official | 235:685d5f11838f | 809 | * @retval None |
mbed_official | 235:685d5f11838f | 810 | */ |
mbed_official | 235:685d5f11838f | 811 | #define __SDIO_START_READWAIT_DISABLE() (*(__IO uint32_t *) DCTRL_RWSTART_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 812 | |
mbed_official | 235:685d5f11838f | 813 | /** |
mbed_official | 235:685d5f11838f | 814 | * @brief Enable Start the SD I/O Read Wait operation. |
mbed_official | 235:685d5f11838f | 815 | * @param None |
mbed_official | 235:685d5f11838f | 816 | * @retval None |
mbed_official | 235:685d5f11838f | 817 | */ |
mbed_official | 235:685d5f11838f | 818 | #define __SDIO_STOP_READWAIT_ENABLE() (*(__IO uint32_t *) DCTRL_RWSTOP_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 819 | |
mbed_official | 235:685d5f11838f | 820 | /** |
mbed_official | 235:685d5f11838f | 821 | * @brief Disable Stop the SD I/O Read Wait operations. |
mbed_official | 235:685d5f11838f | 822 | * @param None |
mbed_official | 235:685d5f11838f | 823 | * @retval None |
mbed_official | 235:685d5f11838f | 824 | */ |
mbed_official | 235:685d5f11838f | 825 | #define __SDIO_STOP_READWAIT_DISABLE() (*(__IO uint32_t *) DCTRL_RWSTOP_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 826 | |
mbed_official | 235:685d5f11838f | 827 | /** |
mbed_official | 235:685d5f11838f | 828 | * @brief Enable the SD I/O Mode Operation. |
mbed_official | 235:685d5f11838f | 829 | * @param None |
mbed_official | 235:685d5f11838f | 830 | * @retval None |
mbed_official | 235:685d5f11838f | 831 | */ |
mbed_official | 235:685d5f11838f | 832 | #define __SDIO_OPERATION_ENABLE() (*(__IO uint32_t *) DCTRL_SDIOEN_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 833 | |
mbed_official | 235:685d5f11838f | 834 | /** |
mbed_official | 235:685d5f11838f | 835 | * @brief Disable the SD I/O Mode Operation. |
mbed_official | 235:685d5f11838f | 836 | * @param None |
mbed_official | 235:685d5f11838f | 837 | * @retval None |
mbed_official | 235:685d5f11838f | 838 | */ |
mbed_official | 235:685d5f11838f | 839 | #define __SDIO_OPERATION_DISABLE() (*(__IO uint32_t *) DCTRL_SDIOEN_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 840 | |
mbed_official | 235:685d5f11838f | 841 | /** |
mbed_official | 235:685d5f11838f | 842 | * @brief Enable the SD I/O Suspend command sending. |
mbed_official | 235:685d5f11838f | 843 | * @param None |
mbed_official | 235:685d5f11838f | 844 | * @retval None |
mbed_official | 235:685d5f11838f | 845 | */ |
mbed_official | 235:685d5f11838f | 846 | #define __SDIO_SUSPEND_CMD_ENABLE() (*(__IO uint32_t *) CMD_SDIOSUSPEND_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 847 | |
mbed_official | 235:685d5f11838f | 848 | /** |
mbed_official | 235:685d5f11838f | 849 | * @brief Disable the SD I/O Suspend command sending. |
mbed_official | 235:685d5f11838f | 850 | * @param None |
mbed_official | 235:685d5f11838f | 851 | * @retval None |
mbed_official | 235:685d5f11838f | 852 | */ |
mbed_official | 235:685d5f11838f | 853 | #define __SDIO_SUSPEND_CMD_DISABLE() (*(__IO uint32_t *) CMD_SDIOSUSPEND_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 854 | |
mbed_official | 235:685d5f11838f | 855 | /** |
mbed_official | 235:685d5f11838f | 856 | * @brief Enable the command completion signal. |
mbed_official | 235:685d5f11838f | 857 | * @param None |
mbed_official | 235:685d5f11838f | 858 | * @retval None |
mbed_official | 235:685d5f11838f | 859 | */ |
mbed_official | 235:685d5f11838f | 860 | #define __SDIO_CEATA_CMD_COMPLETION_ENABLE() (*(__IO uint32_t *) CMD_ENCMDCOMPL_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 861 | |
mbed_official | 235:685d5f11838f | 862 | /** |
mbed_official | 235:685d5f11838f | 863 | * @brief Disable the command completion signal. |
mbed_official | 235:685d5f11838f | 864 | * @param None |
mbed_official | 235:685d5f11838f | 865 | * @retval None |
mbed_official | 235:685d5f11838f | 866 | */ |
mbed_official | 235:685d5f11838f | 867 | #define __SDIO_CEATA_CMD_COMPLETION_DISABLE() (*(__IO uint32_t *) CMD_ENCMDCOMPL_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 868 | |
mbed_official | 235:685d5f11838f | 869 | /** |
mbed_official | 235:685d5f11838f | 870 | * @brief Enable the CE-ATA interrupt. |
mbed_official | 235:685d5f11838f | 871 | * @param None |
mbed_official | 235:685d5f11838f | 872 | * @retval None |
mbed_official | 235:685d5f11838f | 873 | */ |
mbed_official | 235:685d5f11838f | 874 | #define __SDIO_CEATA_ENABLE_IT() (*(__IO uint32_t *) CMD_NIEN_BB = (uint32_t)0) |
mbed_official | 235:685d5f11838f | 875 | |
mbed_official | 235:685d5f11838f | 876 | /** |
mbed_official | 235:685d5f11838f | 877 | * @brief Disable the CE-ATA interrupt. |
mbed_official | 235:685d5f11838f | 878 | * @param None |
mbed_official | 235:685d5f11838f | 879 | * @retval None |
mbed_official | 235:685d5f11838f | 880 | */ |
mbed_official | 235:685d5f11838f | 881 | #define __SDIO_CEATA_DISABLE_IT() (*(__IO uint32_t *) CMD_NIEN_BB = (uint32_t)1) |
mbed_official | 235:685d5f11838f | 882 | |
mbed_official | 235:685d5f11838f | 883 | /** |
mbed_official | 235:685d5f11838f | 884 | * @brief Enable send CE-ATA command (CMD61). |
mbed_official | 235:685d5f11838f | 885 | * @param None |
mbed_official | 235:685d5f11838f | 886 | * @retval None |
mbed_official | 235:685d5f11838f | 887 | */ |
mbed_official | 235:685d5f11838f | 888 | #define __SDIO_CEATA_SENDCMD_ENABLE() (*(__IO uint32_t *) CMD_ATACMD_BB = ENABLE) |
mbed_official | 235:685d5f11838f | 889 | |
mbed_official | 235:685d5f11838f | 890 | /** |
mbed_official | 235:685d5f11838f | 891 | * @brief Disable send CE-ATA command (CMD61). |
mbed_official | 235:685d5f11838f | 892 | * @param None |
mbed_official | 235:685d5f11838f | 893 | * @retval None |
mbed_official | 235:685d5f11838f | 894 | */ |
mbed_official | 235:685d5f11838f | 895 | #define __SDIO_CEATA_SENDCMD_DISABLE() (*(__IO uint32_t *) CMD_ATACMD_BB = DISABLE) |
mbed_official | 235:685d5f11838f | 896 | |
mbed_official | 235:685d5f11838f | 897 | /** |
mbed_official | 235:685d5f11838f | 898 | * @} |
mbed_official | 235:685d5f11838f | 899 | */ |
mbed_official | 235:685d5f11838f | 900 | |
mbed_official | 235:685d5f11838f | 901 | /** |
mbed_official | 235:685d5f11838f | 902 | * @} |
mbed_official | 235:685d5f11838f | 903 | */ |
mbed_official | 235:685d5f11838f | 904 | |
mbed_official | 235:685d5f11838f | 905 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 906 | /** @addtogroup SDIO_Exported_Functions |
mbed_official | 235:685d5f11838f | 907 | * @{ |
mbed_official | 235:685d5f11838f | 908 | */ |
mbed_official | 235:685d5f11838f | 909 | |
mbed_official | 235:685d5f11838f | 910 | /* Initialization/de-initialization functions **********************************/ |
mbed_official | 235:685d5f11838f | 911 | /** @addtogroup HAL_SDIO_Group1 |
mbed_official | 235:685d5f11838f | 912 | * @{ |
mbed_official | 235:685d5f11838f | 913 | */ |
mbed_official | 235:685d5f11838f | 914 | HAL_StatusTypeDef SDIO_Init(SDIO_TypeDef *SDIOx, SDIO_InitTypeDef Init); |
mbed_official | 235:685d5f11838f | 915 | /** |
mbed_official | 235:685d5f11838f | 916 | * @} |
mbed_official | 235:685d5f11838f | 917 | */ |
mbed_official | 235:685d5f11838f | 918 | |
mbed_official | 235:685d5f11838f | 919 | /* I/O operation functions *****************************************************/ |
mbed_official | 235:685d5f11838f | 920 | /** @addtogroup HAL_SDIO_Group2 |
mbed_official | 235:685d5f11838f | 921 | * @{ |
mbed_official | 235:685d5f11838f | 922 | */ |
mbed_official | 235:685d5f11838f | 923 | /* Blocking mode: Polling */ |
mbed_official | 235:685d5f11838f | 924 | uint32_t SDIO_ReadFIFO(SDIO_TypeDef *SDIOx); |
mbed_official | 235:685d5f11838f | 925 | HAL_StatusTypeDef SDIO_WriteFIFO(SDIO_TypeDef *SDIOx, uint32_t *pWriteData); |
mbed_official | 235:685d5f11838f | 926 | /** |
mbed_official | 235:685d5f11838f | 927 | * @} |
mbed_official | 235:685d5f11838f | 928 | */ |
mbed_official | 235:685d5f11838f | 929 | |
mbed_official | 235:685d5f11838f | 930 | /* Peripheral Control functions ************************************************/ |
mbed_official | 235:685d5f11838f | 931 | /** @addtogroup HAL_SDIO_Group3 |
mbed_official | 235:685d5f11838f | 932 | * @{ |
mbed_official | 235:685d5f11838f | 933 | */ |
mbed_official | 235:685d5f11838f | 934 | HAL_StatusTypeDef SDIO_PowerState_ON(SDIO_TypeDef *SDIOx); |
mbed_official | 235:685d5f11838f | 935 | HAL_StatusTypeDef SDIO_PowerState_OFF(SDIO_TypeDef *SDIOx); |
mbed_official | 235:685d5f11838f | 936 | uint32_t SDIO_GetPowerState(SDIO_TypeDef *SDIOx); |
mbed_official | 235:685d5f11838f | 937 | |
mbed_official | 235:685d5f11838f | 938 | /* Command path state machine (CPSM) management functions */ |
mbed_official | 235:685d5f11838f | 939 | HAL_StatusTypeDef SDIO_SendCommand(SDIO_TypeDef *SDIOx, SDIO_CmdInitTypeDef *SDIO_CmdInitStruct); |
mbed_official | 235:685d5f11838f | 940 | uint8_t SDIO_GetCommandResponse(SDIO_TypeDef *SDIOx); |
mbed_official | 235:685d5f11838f | 941 | uint32_t SDIO_GetResponse(uint32_t SDIO_RESP); |
mbed_official | 235:685d5f11838f | 942 | |
mbed_official | 235:685d5f11838f | 943 | /* Data path state machine (DPSM) management functions */ |
mbed_official | 235:685d5f11838f | 944 | HAL_StatusTypeDef SDIO_DataConfig(SDIO_TypeDef *SDIOx, SDIO_DataInitTypeDef* SDIO_DataInitStruct); |
mbed_official | 235:685d5f11838f | 945 | uint32_t SDIO_GetDataCounter(SDIO_TypeDef *SDIOx); |
mbed_official | 235:685d5f11838f | 946 | uint32_t SDIO_GetFIFOCount(SDIO_TypeDef *SDIOx); |
mbed_official | 235:685d5f11838f | 947 | |
mbed_official | 235:685d5f11838f | 948 | /* SDIO IO Cards mode management functions */ |
mbed_official | 235:685d5f11838f | 949 | HAL_StatusTypeDef SDIO_SetSDIOReadWaitMode(uint32_t SDIO_ReadWaitMode); |
mbed_official | 235:685d5f11838f | 950 | |
mbed_official | 235:685d5f11838f | 951 | /** |
mbed_official | 235:685d5f11838f | 952 | * @} |
mbed_official | 235:685d5f11838f | 953 | */ |
mbed_official | 235:685d5f11838f | 954 | |
mbed_official | 235:685d5f11838f | 955 | /** |
mbed_official | 235:685d5f11838f | 956 | * @} |
mbed_official | 235:685d5f11838f | 957 | */ |
mbed_official | 235:685d5f11838f | 958 | |
mbed_official | 235:685d5f11838f | 959 | /** |
mbed_official | 235:685d5f11838f | 960 | * @} |
mbed_official | 235:685d5f11838f | 961 | */ |
mbed_official | 235:685d5f11838f | 962 | |
mbed_official | 235:685d5f11838f | 963 | /** |
mbed_official | 235:685d5f11838f | 964 | * @} |
mbed_official | 235:685d5f11838f | 965 | */ |
mbed_official | 235:685d5f11838f | 966 | |
mbed_official | 235:685d5f11838f | 967 | #ifdef __cplusplus |
mbed_official | 235:685d5f11838f | 968 | } |
mbed_official | 235:685d5f11838f | 969 | #endif |
mbed_official | 235:685d5f11838f | 970 | |
mbed_official | 235:685d5f11838f | 971 | #endif /* __STM32F4xx_LL_SDMMC_H */ |
mbed_official | 235:685d5f11838f | 972 | |
mbed_official | 235:685d5f11838f | 973 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |