TUKS MCU Introductory course / TUKS-COURSE-TIMER
Committer:
elmot
Date:
Fri Feb 24 21:13:56 2017 +0000
Revision:
1:d0dfbce63a89
Ready-to-copy

Who changed what in which revision?

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