mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Fri Aug 14 13:15:17 2015 +0100
Revision:
610:813dcc80987e
Parent:
573:ad23fe03a082
Synchronized with git revision 6d84db41c6833e0b9b024741eb0616a5f62d5599

Full URL: https://github.com/mbedmicro/mbed/commit/6d84db41c6833e0b9b024741eb0616a5f62d5599/

DISCO_F746NG - Improvements

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 573:ad23fe03a082 1 /**
mbed_official 573:ad23fe03a082 2 ******************************************************************************
mbed_official 573:ad23fe03a082 3 * @file stm32f7xx_hal_sd.h
mbed_official 573:ad23fe03a082 4 * @author MCD Application Team
mbed_official 610:813dcc80987e 5 * @version V1.0.1
mbed_official 610:813dcc80987e 6 * @date 25-June-2015
mbed_official 573:ad23fe03a082 7 * @brief Header file of SD HAL module.
mbed_official 573:ad23fe03a082 8 ******************************************************************************
mbed_official 573:ad23fe03a082 9 * @attention
mbed_official 573:ad23fe03a082 10 *
mbed_official 573:ad23fe03a082 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 573:ad23fe03a082 12 *
mbed_official 573:ad23fe03a082 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 573:ad23fe03a082 14 * are permitted provided that the following conditions are met:
mbed_official 573:ad23fe03a082 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 573:ad23fe03a082 16 * this list of conditions and the following disclaimer.
mbed_official 573:ad23fe03a082 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 573:ad23fe03a082 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 573:ad23fe03a082 19 * and/or other materials provided with the distribution.
mbed_official 573:ad23fe03a082 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 573:ad23fe03a082 21 * may be used to endorse or promote products derived from this software
mbed_official 573:ad23fe03a082 22 * without specific prior written permission.
mbed_official 573:ad23fe03a082 23 *
mbed_official 573:ad23fe03a082 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 573:ad23fe03a082 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 573:ad23fe03a082 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 573:ad23fe03a082 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 573:ad23fe03a082 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 573:ad23fe03a082 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 573:ad23fe03a082 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 573:ad23fe03a082 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 573:ad23fe03a082 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 573:ad23fe03a082 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 573:ad23fe03a082 34 *
mbed_official 573:ad23fe03a082 35 ******************************************************************************
mbed_official 573:ad23fe03a082 36 */
mbed_official 573:ad23fe03a082 37
mbed_official 573:ad23fe03a082 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 573:ad23fe03a082 39 #ifndef __STM32F7xx_HAL_SD_H
mbed_official 573:ad23fe03a082 40 #define __STM32F7xx_HAL_SD_H
mbed_official 573:ad23fe03a082 41
mbed_official 573:ad23fe03a082 42 #ifdef __cplusplus
mbed_official 573:ad23fe03a082 43 extern "C" {
mbed_official 573:ad23fe03a082 44 #endif
mbed_official 573:ad23fe03a082 45
mbed_official 573:ad23fe03a082 46 /* Includes ------------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 47 #include "stm32f7xx_ll_sdmmc.h"
mbed_official 573:ad23fe03a082 48
mbed_official 573:ad23fe03a082 49 /** @addtogroup STM32F7xx_HAL_Driver
mbed_official 573:ad23fe03a082 50 * @{
mbed_official 573:ad23fe03a082 51 */
mbed_official 573:ad23fe03a082 52
mbed_official 573:ad23fe03a082 53 /** @defgroup SD SD
mbed_official 573:ad23fe03a082 54 * @brief SD HAL module driver
mbed_official 573:ad23fe03a082 55 * @{
mbed_official 573:ad23fe03a082 56 */
mbed_official 573:ad23fe03a082 57
mbed_official 573:ad23fe03a082 58 /* Exported types ------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 59 /** @defgroup SD_Exported_Types SD Exported Types
mbed_official 573:ad23fe03a082 60 * @{
mbed_official 573:ad23fe03a082 61 */
mbed_official 573:ad23fe03a082 62
mbed_official 573:ad23fe03a082 63 /** @defgroup SD_Exported_Types_Group1 SD Handle Structure definition
mbed_official 573:ad23fe03a082 64 * @{
mbed_official 573:ad23fe03a082 65 */
mbed_official 573:ad23fe03a082 66 #define SD_InitTypeDef SDMMC_InitTypeDef
mbed_official 573:ad23fe03a082 67 #define SD_TypeDef SDMMC_TypeDef
mbed_official 573:ad23fe03a082 68
mbed_official 573:ad23fe03a082 69 typedef struct
mbed_official 573:ad23fe03a082 70 {
mbed_official 573:ad23fe03a082 71 SD_TypeDef *Instance; /*!< SDMMC register base address */
mbed_official 573:ad23fe03a082 72
mbed_official 573:ad23fe03a082 73 SD_InitTypeDef Init; /*!< SD required parameters */
mbed_official 573:ad23fe03a082 74
mbed_official 573:ad23fe03a082 75 HAL_LockTypeDef Lock; /*!< SD locking object */
mbed_official 573:ad23fe03a082 76
mbed_official 573:ad23fe03a082 77 uint32_t CardType; /*!< SD card type */
mbed_official 573:ad23fe03a082 78
mbed_official 573:ad23fe03a082 79 uint32_t RCA; /*!< SD relative card address */
mbed_official 573:ad23fe03a082 80
mbed_official 573:ad23fe03a082 81 uint32_t CSD[4]; /*!< SD card specific data table */
mbed_official 573:ad23fe03a082 82
mbed_official 573:ad23fe03a082 83 uint32_t CID[4]; /*!< SD card identification number table */
mbed_official 573:ad23fe03a082 84
mbed_official 573:ad23fe03a082 85 __IO uint32_t SdTransferCplt; /*!< SD transfer complete flag in non blocking mode */
mbed_official 573:ad23fe03a082 86
mbed_official 573:ad23fe03a082 87 __IO uint32_t SdTransferErr; /*!< SD transfer error flag in non blocking mode */
mbed_official 573:ad23fe03a082 88
mbed_official 573:ad23fe03a082 89 __IO uint32_t DmaTransferCplt; /*!< SD DMA transfer complete flag */
mbed_official 573:ad23fe03a082 90
mbed_official 573:ad23fe03a082 91 __IO uint32_t SdOperation; /*!< SD transfer operation (read/write) */
mbed_official 573:ad23fe03a082 92
mbed_official 573:ad23fe03a082 93 DMA_HandleTypeDef *hdmarx; /*!< SD Rx DMA handle parameters */
mbed_official 573:ad23fe03a082 94
mbed_official 573:ad23fe03a082 95 DMA_HandleTypeDef *hdmatx; /*!< SD Tx DMA handle parameters */
mbed_official 573:ad23fe03a082 96
mbed_official 573:ad23fe03a082 97 }SD_HandleTypeDef;
mbed_official 573:ad23fe03a082 98 /**
mbed_official 573:ad23fe03a082 99 * @}
mbed_official 573:ad23fe03a082 100 */
mbed_official 573:ad23fe03a082 101
mbed_official 573:ad23fe03a082 102 /** @defgroup SD_Exported_Types_Group2 Card Specific Data: CSD Register
mbed_official 573:ad23fe03a082 103 * @{
mbed_official 573:ad23fe03a082 104 */
mbed_official 573:ad23fe03a082 105 typedef struct
mbed_official 573:ad23fe03a082 106 {
mbed_official 573:ad23fe03a082 107 __IO uint8_t CSDStruct; /*!< CSD structure */
mbed_official 573:ad23fe03a082 108 __IO uint8_t SysSpecVersion; /*!< System specification version */
mbed_official 573:ad23fe03a082 109 __IO uint8_t Reserved1; /*!< Reserved */
mbed_official 573:ad23fe03a082 110 __IO uint8_t TAAC; /*!< Data read access time 1 */
mbed_official 573:ad23fe03a082 111 __IO uint8_t NSAC; /*!< Data read access time 2 in CLK cycles */
mbed_official 573:ad23fe03a082 112 __IO uint8_t MaxBusClkFrec; /*!< Max. bus clock frequency */
mbed_official 573:ad23fe03a082 113 __IO uint16_t CardComdClasses; /*!< Card command classes */
mbed_official 573:ad23fe03a082 114 __IO uint8_t RdBlockLen; /*!< Max. read data block length */
mbed_official 573:ad23fe03a082 115 __IO uint8_t PartBlockRead; /*!< Partial blocks for read allowed */
mbed_official 573:ad23fe03a082 116 __IO uint8_t WrBlockMisalign; /*!< Write block misalignment */
mbed_official 573:ad23fe03a082 117 __IO uint8_t RdBlockMisalign; /*!< Read block misalignment */
mbed_official 573:ad23fe03a082 118 __IO uint8_t DSRImpl; /*!< DSR implemented */
mbed_official 573:ad23fe03a082 119 __IO uint8_t Reserved2; /*!< Reserved */
mbed_official 573:ad23fe03a082 120 __IO uint32_t DeviceSize; /*!< Device Size */
mbed_official 573:ad23fe03a082 121 __IO uint8_t MaxRdCurrentVDDMin; /*!< Max. read current @ VDD min */
mbed_official 573:ad23fe03a082 122 __IO uint8_t MaxRdCurrentVDDMax; /*!< Max. read current @ VDD max */
mbed_official 573:ad23fe03a082 123 __IO uint8_t MaxWrCurrentVDDMin; /*!< Max. write current @ VDD min */
mbed_official 573:ad23fe03a082 124 __IO uint8_t MaxWrCurrentVDDMax; /*!< Max. write current @ VDD max */
mbed_official 573:ad23fe03a082 125 __IO uint8_t DeviceSizeMul; /*!< Device size multiplier */
mbed_official 573:ad23fe03a082 126 __IO uint8_t EraseGrSize; /*!< Erase group size */
mbed_official 573:ad23fe03a082 127 __IO uint8_t EraseGrMul; /*!< Erase group size multiplier */
mbed_official 573:ad23fe03a082 128 __IO uint8_t WrProtectGrSize; /*!< Write protect group size */
mbed_official 573:ad23fe03a082 129 __IO uint8_t WrProtectGrEnable; /*!< Write protect group enable */
mbed_official 573:ad23fe03a082 130 __IO uint8_t ManDeflECC; /*!< Manufacturer default ECC */
mbed_official 573:ad23fe03a082 131 __IO uint8_t WrSpeedFact; /*!< Write speed factor */
mbed_official 573:ad23fe03a082 132 __IO uint8_t MaxWrBlockLen; /*!< Max. write data block length */
mbed_official 573:ad23fe03a082 133 __IO uint8_t WriteBlockPaPartial; /*!< Partial blocks for write allowed */
mbed_official 573:ad23fe03a082 134 __IO uint8_t Reserved3; /*!< Reserved */
mbed_official 573:ad23fe03a082 135 __IO uint8_t ContentProtectAppli; /*!< Content protection application */
mbed_official 573:ad23fe03a082 136 __IO uint8_t FileFormatGrouop; /*!< File format group */
mbed_official 573:ad23fe03a082 137 __IO uint8_t CopyFlag; /*!< Copy flag (OTP) */
mbed_official 573:ad23fe03a082 138 __IO uint8_t PermWrProtect; /*!< Permanent write protection */
mbed_official 573:ad23fe03a082 139 __IO uint8_t TempWrProtect; /*!< Temporary write protection */
mbed_official 573:ad23fe03a082 140 __IO uint8_t FileFormat; /*!< File format */
mbed_official 573:ad23fe03a082 141 __IO uint8_t ECC; /*!< ECC code */
mbed_official 573:ad23fe03a082 142 __IO uint8_t CSD_CRC; /*!< CSD CRC */
mbed_official 573:ad23fe03a082 143 __IO uint8_t Reserved4; /*!< Always 1 */
mbed_official 573:ad23fe03a082 144
mbed_official 573:ad23fe03a082 145 }HAL_SD_CSDTypedef;
mbed_official 573:ad23fe03a082 146 /**
mbed_official 573:ad23fe03a082 147 * @}
mbed_official 573:ad23fe03a082 148 */
mbed_official 573:ad23fe03a082 149
mbed_official 573:ad23fe03a082 150 /** @defgroup SD_Exported_Types_Group3 Card Identification Data: CID Register
mbed_official 573:ad23fe03a082 151 * @{
mbed_official 573:ad23fe03a082 152 */
mbed_official 573:ad23fe03a082 153 typedef struct
mbed_official 573:ad23fe03a082 154 {
mbed_official 573:ad23fe03a082 155 __IO uint8_t ManufacturerID; /*!< Manufacturer ID */
mbed_official 573:ad23fe03a082 156 __IO uint16_t OEM_AppliID; /*!< OEM/Application ID */
mbed_official 573:ad23fe03a082 157 __IO uint32_t ProdName1; /*!< Product Name part1 */
mbed_official 573:ad23fe03a082 158 __IO uint8_t ProdName2; /*!< Product Name part2 */
mbed_official 573:ad23fe03a082 159 __IO uint8_t ProdRev; /*!< Product Revision */
mbed_official 573:ad23fe03a082 160 __IO uint32_t ProdSN; /*!< Product Serial Number */
mbed_official 573:ad23fe03a082 161 __IO uint8_t Reserved1; /*!< Reserved1 */
mbed_official 573:ad23fe03a082 162 __IO uint16_t ManufactDate; /*!< Manufacturing Date */
mbed_official 573:ad23fe03a082 163 __IO uint8_t CID_CRC; /*!< CID CRC */
mbed_official 573:ad23fe03a082 164 __IO uint8_t Reserved2; /*!< Always 1 */
mbed_official 573:ad23fe03a082 165
mbed_official 573:ad23fe03a082 166 }HAL_SD_CIDTypedef;
mbed_official 573:ad23fe03a082 167 /**
mbed_official 573:ad23fe03a082 168 * @}
mbed_official 573:ad23fe03a082 169 */
mbed_official 573:ad23fe03a082 170
mbed_official 573:ad23fe03a082 171 /** @defgroup SD_Exported_Types_Group4 SD Card Status returned by ACMD13
mbed_official 573:ad23fe03a082 172 * @{
mbed_official 573:ad23fe03a082 173 */
mbed_official 573:ad23fe03a082 174 typedef struct
mbed_official 573:ad23fe03a082 175 {
mbed_official 573:ad23fe03a082 176 __IO uint8_t DAT_BUS_WIDTH; /*!< Shows the currently defined data bus width */
mbed_official 573:ad23fe03a082 177 __IO uint8_t SECURED_MODE; /*!< Card is in secured mode of operation */
mbed_official 573:ad23fe03a082 178 __IO uint16_t SD_CARD_TYPE; /*!< Carries information about card type */
mbed_official 573:ad23fe03a082 179 __IO uint32_t SIZE_OF_PROTECTED_AREA; /*!< Carries information about the capacity of protected area */
mbed_official 573:ad23fe03a082 180 __IO uint8_t SPEED_CLASS; /*!< Carries information about the speed class of the card */
mbed_official 573:ad23fe03a082 181 __IO uint8_t PERFORMANCE_MOVE; /*!< Carries information about the card's performance move */
mbed_official 573:ad23fe03a082 182 __IO uint8_t AU_SIZE; /*!< Carries information about the card's allocation unit size */
mbed_official 573:ad23fe03a082 183 __IO uint16_t ERASE_SIZE; /*!< Determines the number of AUs to be erased in one operation */
mbed_official 573:ad23fe03a082 184 __IO uint8_t ERASE_TIMEOUT; /*!< Determines the timeout for any number of AU erase */
mbed_official 573:ad23fe03a082 185 __IO uint8_t ERASE_OFFSET; /*!< Carries information about the erase offset */
mbed_official 573:ad23fe03a082 186
mbed_official 573:ad23fe03a082 187 }HAL_SD_CardStatusTypedef;
mbed_official 573:ad23fe03a082 188 /**
mbed_official 573:ad23fe03a082 189 * @}
mbed_official 573:ad23fe03a082 190 */
mbed_official 573:ad23fe03a082 191
mbed_official 573:ad23fe03a082 192 /** @defgroup SD_Exported_Types_Group5 SD Card information structure
mbed_official 573:ad23fe03a082 193 * @{
mbed_official 573:ad23fe03a082 194 */
mbed_official 573:ad23fe03a082 195 typedef struct
mbed_official 573:ad23fe03a082 196 {
mbed_official 573:ad23fe03a082 197 HAL_SD_CSDTypedef SD_csd; /*!< SD card specific data register */
mbed_official 573:ad23fe03a082 198 HAL_SD_CIDTypedef SD_cid; /*!< SD card identification number register */
mbed_official 573:ad23fe03a082 199 uint64_t CardCapacity; /*!< Card capacity */
mbed_official 573:ad23fe03a082 200 uint32_t CardBlockSize; /*!< Card block size */
mbed_official 573:ad23fe03a082 201 uint16_t RCA; /*!< SD relative card address */
mbed_official 573:ad23fe03a082 202 uint8_t CardType; /*!< SD card type */
mbed_official 573:ad23fe03a082 203
mbed_official 573:ad23fe03a082 204 }HAL_SD_CardInfoTypedef;
mbed_official 573:ad23fe03a082 205 /**
mbed_official 573:ad23fe03a082 206 * @}
mbed_official 573:ad23fe03a082 207 */
mbed_official 573:ad23fe03a082 208
mbed_official 573:ad23fe03a082 209 /** @defgroup SD_Exported_Types_Group6 SD Error status enumeration Structure definition
mbed_official 573:ad23fe03a082 210 * @{
mbed_official 573:ad23fe03a082 211 */
mbed_official 573:ad23fe03a082 212 typedef enum
mbed_official 573:ad23fe03a082 213 {
mbed_official 573:ad23fe03a082 214 /**
mbed_official 573:ad23fe03a082 215 * @brief SD specific error defines
mbed_official 573:ad23fe03a082 216 */
mbed_official 573:ad23fe03a082 217 SD_CMD_CRC_FAIL = (1), /*!< Command response received (but CRC check failed) */
mbed_official 573:ad23fe03a082 218 SD_DATA_CRC_FAIL = (2), /*!< Data block sent/received (CRC check failed) */
mbed_official 573:ad23fe03a082 219 SD_CMD_RSP_TIMEOUT = (3), /*!< Command response timeout */
mbed_official 573:ad23fe03a082 220 SD_DATA_TIMEOUT = (4), /*!< Data timeout */
mbed_official 573:ad23fe03a082 221 SD_TX_UNDERRUN = (5), /*!< Transmit FIFO underrun */
mbed_official 573:ad23fe03a082 222 SD_RX_OVERRUN = (6), /*!< Receive FIFO overrun */
mbed_official 573:ad23fe03a082 223 SD_START_BIT_ERR = (7), /*!< Start bit not detected on all data signals in wide bus mode */
mbed_official 573:ad23fe03a082 224 SD_CMD_OUT_OF_RANGE = (8), /*!< Command's argument was out of range. */
mbed_official 573:ad23fe03a082 225 SD_ADDR_MISALIGNED = (9), /*!< Misaligned address */
mbed_official 573:ad23fe03a082 226 SD_BLOCK_LEN_ERR = (10), /*!< Transferred block length is not allowed for the card or the number of transferred bytes does not match the block length */
mbed_official 573:ad23fe03a082 227 SD_ERASE_SEQ_ERR = (11), /*!< An error in the sequence of erase command occurs. */
mbed_official 573:ad23fe03a082 228 SD_BAD_ERASE_PARAM = (12), /*!< An invalid selection for erase groups */
mbed_official 573:ad23fe03a082 229 SD_WRITE_PROT_VIOLATION = (13), /*!< Attempt to program a write protect block */
mbed_official 573:ad23fe03a082 230 SD_LOCK_UNLOCK_FAILED = (14), /*!< Sequence or password error has been detected in unlock command or if there was an attempt to access a locked card */
mbed_official 573:ad23fe03a082 231 SD_COM_CRC_FAILED = (15), /*!< CRC check of the previous command failed */
mbed_official 573:ad23fe03a082 232 SD_ILLEGAL_CMD = (16), /*!< Command is not legal for the card state */
mbed_official 573:ad23fe03a082 233 SD_CARD_ECC_FAILED = (17), /*!< Card internal ECC was applied but failed to correct the data */
mbed_official 573:ad23fe03a082 234 SD_CC_ERROR = (18), /*!< Internal card controller error */
mbed_official 573:ad23fe03a082 235 SD_GENERAL_UNKNOWN_ERROR = (19), /*!< General or unknown error */
mbed_official 573:ad23fe03a082 236 SD_STREAM_READ_UNDERRUN = (20), /*!< The card could not sustain data transfer in stream read operation. */
mbed_official 573:ad23fe03a082 237 SD_STREAM_WRITE_OVERRUN = (21), /*!< The card could not sustain data programming in stream mode */
mbed_official 573:ad23fe03a082 238 SD_CID_CSD_OVERWRITE = (22), /*!< CID/CSD overwrite error */
mbed_official 573:ad23fe03a082 239 SD_WP_ERASE_SKIP = (23), /*!< Only partial address space was erased */
mbed_official 573:ad23fe03a082 240 SD_CARD_ECC_DISABLED = (24), /*!< Command has been executed without using internal ECC */
mbed_official 573:ad23fe03a082 241 SD_ERASE_RESET = (25), /*!< Erase sequence was cleared before executing because an out of erase sequence command was received */
mbed_official 573:ad23fe03a082 242 SD_AKE_SEQ_ERROR = (26), /*!< Error in sequence of authentication. */
mbed_official 573:ad23fe03a082 243 SD_INVALID_VOLTRANGE = (27),
mbed_official 573:ad23fe03a082 244 SD_ADDR_OUT_OF_RANGE = (28),
mbed_official 573:ad23fe03a082 245 SD_SWITCH_ERROR = (29),
mbed_official 573:ad23fe03a082 246 SD_SDMMC_DISABLED = (30),
mbed_official 573:ad23fe03a082 247 SD_SDMMC_FUNCTION_BUSY = (31),
mbed_official 573:ad23fe03a082 248 SD_SDMMC_FUNCTION_FAILED = (32),
mbed_official 573:ad23fe03a082 249 SD_SDMMC_UNKNOWN_FUNCTION = (33),
mbed_official 573:ad23fe03a082 250
mbed_official 573:ad23fe03a082 251 /**
mbed_official 573:ad23fe03a082 252 * @brief Standard error defines
mbed_official 573:ad23fe03a082 253 */
mbed_official 573:ad23fe03a082 254 SD_INTERNAL_ERROR = (34),
mbed_official 573:ad23fe03a082 255 SD_NOT_CONFIGURED = (35),
mbed_official 573:ad23fe03a082 256 SD_REQUEST_PENDING = (36),
mbed_official 573:ad23fe03a082 257 SD_REQUEST_NOT_APPLICABLE = (37),
mbed_official 573:ad23fe03a082 258 SD_INVALID_PARAMETER = (38),
mbed_official 573:ad23fe03a082 259 SD_UNSUPPORTED_FEATURE = (39),
mbed_official 573:ad23fe03a082 260 SD_UNSUPPORTED_HW = (40),
mbed_official 573:ad23fe03a082 261 SD_ERROR = (41),
mbed_official 573:ad23fe03a082 262 SD_OK = (0)
mbed_official 573:ad23fe03a082 263
mbed_official 573:ad23fe03a082 264 }HAL_SD_ErrorTypedef;
mbed_official 573:ad23fe03a082 265 /**
mbed_official 573:ad23fe03a082 266 * @}
mbed_official 573:ad23fe03a082 267 */
mbed_official 573:ad23fe03a082 268
mbed_official 573:ad23fe03a082 269 /** @defgroup SD_Exported_Types_Group7 SD Transfer state enumeration structure
mbed_official 573:ad23fe03a082 270 * @{
mbed_official 573:ad23fe03a082 271 */
mbed_official 573:ad23fe03a082 272 typedef enum
mbed_official 573:ad23fe03a082 273 {
mbed_official 573:ad23fe03a082 274 SD_TRANSFER_OK = 0, /*!< Transfer success */
mbed_official 573:ad23fe03a082 275 SD_TRANSFER_BUSY = 1, /*!< Transfer is occurring */
mbed_official 573:ad23fe03a082 276 SD_TRANSFER_ERROR = 2 /*!< Transfer failed */
mbed_official 573:ad23fe03a082 277
mbed_official 573:ad23fe03a082 278 }HAL_SD_TransferStateTypedef;
mbed_official 573:ad23fe03a082 279 /**
mbed_official 573:ad23fe03a082 280 * @}
mbed_official 573:ad23fe03a082 281 */
mbed_official 573:ad23fe03a082 282
mbed_official 573:ad23fe03a082 283 /** @defgroup SD_Exported_Types_Group8 SD Card State enumeration structure
mbed_official 573:ad23fe03a082 284 * @{
mbed_official 573:ad23fe03a082 285 */
mbed_official 573:ad23fe03a082 286 typedef enum
mbed_official 573:ad23fe03a082 287 {
mbed_official 573:ad23fe03a082 288 SD_CARD_READY = ((uint32_t)0x00000001), /*!< Card state is ready */
mbed_official 573:ad23fe03a082 289 SD_CARD_IDENTIFICATION = ((uint32_t)0x00000002), /*!< Card is in identification state */
mbed_official 573:ad23fe03a082 290 SD_CARD_STANDBY = ((uint32_t)0x00000003), /*!< Card is in standby state */
mbed_official 573:ad23fe03a082 291 SD_CARD_TRANSFER = ((uint32_t)0x00000004), /*!< Card is in transfer state */
mbed_official 573:ad23fe03a082 292 SD_CARD_SENDING = ((uint32_t)0x00000005), /*!< Card is sending an operation */
mbed_official 573:ad23fe03a082 293 SD_CARD_RECEIVING = ((uint32_t)0x00000006), /*!< Card is receiving operation information */
mbed_official 573:ad23fe03a082 294 SD_CARD_PROGRAMMING = ((uint32_t)0x00000007), /*!< Card is in programming state */
mbed_official 573:ad23fe03a082 295 SD_CARD_DISCONNECTED = ((uint32_t)0x00000008), /*!< Card is disconnected */
mbed_official 573:ad23fe03a082 296 SD_CARD_ERROR = ((uint32_t)0x000000FF) /*!< Card is in error state */
mbed_official 573:ad23fe03a082 297
mbed_official 573:ad23fe03a082 298 }HAL_SD_CardStateTypedef;
mbed_official 573:ad23fe03a082 299 /**
mbed_official 573:ad23fe03a082 300 * @}
mbed_official 573:ad23fe03a082 301 */
mbed_official 573:ad23fe03a082 302
mbed_official 573:ad23fe03a082 303 /** @defgroup SD_Exported_Types_Group9 SD Operation enumeration structure
mbed_official 573:ad23fe03a082 304 * @{
mbed_official 573:ad23fe03a082 305 */
mbed_official 573:ad23fe03a082 306 typedef enum
mbed_official 573:ad23fe03a082 307 {
mbed_official 573:ad23fe03a082 308 SD_READ_SINGLE_BLOCK = 0, /*!< Read single block operation */
mbed_official 573:ad23fe03a082 309 SD_READ_MULTIPLE_BLOCK = 1, /*!< Read multiple blocks operation */
mbed_official 573:ad23fe03a082 310 SD_WRITE_SINGLE_BLOCK = 2, /*!< Write single block operation */
mbed_official 573:ad23fe03a082 311 SD_WRITE_MULTIPLE_BLOCK = 3 /*!< Write multiple blocks operation */
mbed_official 573:ad23fe03a082 312
mbed_official 573:ad23fe03a082 313 }HAL_SD_OperationTypedef;
mbed_official 573:ad23fe03a082 314 /**
mbed_official 573:ad23fe03a082 315 * @}
mbed_official 573:ad23fe03a082 316 */
mbed_official 573:ad23fe03a082 317
mbed_official 573:ad23fe03a082 318 /**
mbed_official 573:ad23fe03a082 319 * @}
mbed_official 573:ad23fe03a082 320 */
mbed_official 573:ad23fe03a082 321
mbed_official 573:ad23fe03a082 322 /* Exported constants --------------------------------------------------------*/
mbed_official 573:ad23fe03a082 323 /** @defgroup SD_Exported_Constants SD Exported Constants
mbed_official 573:ad23fe03a082 324 * @{
mbed_official 573:ad23fe03a082 325 */
mbed_official 573:ad23fe03a082 326
mbed_official 573:ad23fe03a082 327 /**
mbed_official 573:ad23fe03a082 328 * @brief SD Commands Index
mbed_official 573:ad23fe03a082 329 */
mbed_official 573:ad23fe03a082 330 #define SD_CMD_GO_IDLE_STATE ((uint8_t)0) /*!< Resets the SD memory card. */
mbed_official 573:ad23fe03a082 331 #define SD_CMD_SEND_OP_COND ((uint8_t)1) /*!< Sends host capacity support information and activates the card's initialization process. */
mbed_official 573:ad23fe03a082 332 #define SD_CMD_ALL_SEND_CID ((uint8_t)2) /*!< Asks any card connected to the host to send the CID numbers on the CMD line. */
mbed_official 573:ad23fe03a082 333 #define SD_CMD_SET_REL_ADDR ((uint8_t)3) /*!< Asks the card to publish a new relative address (RCA). */
mbed_official 573:ad23fe03a082 334 #define SD_CMD_SET_DSR ((uint8_t)4) /*!< Programs the DSR of all cards. */
mbed_official 573:ad23fe03a082 335 #define SD_CMD_SDMMC_SEN_OP_COND ((uint8_t)5) /*!< Sends host capacity support information (HCS) and asks the accessed card to send its
mbed_official 573:ad23fe03a082 336 operating condition register (OCR) content in the response on the CMD line. */
mbed_official 573:ad23fe03a082 337 #define SD_CMD_HS_SWITCH ((uint8_t)6) /*!< Checks switchable function (mode 0) and switch card function (mode 1). */
mbed_official 573:ad23fe03a082 338 #define SD_CMD_SEL_DESEL_CARD ((uint8_t)7) /*!< Selects the card by its own relative address and gets deselected by any other address */
mbed_official 573:ad23fe03a082 339 #define SD_CMD_HS_SEND_EXT_CSD ((uint8_t)8) /*!< Sends SD Memory Card interface condition, which includes host supply voltage information
mbed_official 573:ad23fe03a082 340 and asks the card whether card supports voltage. */
mbed_official 573:ad23fe03a082 341 #define SD_CMD_SEND_CSD ((uint8_t)9) /*!< Addressed card sends its card specific data (CSD) on the CMD line. */
mbed_official 573:ad23fe03a082 342 #define SD_CMD_SEND_CID ((uint8_t)10) /*!< Addressed card sends its card identification (CID) on the CMD line. */
mbed_official 573:ad23fe03a082 343 #define SD_CMD_READ_DAT_UNTIL_STOP ((uint8_t)11) /*!< SD card doesn't support it. */
mbed_official 573:ad23fe03a082 344 #define SD_CMD_STOP_TRANSMISSION ((uint8_t)12) /*!< Forces the card to stop transmission. */
mbed_official 573:ad23fe03a082 345 #define SD_CMD_SEND_STATUS ((uint8_t)13) /*!< Addressed card sends its status register. */
mbed_official 573:ad23fe03a082 346 #define SD_CMD_HS_BUSTEST_READ ((uint8_t)14)
mbed_official 573:ad23fe03a082 347 #define SD_CMD_GO_INACTIVE_STATE ((uint8_t)15) /*!< Sends an addressed card into the inactive state. */
mbed_official 573:ad23fe03a082 348 #define SD_CMD_SET_BLOCKLEN ((uint8_t)16) /*!< Sets the block length (in bytes for SDSC) for all following block commands
mbed_official 573:ad23fe03a082 349 (read, write, lock). Default block length is fixed to 512 Bytes. Not effective
mbed_official 573:ad23fe03a082 350 for SDHS and SDXC. */
mbed_official 573:ad23fe03a082 351 #define SD_CMD_READ_SINGLE_BLOCK ((uint8_t)17) /*!< Reads single block of size selected by SET_BLOCKLEN in case of SDSC, and a block of
mbed_official 573:ad23fe03a082 352 fixed 512 bytes in case of SDHC and SDXC. */
mbed_official 573:ad23fe03a082 353 #define SD_CMD_READ_MULT_BLOCK ((uint8_t)18) /*!< Continuously transfers data blocks from card to host until interrupted by
mbed_official 573:ad23fe03a082 354 STOP_TRANSMISSION command. */
mbed_official 573:ad23fe03a082 355 #define SD_CMD_HS_BUSTEST_WRITE ((uint8_t)19) /*!< 64 bytes tuning pattern is sent for SDR50 and SDR104. */
mbed_official 573:ad23fe03a082 356 #define SD_CMD_WRITE_DAT_UNTIL_STOP ((uint8_t)20) /*!< Speed class control command. */
mbed_official 573:ad23fe03a082 357 #define SD_CMD_SET_BLOCK_COUNT ((uint8_t)23) /*!< Specify block count for CMD18 and CMD25. */
mbed_official 573:ad23fe03a082 358 #define SD_CMD_WRITE_SINGLE_BLOCK ((uint8_t)24) /*!< Writes single block of size selected by SET_BLOCKLEN in case of SDSC, and a block of
mbed_official 573:ad23fe03a082 359 fixed 512 bytes in case of SDHC and SDXC. */
mbed_official 573:ad23fe03a082 360 #define SD_CMD_WRITE_MULT_BLOCK ((uint8_t)25) /*!< Continuously writes blocks of data until a STOP_TRANSMISSION follows. */
mbed_official 573:ad23fe03a082 361 #define SD_CMD_PROG_CID ((uint8_t)26) /*!< Reserved for manufacturers. */
mbed_official 573:ad23fe03a082 362 #define SD_CMD_PROG_CSD ((uint8_t)27) /*!< Programming of the programmable bits of the CSD. */
mbed_official 573:ad23fe03a082 363 #define SD_CMD_SET_WRITE_PROT ((uint8_t)28) /*!< Sets the write protection bit of the addressed group. */
mbed_official 573:ad23fe03a082 364 #define SD_CMD_CLR_WRITE_PROT ((uint8_t)29) /*!< Clears the write protection bit of the addressed group. */
mbed_official 573:ad23fe03a082 365 #define SD_CMD_SEND_WRITE_PROT ((uint8_t)30) /*!< Asks the card to send the status of the write protection bits. */
mbed_official 573:ad23fe03a082 366 #define SD_CMD_SD_ERASE_GRP_START ((uint8_t)32) /*!< Sets the address of the first write block to be erased. (For SD card only). */
mbed_official 573:ad23fe03a082 367 #define SD_CMD_SD_ERASE_GRP_END ((uint8_t)33) /*!< Sets the address of the last write block of the continuous range to be erased. */
mbed_official 573:ad23fe03a082 368 #define SD_CMD_ERASE_GRP_START ((uint8_t)35) /*!< Sets the address of the first write block to be erased. Reserved for each command
mbed_official 573:ad23fe03a082 369 system set by switch function command (CMD6). */
mbed_official 573:ad23fe03a082 370 #define SD_CMD_ERASE_GRP_END ((uint8_t)36) /*!< Sets the address of the last write block of the continuous range to be erased.
mbed_official 573:ad23fe03a082 371 Reserved for each command system set by switch function command (CMD6). */
mbed_official 573:ad23fe03a082 372 #define SD_CMD_ERASE ((uint8_t)38) /*!< Reserved for SD security applications. */
mbed_official 573:ad23fe03a082 373 #define SD_CMD_FAST_IO ((uint8_t)39) /*!< SD card doesn't support it (Reserved). */
mbed_official 573:ad23fe03a082 374 #define SD_CMD_GO_IRQ_STATE ((uint8_t)40) /*!< SD card doesn't support it (Reserved). */
mbed_official 573:ad23fe03a082 375 #define SD_CMD_LOCK_UNLOCK ((uint8_t)42) /*!< Sets/resets the password or lock/unlock the card. The size of the data block is set by
mbed_official 573:ad23fe03a082 376 the SET_BLOCK_LEN command. */
mbed_official 573:ad23fe03a082 377 #define SD_CMD_APP_CMD ((uint8_t)55) /*!< Indicates to the card that the next command is an application specific command rather
mbed_official 573:ad23fe03a082 378 than a standard command. */
mbed_official 573:ad23fe03a082 379 #define SD_CMD_GEN_CMD ((uint8_t)56) /*!< Used either to transfer a data block to the card or to get a data block from the card
mbed_official 573:ad23fe03a082 380 for general purpose/application specific commands. */
mbed_official 573:ad23fe03a082 381 #define SD_CMD_NO_CMD ((uint8_t)64)
mbed_official 573:ad23fe03a082 382
mbed_official 573:ad23fe03a082 383 /**
mbed_official 573:ad23fe03a082 384 * @brief Following commands are SD Card Specific commands.
mbed_official 573:ad23fe03a082 385 * SDMMC_APP_CMD should be sent before sending these commands.
mbed_official 573:ad23fe03a082 386 */
mbed_official 573:ad23fe03a082 387 #define SD_CMD_APP_SD_SET_BUSWIDTH ((uint8_t)6) /*!< (ACMD6) Defines the data bus width to be used for data transfer. The allowed data bus
mbed_official 573:ad23fe03a082 388 widths are given in SCR register. */
mbed_official 573:ad23fe03a082 389 #define SD_CMD_SD_APP_STATUS ((uint8_t)13) /*!< (ACMD13) Sends the SD status. */
mbed_official 573:ad23fe03a082 390 #define SD_CMD_SD_APP_SEND_NUM_WRITE_BLOCKS ((uint8_t)22) /*!< (ACMD22) Sends the number of the written (without errors) write blocks. Responds with
mbed_official 573:ad23fe03a082 391 32bit+CRC data block. */
mbed_official 573:ad23fe03a082 392 #define SD_CMD_SD_APP_OP_COND ((uint8_t)41) /*!< (ACMD41) Sends host capacity support information (HCS) and asks the accessed card to
mbed_official 573:ad23fe03a082 393 send its operating condition register (OCR) content in the response on the CMD line. */
mbed_official 573:ad23fe03a082 394 #define SD_CMD_SD_APP_SET_CLR_CARD_DETECT ((uint8_t)42) /*!< (ACMD42) Connects/Disconnects the 50 KOhm pull-up resistor on CD/DAT3 (pin 1) of the card. */
mbed_official 573:ad23fe03a082 395 #define SD_CMD_SD_APP_SEND_SCR ((uint8_t)51) /*!< Reads the SD Configuration Register (SCR). */
mbed_official 573:ad23fe03a082 396 #define SD_CMD_SDMMC_RW_DIRECT ((uint8_t)52) /*!< For SD I/O card only, reserved for security specification. */
mbed_official 573:ad23fe03a082 397 #define SD_CMD_SDMMC_RW_EXTENDED ((uint8_t)53) /*!< For SD I/O card only, reserved for security specification. */
mbed_official 573:ad23fe03a082 398
mbed_official 573:ad23fe03a082 399 /**
mbed_official 573:ad23fe03a082 400 * @brief Following commands are SD Card Specific security commands.
mbed_official 573:ad23fe03a082 401 * SD_CMD_APP_CMD should be sent before sending these commands.
mbed_official 573:ad23fe03a082 402 */
mbed_official 573:ad23fe03a082 403 #define SD_CMD_SD_APP_GET_MKB ((uint8_t)43) /*!< For SD card only */
mbed_official 573:ad23fe03a082 404 #define SD_CMD_SD_APP_GET_MID ((uint8_t)44) /*!< For SD card only */
mbed_official 573:ad23fe03a082 405 #define SD_CMD_SD_APP_SET_CER_RN1 ((uint8_t)45) /*!< For SD card only */
mbed_official 573:ad23fe03a082 406 #define SD_CMD_SD_APP_GET_CER_RN2 ((uint8_t)46) /*!< For SD card only */
mbed_official 573:ad23fe03a082 407 #define SD_CMD_SD_APP_SET_CER_RES2 ((uint8_t)47) /*!< For SD card only */
mbed_official 573:ad23fe03a082 408 #define SD_CMD_SD_APP_GET_CER_RES1 ((uint8_t)48) /*!< For SD card only */
mbed_official 573:ad23fe03a082 409 #define SD_CMD_SD_APP_SECURE_READ_MULTIPLE_BLOCK ((uint8_t)18) /*!< For SD card only */
mbed_official 573:ad23fe03a082 410 #define SD_CMD_SD_APP_SECURE_WRITE_MULTIPLE_BLOCK ((uint8_t)25) /*!< For SD card only */
mbed_official 573:ad23fe03a082 411 #define SD_CMD_SD_APP_SECURE_ERASE ((uint8_t)38) /*!< For SD card only */
mbed_official 573:ad23fe03a082 412 #define SD_CMD_SD_APP_CHANGE_SECURE_AREA ((uint8_t)49) /*!< For SD card only */
mbed_official 573:ad23fe03a082 413 #define SD_CMD_SD_APP_SECURE_WRITE_MKB ((uint8_t)48) /*!< For SD card only */
mbed_official 573:ad23fe03a082 414
mbed_official 573:ad23fe03a082 415 /**
mbed_official 573:ad23fe03a082 416 * @brief Supported SD Memory Cards
mbed_official 573:ad23fe03a082 417 */
mbed_official 573:ad23fe03a082 418 #define STD_CAPACITY_SD_CARD_V1_1 ((uint32_t)0x00000000)
mbed_official 573:ad23fe03a082 419 #define STD_CAPACITY_SD_CARD_V2_0 ((uint32_t)0x00000001)
mbed_official 573:ad23fe03a082 420 #define HIGH_CAPACITY_SD_CARD ((uint32_t)0x00000002)
mbed_official 573:ad23fe03a082 421 #define MULTIMEDIA_CARD ((uint32_t)0x00000003)
mbed_official 573:ad23fe03a082 422 #define SECURE_DIGITAL_IO_CARD ((uint32_t)0x00000004)
mbed_official 573:ad23fe03a082 423 #define HIGH_SPEED_MULTIMEDIA_CARD ((uint32_t)0x00000005)
mbed_official 573:ad23fe03a082 424 #define SECURE_DIGITAL_IO_COMBO_CARD ((uint32_t)0x00000006)
mbed_official 573:ad23fe03a082 425 #define HIGH_CAPACITY_MMC_CARD ((uint32_t)0x00000007)
mbed_official 573:ad23fe03a082 426 /**
mbed_official 573:ad23fe03a082 427 * @}
mbed_official 573:ad23fe03a082 428 */
mbed_official 573:ad23fe03a082 429
mbed_official 573:ad23fe03a082 430 /* Exported macro ------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 431 /** @defgroup SD_Exported_macros SD Exported Macros
mbed_official 573:ad23fe03a082 432 * @brief macros to handle interrupts and specific clock configurations
mbed_official 573:ad23fe03a082 433 * @{
mbed_official 573:ad23fe03a082 434 */
mbed_official 573:ad23fe03a082 435
mbed_official 573:ad23fe03a082 436 /**
mbed_official 573:ad23fe03a082 437 * @brief Enable the SD device.
mbed_official 573:ad23fe03a082 438 * @retval None
mbed_official 573:ad23fe03a082 439 */
mbed_official 573:ad23fe03a082 440 #define __HAL_SD_SDMMC_ENABLE(__HANDLE__) __SDMMC_ENABLE((__HANDLE__)->Instance)
mbed_official 573:ad23fe03a082 441
mbed_official 573:ad23fe03a082 442 /**
mbed_official 573:ad23fe03a082 443 * @brief Disable the SD device.
mbed_official 573:ad23fe03a082 444 * @retval None
mbed_official 573:ad23fe03a082 445 */
mbed_official 573:ad23fe03a082 446 #define __HAL_SD_SDMMC_DISABLE(__HANDLE__) __SDMMC_DISABLE((__HANDLE__)->Instance)
mbed_official 573:ad23fe03a082 447
mbed_official 573:ad23fe03a082 448 /**
mbed_official 573:ad23fe03a082 449 * @brief Enable the SDMMC DMA transfer.
mbed_official 573:ad23fe03a082 450 * @retval None
mbed_official 573:ad23fe03a082 451 */
mbed_official 573:ad23fe03a082 452 #define __HAL_SD_SDMMC_DMA_ENABLE(__HANDLE__) __SDMMC_DMA_ENABLE((__HANDLE__)->Instance)
mbed_official 573:ad23fe03a082 453
mbed_official 573:ad23fe03a082 454 /**
mbed_official 573:ad23fe03a082 455 * @brief Disable the SDMMC DMA transfer.
mbed_official 573:ad23fe03a082 456 * @retval None
mbed_official 573:ad23fe03a082 457 */
mbed_official 573:ad23fe03a082 458 #define __HAL_SD_SDMMC_DMA_DISABLE(__HANDLE__) __SDMMC_DMA_DISABLE((__HANDLE__)->Instance)
mbed_official 573:ad23fe03a082 459
mbed_official 573:ad23fe03a082 460 /**
mbed_official 573:ad23fe03a082 461 * @brief Enable the SD device interrupt.
mbed_official 573:ad23fe03a082 462 * @param __HANDLE__: SD Handle
mbed_official 573:ad23fe03a082 463 * @param __INTERRUPT__: specifies the SDMMC interrupt sources to be enabled.
mbed_official 573:ad23fe03a082 464 * This parameter can be one or a combination of the following values:
mbed_official 573:ad23fe03a082 465 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 466 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 467 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
mbed_official 573:ad23fe03a082 468 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
mbed_official 573:ad23fe03a082 469 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
mbed_official 573:ad23fe03a082 470 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
mbed_official 573:ad23fe03a082 471 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
mbed_official 573:ad23fe03a082 472 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
mbed_official 573:ad23fe03a082 473 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
mbed_official 573:ad23fe03a082 474 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
mbed_official 573:ad23fe03a082 475 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
mbed_official 573:ad23fe03a082 476 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
mbed_official 573:ad23fe03a082 477 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
mbed_official 573:ad23fe03a082 478 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
mbed_official 573:ad23fe03a082 479 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
mbed_official 573:ad23fe03a082 480 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
mbed_official 573:ad23fe03a082 481 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
mbed_official 573:ad23fe03a082 482 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
mbed_official 573:ad23fe03a082 483 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
mbed_official 573:ad23fe03a082 484 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
mbed_official 573:ad23fe03a082 485 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
mbed_official 573:ad23fe03a082 486 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
mbed_official 573:ad23fe03a082 487 * @retval None
mbed_official 573:ad23fe03a082 488 */
mbed_official 573:ad23fe03a082 489 #define __HAL_SD_SDMMC_ENABLE_IT(__HANDLE__, __INTERRUPT__) __SDMMC_ENABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
mbed_official 573:ad23fe03a082 490
mbed_official 573:ad23fe03a082 491 /**
mbed_official 573:ad23fe03a082 492 * @brief Disable the SD device interrupt.
mbed_official 573:ad23fe03a082 493 * @param __HANDLE__: SD Handle
mbed_official 573:ad23fe03a082 494 * @param __INTERRUPT__: specifies the SDMMC interrupt sources to be disabled.
mbed_official 573:ad23fe03a082 495 * This parameter can be one or a combination of the following values:
mbed_official 573:ad23fe03a082 496 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 497 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 498 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
mbed_official 573:ad23fe03a082 499 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
mbed_official 573:ad23fe03a082 500 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
mbed_official 573:ad23fe03a082 501 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
mbed_official 573:ad23fe03a082 502 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
mbed_official 573:ad23fe03a082 503 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
mbed_official 573:ad23fe03a082 504 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
mbed_official 573:ad23fe03a082 505 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
mbed_official 573:ad23fe03a082 506 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
mbed_official 573:ad23fe03a082 507 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
mbed_official 573:ad23fe03a082 508 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
mbed_official 573:ad23fe03a082 509 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
mbed_official 573:ad23fe03a082 510 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
mbed_official 573:ad23fe03a082 511 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
mbed_official 573:ad23fe03a082 512 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
mbed_official 573:ad23fe03a082 513 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
mbed_official 573:ad23fe03a082 514 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
mbed_official 573:ad23fe03a082 515 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
mbed_official 573:ad23fe03a082 516 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
mbed_official 573:ad23fe03a082 517 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
mbed_official 573:ad23fe03a082 518 * @retval None
mbed_official 573:ad23fe03a082 519 */
mbed_official 573:ad23fe03a082 520 #define __HAL_SD_SDMMC_DISABLE_IT(__HANDLE__, __INTERRUPT__) __SDMMC_DISABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
mbed_official 573:ad23fe03a082 521
mbed_official 573:ad23fe03a082 522 /**
mbed_official 573:ad23fe03a082 523 * @brief Check whether the specified SD flag is set or not.
mbed_official 573:ad23fe03a082 524 * @param __HANDLE__: SD Handle
mbed_official 573:ad23fe03a082 525 * @param __FLAG__: specifies the flag to check.
mbed_official 573:ad23fe03a082 526 * This parameter can be one of the following values:
mbed_official 573:ad23fe03a082 527 * @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)
mbed_official 573:ad23fe03a082 528 * @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
mbed_official 573:ad23fe03a082 529 * @arg SDMMC_FLAG_CTIMEOUT: Command response timeout
mbed_official 573:ad23fe03a082 530 * @arg SDMMC_FLAG_DTIMEOUT: Data timeout
mbed_official 573:ad23fe03a082 531 * @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error
mbed_official 573:ad23fe03a082 532 * @arg SDMMC_FLAG_RXOVERR: Received FIFO overrun error
mbed_official 573:ad23fe03a082 533 * @arg SDMMC_FLAG_CMDREND: Command response received (CRC check passed)
mbed_official 573:ad23fe03a082 534 * @arg SDMMC_FLAG_CMDSENT: Command sent (no response required)
mbed_official 573:ad23fe03a082 535 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
mbed_official 573:ad23fe03a082 536 * @arg SDMMC_FLAG_DBCKEND: Data block sent/received (CRC check passed)
mbed_official 573:ad23fe03a082 537 * @arg SDMMC_FLAG_CMDACT: Command transfer in progress
mbed_official 573:ad23fe03a082 538 * @arg SDMMC_FLAG_TXACT: Data transmit in progress
mbed_official 573:ad23fe03a082 539 * @arg SDMMC_FLAG_RXACT: Data receive in progress
mbed_official 573:ad23fe03a082 540 * @arg SDMMC_FLAG_TXFIFOHE: Transmit FIFO Half Empty
mbed_official 573:ad23fe03a082 541 * @arg SDMMC_FLAG_RXFIFOHF: Receive FIFO Half Full
mbed_official 573:ad23fe03a082 542 * @arg SDMMC_FLAG_TXFIFOF: Transmit FIFO full
mbed_official 573:ad23fe03a082 543 * @arg SDMMC_FLAG_RXFIFOF: Receive FIFO full
mbed_official 573:ad23fe03a082 544 * @arg SDMMC_FLAG_TXFIFOE: Transmit FIFO empty
mbed_official 573:ad23fe03a082 545 * @arg SDMMC_FLAG_RXFIFOE: Receive FIFO empty
mbed_official 573:ad23fe03a082 546 * @arg SDMMC_FLAG_TXDAVL: Data available in transmit FIFO
mbed_official 573:ad23fe03a082 547 * @arg SDMMC_FLAG_RXDAVL: Data available in receive FIFO
mbed_official 573:ad23fe03a082 548 * @arg SDMMC_FLAG_SDIOIT: SD I/O interrupt received
mbed_official 573:ad23fe03a082 549 * @retval The new state of SD FLAG (SET or RESET).
mbed_official 573:ad23fe03a082 550 */
mbed_official 573:ad23fe03a082 551 #define __HAL_SD_SDMMC_GET_FLAG(__HANDLE__, __FLAG__) __SDMMC_GET_FLAG((__HANDLE__)->Instance, (__FLAG__))
mbed_official 573:ad23fe03a082 552
mbed_official 573:ad23fe03a082 553 /**
mbed_official 573:ad23fe03a082 554 * @brief Clear the SD's pending flags.
mbed_official 573:ad23fe03a082 555 * @param __HANDLE__: SD Handle
mbed_official 573:ad23fe03a082 556 * @param __FLAG__: specifies the flag to clear.
mbed_official 573:ad23fe03a082 557 * This parameter can be one or a combination of the following values:
mbed_official 573:ad23fe03a082 558 * @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)
mbed_official 573:ad23fe03a082 559 * @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
mbed_official 573:ad23fe03a082 560 * @arg SDMMC_FLAG_CTIMEOUT: Command response timeout
mbed_official 573:ad23fe03a082 561 * @arg SDMMC_FLAG_DTIMEOUT: Data timeout
mbed_official 573:ad23fe03a082 562 * @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error
mbed_official 573:ad23fe03a082 563 * @arg SDMMC_FLAG_RXOVERR: Received FIFO overrun error
mbed_official 573:ad23fe03a082 564 * @arg SDMMC_FLAG_CMDREND: Command response received (CRC check passed)
mbed_official 573:ad23fe03a082 565 * @arg SDMMC_FLAG_CMDSENT: Command sent (no response required)
mbed_official 573:ad23fe03a082 566 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
mbed_official 573:ad23fe03a082 567 * @arg SDMMC_FLAG_DBCKEND: Data block sent/received (CRC check passed)
mbed_official 573:ad23fe03a082 568 * @arg SDMMC_FLAG_SDIOIT: SD I/O interrupt received
mbed_official 573:ad23fe03a082 569 * @retval None
mbed_official 573:ad23fe03a082 570 */
mbed_official 573:ad23fe03a082 571 #define __HAL_SD_SDMMC_CLEAR_FLAG(__HANDLE__, __FLAG__) __SDMMC_CLEAR_FLAG((__HANDLE__)->Instance, (__FLAG__))
mbed_official 573:ad23fe03a082 572
mbed_official 573:ad23fe03a082 573 /**
mbed_official 573:ad23fe03a082 574 * @brief Check whether the specified SD interrupt has occurred or not.
mbed_official 573:ad23fe03a082 575 * @param __HANDLE__: SD Handle
mbed_official 573:ad23fe03a082 576 * @param __INTERRUPT__: specifies the SDMMC interrupt source to check.
mbed_official 573:ad23fe03a082 577 * This parameter can be one of the following values:
mbed_official 573:ad23fe03a082 578 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 579 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 580 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
mbed_official 573:ad23fe03a082 581 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
mbed_official 573:ad23fe03a082 582 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
mbed_official 573:ad23fe03a082 583 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
mbed_official 573:ad23fe03a082 584 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
mbed_official 573:ad23fe03a082 585 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
mbed_official 573:ad23fe03a082 586 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
mbed_official 573:ad23fe03a082 587 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
mbed_official 573:ad23fe03a082 588 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
mbed_official 573:ad23fe03a082 589 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
mbed_official 573:ad23fe03a082 590 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
mbed_official 573:ad23fe03a082 591 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
mbed_official 573:ad23fe03a082 592 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
mbed_official 573:ad23fe03a082 593 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
mbed_official 573:ad23fe03a082 594 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
mbed_official 573:ad23fe03a082 595 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
mbed_official 573:ad23fe03a082 596 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
mbed_official 573:ad23fe03a082 597 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
mbed_official 573:ad23fe03a082 598 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
mbed_official 573:ad23fe03a082 599 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
mbed_official 573:ad23fe03a082 600 * @retval The new state of SD IT (SET or RESET).
mbed_official 573:ad23fe03a082 601 */
mbed_official 573:ad23fe03a082 602 #define __HAL_SD_SDMMC_GET_IT(__HANDLE__, __INTERRUPT__) __SDMMC_GET_IT((__HANDLE__)->Instance, (__INTERRUPT__))
mbed_official 573:ad23fe03a082 603
mbed_official 573:ad23fe03a082 604 /**
mbed_official 573:ad23fe03a082 605 * @brief Clear the SD's interrupt pending bits.
mbed_official 610:813dcc80987e 606 * @param __HANDLE__: SD Handle
mbed_official 573:ad23fe03a082 607 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
mbed_official 573:ad23fe03a082 608 * This parameter can be one or a combination of the following values:
mbed_official 573:ad23fe03a082 609 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 610 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
mbed_official 573:ad23fe03a082 611 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
mbed_official 573:ad23fe03a082 612 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
mbed_official 573:ad23fe03a082 613 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
mbed_official 573:ad23fe03a082 614 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
mbed_official 573:ad23fe03a082 615 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
mbed_official 573:ad23fe03a082 616 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
mbed_official 573:ad23fe03a082 617 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDMMC_DCOUNT, is zero) interrupt
mbed_official 573:ad23fe03a082 618 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
mbed_official 573:ad23fe03a082 619 * @retval None
mbed_official 573:ad23fe03a082 620 */
mbed_official 573:ad23fe03a082 621 #define __HAL_SD_SDMMC_CLEAR_IT(__HANDLE__, __INTERRUPT__) __SDMMC_CLEAR_IT((__HANDLE__)->Instance, (__INTERRUPT__))
mbed_official 573:ad23fe03a082 622 /**
mbed_official 573:ad23fe03a082 623 * @}
mbed_official 573:ad23fe03a082 624 */
mbed_official 573:ad23fe03a082 625
mbed_official 573:ad23fe03a082 626 /* Exported functions --------------------------------------------------------*/
mbed_official 573:ad23fe03a082 627 /** @defgroup SD_Exported_Functions SD Exported Functions
mbed_official 573:ad23fe03a082 628 * @{
mbed_official 573:ad23fe03a082 629 */
mbed_official 573:ad23fe03a082 630
mbed_official 573:ad23fe03a082 631 /** @defgroup SD_Exported_Functions_Group1 Initialization and de-initialization functions
mbed_official 573:ad23fe03a082 632 * @{
mbed_official 573:ad23fe03a082 633 */
mbed_official 573:ad23fe03a082 634 HAL_SD_ErrorTypedef HAL_SD_Init(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypedef *SDCardInfo);
mbed_official 573:ad23fe03a082 635 HAL_StatusTypeDef HAL_SD_DeInit (SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 636 void HAL_SD_MspInit(SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 637 void HAL_SD_MspDeInit(SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 638 /**
mbed_official 573:ad23fe03a082 639 * @}
mbed_official 573:ad23fe03a082 640 */
mbed_official 573:ad23fe03a082 641
mbed_official 573:ad23fe03a082 642 /** @defgroup SD_Exported_Functions_Group2 Input and Output operation functions
mbed_official 573:ad23fe03a082 643 * @{
mbed_official 573:ad23fe03a082 644 */
mbed_official 573:ad23fe03a082 645 /* Blocking mode: Polling */
mbed_official 573:ad23fe03a082 646 HAL_SD_ErrorTypedef HAL_SD_ReadBlocks(SD_HandleTypeDef *hsd, uint32_t *pReadBuffer, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);
mbed_official 573:ad23fe03a082 647 HAL_SD_ErrorTypedef HAL_SD_WriteBlocks(SD_HandleTypeDef *hsd, uint32_t *pWriteBuffer, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);
mbed_official 573:ad23fe03a082 648 HAL_SD_ErrorTypedef HAL_SD_Erase(SD_HandleTypeDef *hsd, uint64_t startaddr, uint64_t endaddr);
mbed_official 573:ad23fe03a082 649
mbed_official 573:ad23fe03a082 650 /* Non-Blocking mode: Interrupt */
mbed_official 573:ad23fe03a082 651 void HAL_SD_IRQHandler(SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 652
mbed_official 573:ad23fe03a082 653 /* Callback in non blocking modes (DMA) */
mbed_official 573:ad23fe03a082 654 void HAL_SD_DMA_RxCpltCallback(DMA_HandleTypeDef *hdma);
mbed_official 573:ad23fe03a082 655 void HAL_SD_DMA_RxErrorCallback(DMA_HandleTypeDef *hdma);
mbed_official 573:ad23fe03a082 656 void HAL_SD_DMA_TxCpltCallback(DMA_HandleTypeDef *hdma);
mbed_official 573:ad23fe03a082 657 void HAL_SD_DMA_TxErrorCallback(DMA_HandleTypeDef *hdma);
mbed_official 573:ad23fe03a082 658 void HAL_SD_XferCpltCallback(SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 659 void HAL_SD_XferErrorCallback(SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 660
mbed_official 573:ad23fe03a082 661 /* Non-Blocking mode: DMA */
mbed_official 573:ad23fe03a082 662 HAL_SD_ErrorTypedef HAL_SD_ReadBlocks_DMA(SD_HandleTypeDef *hsd, uint32_t *pReadBuffer, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);
mbed_official 573:ad23fe03a082 663 HAL_SD_ErrorTypedef HAL_SD_WriteBlocks_DMA(SD_HandleTypeDef *hsd, uint32_t *pWriteBuffer, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);
mbed_official 573:ad23fe03a082 664 HAL_SD_ErrorTypedef HAL_SD_CheckWriteOperation(SD_HandleTypeDef *hsd, uint32_t Timeout);
mbed_official 573:ad23fe03a082 665 HAL_SD_ErrorTypedef HAL_SD_CheckReadOperation(SD_HandleTypeDef *hsd, uint32_t Timeout);
mbed_official 573:ad23fe03a082 666 /**
mbed_official 573:ad23fe03a082 667 * @}
mbed_official 573:ad23fe03a082 668 */
mbed_official 573:ad23fe03a082 669
mbed_official 573:ad23fe03a082 670 /** @defgroup SD_Exported_Functions_Group3 Peripheral Control functions
mbed_official 573:ad23fe03a082 671 * @{
mbed_official 573:ad23fe03a082 672 */
mbed_official 573:ad23fe03a082 673 HAL_SD_ErrorTypedef HAL_SD_Get_CardInfo(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypedef *pCardInfo);
mbed_official 573:ad23fe03a082 674 HAL_SD_ErrorTypedef HAL_SD_WideBusOperation_Config(SD_HandleTypeDef *hsd, uint32_t WideMode);
mbed_official 573:ad23fe03a082 675 HAL_SD_ErrorTypedef HAL_SD_StopTransfer(SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 676 HAL_SD_ErrorTypedef HAL_SD_HighSpeed (SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 677 /**
mbed_official 573:ad23fe03a082 678 * @}
mbed_official 573:ad23fe03a082 679 */
mbed_official 573:ad23fe03a082 680
mbed_official 573:ad23fe03a082 681 /* Peripheral State functions ************************************************/
mbed_official 573:ad23fe03a082 682 /** @defgroup SD_Exported_Functions_Group4 Peripheral State functions
mbed_official 573:ad23fe03a082 683 * @{
mbed_official 573:ad23fe03a082 684 */
mbed_official 573:ad23fe03a082 685 HAL_SD_ErrorTypedef HAL_SD_SendSDStatus(SD_HandleTypeDef *hsd, uint32_t *pSDstatus);
mbed_official 573:ad23fe03a082 686 HAL_SD_ErrorTypedef HAL_SD_GetCardStatus(SD_HandleTypeDef *hsd, HAL_SD_CardStatusTypedef *pCardStatus);
mbed_official 573:ad23fe03a082 687 HAL_SD_TransferStateTypedef HAL_SD_GetStatus(SD_HandleTypeDef *hsd);
mbed_official 573:ad23fe03a082 688 /**
mbed_official 573:ad23fe03a082 689 * @}
mbed_official 573:ad23fe03a082 690 */
mbed_official 573:ad23fe03a082 691
mbed_official 573:ad23fe03a082 692 /**
mbed_official 573:ad23fe03a082 693 * @}
mbed_official 573:ad23fe03a082 694 */
mbed_official 573:ad23fe03a082 695
mbed_official 573:ad23fe03a082 696 /* Private types -------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 697 /** @defgroup SD_Private_Types SD Private Types
mbed_official 573:ad23fe03a082 698 * @{
mbed_official 573:ad23fe03a082 699 */
mbed_official 573:ad23fe03a082 700
mbed_official 573:ad23fe03a082 701 /**
mbed_official 573:ad23fe03a082 702 * @}
mbed_official 573:ad23fe03a082 703 */
mbed_official 573:ad23fe03a082 704
mbed_official 573:ad23fe03a082 705 /* Private defines -----------------------------------------------------------*/
mbed_official 573:ad23fe03a082 706 /** @defgroup SD_Private_Defines SD Private Defines
mbed_official 573:ad23fe03a082 707 * @{
mbed_official 573:ad23fe03a082 708 */
mbed_official 573:ad23fe03a082 709
mbed_official 573:ad23fe03a082 710 /**
mbed_official 573:ad23fe03a082 711 * @}
mbed_official 573:ad23fe03a082 712 */
mbed_official 573:ad23fe03a082 713
mbed_official 573:ad23fe03a082 714 /* Private variables ---------------------------------------------------------*/
mbed_official 573:ad23fe03a082 715 /** @defgroup SD_Private_Variables SD Private Variables
mbed_official 573:ad23fe03a082 716 * @{
mbed_official 573:ad23fe03a082 717 */
mbed_official 573:ad23fe03a082 718
mbed_official 573:ad23fe03a082 719 /**
mbed_official 573:ad23fe03a082 720 * @}
mbed_official 573:ad23fe03a082 721 */
mbed_official 573:ad23fe03a082 722
mbed_official 573:ad23fe03a082 723 /* Private constants ---------------------------------------------------------*/
mbed_official 573:ad23fe03a082 724 /** @defgroup SD_Private_Constants SD Private Constants
mbed_official 573:ad23fe03a082 725 * @{
mbed_official 573:ad23fe03a082 726 */
mbed_official 573:ad23fe03a082 727
mbed_official 573:ad23fe03a082 728 /**
mbed_official 573:ad23fe03a082 729 * @}
mbed_official 573:ad23fe03a082 730 */
mbed_official 573:ad23fe03a082 731
mbed_official 573:ad23fe03a082 732 /* Private macros ------------------------------------------------------------*/
mbed_official 573:ad23fe03a082 733 /** @defgroup SD_Private_Macros SD Private Macros
mbed_official 573:ad23fe03a082 734 * @{
mbed_official 573:ad23fe03a082 735 */
mbed_official 573:ad23fe03a082 736
mbed_official 573:ad23fe03a082 737 /**
mbed_official 573:ad23fe03a082 738 * @}
mbed_official 573:ad23fe03a082 739 */
mbed_official 573:ad23fe03a082 740
mbed_official 573:ad23fe03a082 741 /* Private functions prototypes ----------------------------------------------*/
mbed_official 573:ad23fe03a082 742 /** @defgroup SD_Private_Functions_Prototypes SD Private Functions Prototypes
mbed_official 573:ad23fe03a082 743 * @{
mbed_official 573:ad23fe03a082 744 */
mbed_official 573:ad23fe03a082 745
mbed_official 573:ad23fe03a082 746 /**
mbed_official 573:ad23fe03a082 747 * @}
mbed_official 573:ad23fe03a082 748 */
mbed_official 573:ad23fe03a082 749
mbed_official 573:ad23fe03a082 750 /* Private functions ---------------------------------------------------------*/
mbed_official 573:ad23fe03a082 751 /** @defgroup SD_Private_Functions SD Private Functions
mbed_official 573:ad23fe03a082 752 * @{
mbed_official 573:ad23fe03a082 753 */
mbed_official 573:ad23fe03a082 754
mbed_official 573:ad23fe03a082 755 /**
mbed_official 573:ad23fe03a082 756 * @}
mbed_official 573:ad23fe03a082 757 */
mbed_official 573:ad23fe03a082 758
mbed_official 573:ad23fe03a082 759 /**
mbed_official 573:ad23fe03a082 760 * @}
mbed_official 573:ad23fe03a082 761 */
mbed_official 573:ad23fe03a082 762
mbed_official 573:ad23fe03a082 763 /**
mbed_official 573:ad23fe03a082 764 * @}
mbed_official 573:ad23fe03a082 765 */
mbed_official 573:ad23fe03a082 766
mbed_official 573:ad23fe03a082 767 #ifdef __cplusplus
mbed_official 573:ad23fe03a082 768 }
mbed_official 573:ad23fe03a082 769 #endif
mbed_official 573:ad23fe03a082 770
mbed_official 573:ad23fe03a082 771
mbed_official 573:ad23fe03a082 772 #endif /* __STM32F7xx_HAL_SD_H */
mbed_official 573:ad23fe03a082 773
mbed_official 573:ad23fe03a082 774 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/