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

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Wed Jun 21 17:31:38 2017 +0100
Revision:
145:64910690c574
Parent:
128:9bcdf88f62b0
Release 145 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 122:f9eeca106725 1 /**
Kojto 122:f9eeca106725 2 ******************************************************************************
Kojto 122:f9eeca106725 3 * @file stm32l4xx_hal_sd.h
Kojto 122:f9eeca106725 4 * @author MCD Application Team
AnnaBridge 145:64910690c574 5 * @version V1.7.1
AnnaBridge 145:64910690c574 6 * @date 21-April-2017
Kojto 122:f9eeca106725 7 * @brief Header file of SD HAL module.
Kojto 122:f9eeca106725 8 ******************************************************************************
Kojto 122:f9eeca106725 9 * @attention
Kojto 122:f9eeca106725 10 *
AnnaBridge 145:64910690c574 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
Kojto 122:f9eeca106725 12 *
Kojto 122:f9eeca106725 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 122:f9eeca106725 14 * are permitted provided that the following conditions are met:
Kojto 122:f9eeca106725 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 122:f9eeca106725 16 * this list of conditions and the following disclaimer.
Kojto 122:f9eeca106725 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 122:f9eeca106725 18 * this list of conditions and the following disclaimer in the documentation
Kojto 122:f9eeca106725 19 * and/or other materials provided with the distribution.
Kojto 122:f9eeca106725 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 122:f9eeca106725 21 * may be used to endorse or promote products derived from this software
Kojto 122:f9eeca106725 22 * without specific prior written permission.
Kojto 122:f9eeca106725 23 *
Kojto 122:f9eeca106725 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 122:f9eeca106725 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 122:f9eeca106725 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 122:f9eeca106725 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 122:f9eeca106725 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 122:f9eeca106725 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 122:f9eeca106725 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 122:f9eeca106725 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 122:f9eeca106725 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 122:f9eeca106725 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 122:f9eeca106725 34 *
Kojto 122:f9eeca106725 35 ******************************************************************************
Kojto 122:f9eeca106725 36 */
Kojto 122:f9eeca106725 37
Kojto 122:f9eeca106725 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 122:f9eeca106725 39 #ifndef __STM32L4xx_HAL_SD_H
Kojto 122:f9eeca106725 40 #define __STM32L4xx_HAL_SD_H
Kojto 122:f9eeca106725 41
Kojto 122:f9eeca106725 42 #ifdef __cplusplus
Kojto 122:f9eeca106725 43 extern "C" {
Kojto 122:f9eeca106725 44 #endif
Kojto 122:f9eeca106725 45
Kojto 122:f9eeca106725 46 #if defined(SDMMC1)
Kojto 122:f9eeca106725 47
Kojto 122:f9eeca106725 48 /* Includes ------------------------------------------------------------------*/
Kojto 122:f9eeca106725 49 #include "stm32l4xx_ll_sdmmc.h"
Kojto 122:f9eeca106725 50
Kojto 122:f9eeca106725 51 /** @addtogroup STM32L4xx_HAL_Driver
Kojto 122:f9eeca106725 52 * @{
Kojto 122:f9eeca106725 53 */
Kojto 122:f9eeca106725 54
Kojto 122:f9eeca106725 55 /** @defgroup SD SD
Kojto 122:f9eeca106725 56 * @brief SD HAL module driver
Kojto 122:f9eeca106725 57 * @{
Kojto 122:f9eeca106725 58 */
Kojto 122:f9eeca106725 59
Kojto 122:f9eeca106725 60 /* Exported types ------------------------------------------------------------*/
Kojto 122:f9eeca106725 61 /** @defgroup SD_Exported_Types SD Exported Types
Kojto 122:f9eeca106725 62 * @{
Kojto 122:f9eeca106725 63 */
Kojto 122:f9eeca106725 64
AnnaBridge 145:64910690c574 65 /** @defgroup SD_Exported_Types_Group1 SD State enumeration structure
AnnaBridge 145:64910690c574 66 * @{
AnnaBridge 145:64910690c574 67 */
AnnaBridge 145:64910690c574 68 typedef enum
AnnaBridge 145:64910690c574 69 {
AnnaBridge 145:64910690c574 70 HAL_SD_STATE_RESET = ((uint32_t)0x00000000U), /*!< SD not yet initialized or disabled */
AnnaBridge 145:64910690c574 71 HAL_SD_STATE_READY = ((uint32_t)0x00000001U), /*!< SD initialized and ready for use */
AnnaBridge 145:64910690c574 72 HAL_SD_STATE_TIMEOUT = ((uint32_t)0x00000002U), /*!< SD Timeout state */
AnnaBridge 145:64910690c574 73 HAL_SD_STATE_BUSY = ((uint32_t)0x00000003U), /*!< SD process ongoing */
AnnaBridge 145:64910690c574 74 HAL_SD_STATE_PROGRAMMING = ((uint32_t)0x00000004U), /*!< SD Programming State */
AnnaBridge 145:64910690c574 75 HAL_SD_STATE_RECEIVING = ((uint32_t)0x00000005U), /*!< SD Receiving State */
AnnaBridge 145:64910690c574 76 HAL_SD_STATE_TRANSFER = ((uint32_t)0x00000006U), /*!< SD Transfert State */
AnnaBridge 145:64910690c574 77 HAL_SD_STATE_ERROR = ((uint32_t)0x0000000FU) /*!< SD is in error state */
AnnaBridge 145:64910690c574 78 }HAL_SD_StateTypeDef;
AnnaBridge 145:64910690c574 79 /**
AnnaBridge 145:64910690c574 80 * @}
AnnaBridge 145:64910690c574 81 */
AnnaBridge 145:64910690c574 82
AnnaBridge 145:64910690c574 83 /** @defgroup SD_Exported_Types_Group2 SD Card State enumeration structure
AnnaBridge 145:64910690c574 84 * @{
AnnaBridge 145:64910690c574 85 */
AnnaBridge 145:64910690c574 86 typedef enum
AnnaBridge 145:64910690c574 87 {
AnnaBridge 145:64910690c574 88 HAL_SD_CARD_READY = ((uint32_t)0x00000001U), /*!< Card state is ready */
AnnaBridge 145:64910690c574 89 HAL_SD_CARD_IDENTIFICATION = ((uint32_t)0x00000002U), /*!< Card is in identification state */
AnnaBridge 145:64910690c574 90 HAL_SD_CARD_STANDBY = ((uint32_t)0x00000003U), /*!< Card is in standby state */
AnnaBridge 145:64910690c574 91 HAL_SD_CARD_TRANSFER = ((uint32_t)0x00000004U), /*!< Card is in transfer state */
AnnaBridge 145:64910690c574 92 HAL_SD_CARD_SENDING = ((uint32_t)0x00000005U), /*!< Card is sending an operation */
AnnaBridge 145:64910690c574 93 HAL_SD_CARD_RECEIVING = ((uint32_t)0x00000006U), /*!< Card is receiving operation information */
AnnaBridge 145:64910690c574 94 HAL_SD_CARD_PROGRAMMING = ((uint32_t)0x00000007U), /*!< Card is in programming state */
AnnaBridge 145:64910690c574 95 HAL_SD_CARD_DISCONNECTED = ((uint32_t)0x00000008U), /*!< Card is disconnected */
AnnaBridge 145:64910690c574 96 HAL_SD_CARD_ERROR = ((uint32_t)0x000000FFU) /*!< Card response Error */
AnnaBridge 145:64910690c574 97 }HAL_SD_CardStateTypedef;
AnnaBridge 145:64910690c574 98 /**
AnnaBridge 145:64910690c574 99 * @}
AnnaBridge 145:64910690c574 100 */
AnnaBridge 145:64910690c574 101
AnnaBridge 145:64910690c574 102 /** @defgroup SD_Exported_Types_Group3 SD Handle Structure definition
Kojto 122:f9eeca106725 103 * @{
Kojto 122:f9eeca106725 104 */
Kojto 122:f9eeca106725 105 #define SD_InitTypeDef SDMMC_InitTypeDef
Kojto 122:f9eeca106725 106 #define SD_TypeDef SDMMC_TypeDef
Kojto 122:f9eeca106725 107
AnnaBridge 145:64910690c574 108 /**
AnnaBridge 145:64910690c574 109 * @brief SD Card Information Structure definition
AnnaBridge 145:64910690c574 110 */
AnnaBridge 145:64910690c574 111 typedef struct
AnnaBridge 145:64910690c574 112 {
AnnaBridge 145:64910690c574 113 uint32_t CardType; /*!< Specifies the card Type */
AnnaBridge 145:64910690c574 114
AnnaBridge 145:64910690c574 115 uint32_t CardVersion; /*!< Specifies the card version */
AnnaBridge 145:64910690c574 116
AnnaBridge 145:64910690c574 117 uint32_t Class; /*!< Specifies the class of the card class */
AnnaBridge 145:64910690c574 118
AnnaBridge 145:64910690c574 119 uint32_t RelCardAdd; /*!< Specifies the Relative Card Address */
AnnaBridge 145:64910690c574 120
AnnaBridge 145:64910690c574 121 uint32_t BlockNbr; /*!< Specifies the Card Capacity in blocks */
AnnaBridge 145:64910690c574 122
AnnaBridge 145:64910690c574 123 uint32_t BlockSize; /*!< Specifies one block size in bytes */
AnnaBridge 145:64910690c574 124
AnnaBridge 145:64910690c574 125 uint32_t LogBlockNbr; /*!< Specifies the Card logical Capacity in blocks */
AnnaBridge 145:64910690c574 126
AnnaBridge 145:64910690c574 127 uint32_t LogBlockSize; /*!< Specifies logical block size in bytes */
AnnaBridge 145:64910690c574 128
AnnaBridge 145:64910690c574 129 }HAL_SD_CardInfoTypeDef;
AnnaBridge 145:64910690c574 130
AnnaBridge 145:64910690c574 131 /**
AnnaBridge 145:64910690c574 132 * @brief SD handle Structure definition
AnnaBridge 145:64910690c574 133 */
Kojto 122:f9eeca106725 134 typedef struct
Kojto 122:f9eeca106725 135 {
AnnaBridge 145:64910690c574 136 SD_TypeDef *Instance; /*!< SD registers base address */
Kojto 122:f9eeca106725 137
AnnaBridge 145:64910690c574 138 SD_InitTypeDef Init; /*!< SD required parameters */
Kojto 122:f9eeca106725 139
AnnaBridge 145:64910690c574 140 HAL_LockTypeDef Lock; /*!< SD locking object */
Kojto 122:f9eeca106725 141
AnnaBridge 145:64910690c574 142 uint32_t *pTxBuffPtr; /*!< Pointer to SD Tx transfer Buffer */
AnnaBridge 145:64910690c574 143
AnnaBridge 145:64910690c574 144 uint32_t TxXferSize; /*!< SD Tx Transfer size */
Kojto 122:f9eeca106725 145
AnnaBridge 145:64910690c574 146 uint32_t *pRxBuffPtr; /*!< Pointer to SD Rx transfer Buffer */
Kojto 122:f9eeca106725 147
AnnaBridge 145:64910690c574 148 uint32_t RxXferSize; /*!< SD Rx Transfer size */
Kojto 122:f9eeca106725 149
AnnaBridge 145:64910690c574 150 __IO uint32_t Context; /*!< SD transfer context */
AnnaBridge 145:64910690c574 151
AnnaBridge 145:64910690c574 152 __IO HAL_SD_StateTypeDef State; /*!< SD card State */
Kojto 122:f9eeca106725 153
AnnaBridge 145:64910690c574 154 __IO uint32_t ErrorCode; /*!< SD Card Error codes */
Kojto 122:f9eeca106725 155
AnnaBridge 145:64910690c574 156 DMA_HandleTypeDef *hdmatx; /*!< SD Tx DMA handle parameters */
Kojto 122:f9eeca106725 157
AnnaBridge 145:64910690c574 158 DMA_HandleTypeDef *hdmarx; /*!< SD Rx DMA handle parameters */
Kojto 122:f9eeca106725 159
AnnaBridge 145:64910690c574 160 HAL_SD_CardInfoTypeDef SdCard; /*!< SD Card information */
Kojto 122:f9eeca106725 161
AnnaBridge 145:64910690c574 162 uint32_t CSD[4]; /*!< SD card specific data table */
Kojto 122:f9eeca106725 163
AnnaBridge 145:64910690c574 164 uint32_t CID[4]; /*!< SD card identification number table */
Kojto 122:f9eeca106725 165
Kojto 122:f9eeca106725 166 }SD_HandleTypeDef;
AnnaBridge 145:64910690c574 167
Kojto 122:f9eeca106725 168 /**
Kojto 122:f9eeca106725 169 * @}
Kojto 122:f9eeca106725 170 */
Kojto 122:f9eeca106725 171
AnnaBridge 145:64910690c574 172 /** @defgroup SD_Exported_Types_Group4 Card Specific Data: CSD Register
Kojto 122:f9eeca106725 173 * @{
Kojto 122:f9eeca106725 174 */
Kojto 122:f9eeca106725 175 typedef struct
Kojto 122:f9eeca106725 176 {
Kojto 122:f9eeca106725 177 __IO uint8_t CSDStruct; /*!< CSD structure */
Kojto 122:f9eeca106725 178 __IO uint8_t SysSpecVersion; /*!< System specification version */
Kojto 122:f9eeca106725 179 __IO uint8_t Reserved1; /*!< Reserved */
Kojto 122:f9eeca106725 180 __IO uint8_t TAAC; /*!< Data read access time 1 */
Kojto 122:f9eeca106725 181 __IO uint8_t NSAC; /*!< Data read access time 2 in CLK cycles */
Kojto 122:f9eeca106725 182 __IO uint8_t MaxBusClkFrec; /*!< Max. bus clock frequency */
Kojto 122:f9eeca106725 183 __IO uint16_t CardComdClasses; /*!< Card command classes */
Kojto 122:f9eeca106725 184 __IO uint8_t RdBlockLen; /*!< Max. read data block length */
Kojto 122:f9eeca106725 185 __IO uint8_t PartBlockRead; /*!< Partial blocks for read allowed */
Kojto 122:f9eeca106725 186 __IO uint8_t WrBlockMisalign; /*!< Write block misalignment */
Kojto 122:f9eeca106725 187 __IO uint8_t RdBlockMisalign; /*!< Read block misalignment */
Kojto 122:f9eeca106725 188 __IO uint8_t DSRImpl; /*!< DSR implemented */
Kojto 122:f9eeca106725 189 __IO uint8_t Reserved2; /*!< Reserved */
Kojto 122:f9eeca106725 190 __IO uint32_t DeviceSize; /*!< Device Size */
Kojto 122:f9eeca106725 191 __IO uint8_t MaxRdCurrentVDDMin; /*!< Max. read current @ VDD min */
Kojto 122:f9eeca106725 192 __IO uint8_t MaxRdCurrentVDDMax; /*!< Max. read current @ VDD max */
Kojto 122:f9eeca106725 193 __IO uint8_t MaxWrCurrentVDDMin; /*!< Max. write current @ VDD min */
Kojto 122:f9eeca106725 194 __IO uint8_t MaxWrCurrentVDDMax; /*!< Max. write current @ VDD max */
Kojto 122:f9eeca106725 195 __IO uint8_t DeviceSizeMul; /*!< Device size multiplier */
Kojto 122:f9eeca106725 196 __IO uint8_t EraseGrSize; /*!< Erase group size */
Kojto 122:f9eeca106725 197 __IO uint8_t EraseGrMul; /*!< Erase group size multiplier */
Kojto 122:f9eeca106725 198 __IO uint8_t WrProtectGrSize; /*!< Write protect group size */
Kojto 122:f9eeca106725 199 __IO uint8_t WrProtectGrEnable; /*!< Write protect group enable */
Kojto 122:f9eeca106725 200 __IO uint8_t ManDeflECC; /*!< Manufacturer default ECC */
Kojto 122:f9eeca106725 201 __IO uint8_t WrSpeedFact; /*!< Write speed factor */
Kojto 122:f9eeca106725 202 __IO uint8_t MaxWrBlockLen; /*!< Max. write data block length */
Kojto 122:f9eeca106725 203 __IO uint8_t WriteBlockPaPartial; /*!< Partial blocks for write allowed */
Kojto 122:f9eeca106725 204 __IO uint8_t Reserved3; /*!< Reserved */
Kojto 122:f9eeca106725 205 __IO uint8_t ContentProtectAppli; /*!< Content protection application */
Kojto 122:f9eeca106725 206 __IO uint8_t FileFormatGrouop; /*!< File format group */
Kojto 122:f9eeca106725 207 __IO uint8_t CopyFlag; /*!< Copy flag (OTP) */
Kojto 122:f9eeca106725 208 __IO uint8_t PermWrProtect; /*!< Permanent write protection */
Kojto 122:f9eeca106725 209 __IO uint8_t TempWrProtect; /*!< Temporary write protection */
Kojto 122:f9eeca106725 210 __IO uint8_t FileFormat; /*!< File format */
Kojto 122:f9eeca106725 211 __IO uint8_t ECC; /*!< ECC code */
Kojto 122:f9eeca106725 212 __IO uint8_t CSD_CRC; /*!< CSD CRC */
Kojto 122:f9eeca106725 213 __IO uint8_t Reserved4; /*!< Always 1 */
Kojto 122:f9eeca106725 214
AnnaBridge 145:64910690c574 215 }HAL_SD_CardCSDTypedef;
Kojto 122:f9eeca106725 216 /**
Kojto 122:f9eeca106725 217 * @}
Kojto 122:f9eeca106725 218 */
Kojto 122:f9eeca106725 219
AnnaBridge 145:64910690c574 220 /** @defgroup SD_Exported_Types_Group5 Card Identification Data: CID Register
Kojto 122:f9eeca106725 221 * @{
Kojto 122:f9eeca106725 222 */
Kojto 122:f9eeca106725 223 typedef struct
Kojto 122:f9eeca106725 224 {
Kojto 122:f9eeca106725 225 __IO uint8_t ManufacturerID; /*!< Manufacturer ID */
Kojto 122:f9eeca106725 226 __IO uint16_t OEM_AppliID; /*!< OEM/Application ID */
Kojto 122:f9eeca106725 227 __IO uint32_t ProdName1; /*!< Product Name part1 */
Kojto 122:f9eeca106725 228 __IO uint8_t ProdName2; /*!< Product Name part2 */
Kojto 122:f9eeca106725 229 __IO uint8_t ProdRev; /*!< Product Revision */
Kojto 122:f9eeca106725 230 __IO uint32_t ProdSN; /*!< Product Serial Number */
Kojto 122:f9eeca106725 231 __IO uint8_t Reserved1; /*!< Reserved1 */
Kojto 122:f9eeca106725 232 __IO uint16_t ManufactDate; /*!< Manufacturing Date */
Kojto 122:f9eeca106725 233 __IO uint8_t CID_CRC; /*!< CID CRC */
Kojto 122:f9eeca106725 234 __IO uint8_t Reserved2; /*!< Always 1 */
Kojto 122:f9eeca106725 235
AnnaBridge 145:64910690c574 236 }HAL_SD_CardCIDTypedef;
Kojto 122:f9eeca106725 237 /**
Kojto 122:f9eeca106725 238 * @}
Kojto 122:f9eeca106725 239 */
Kojto 122:f9eeca106725 240
AnnaBridge 145:64910690c574 241 /** @defgroup SD_Exported_Types_Group6 SD Card Status returned by ACMD13
Kojto 122:f9eeca106725 242 * @{
Kojto 122:f9eeca106725 243 */
Kojto 122:f9eeca106725 244 typedef struct
Kojto 122:f9eeca106725 245 {
AnnaBridge 145:64910690c574 246 __IO uint8_t DataBusWidth; /*!< Shows the currently defined data bus width */
AnnaBridge 145:64910690c574 247 __IO uint8_t SecuredMode; /*!< Card is in secured mode of operation */
AnnaBridge 145:64910690c574 248 __IO uint16_t CardType; /*!< Carries information about card type */
AnnaBridge 145:64910690c574 249 __IO uint32_t ProtectedAreaSize; /*!< Carries information about the capacity of protected area */
AnnaBridge 145:64910690c574 250 __IO uint8_t SpeedClass; /*!< Carries information about the speed class of the card */
AnnaBridge 145:64910690c574 251 __IO uint8_t PerformanceMove; /*!< Carries information about the card's performance move */
AnnaBridge 145:64910690c574 252 __IO uint8_t AllocationUnitSize; /*!< Carries information about the card's allocation unit size */
AnnaBridge 145:64910690c574 253 __IO uint16_t EraseSize; /*!< Determines the number of AUs to be erased in one operation */
AnnaBridge 145:64910690c574 254 __IO uint8_t EraseTimeout; /*!< Determines the timeout for any number of AU erase */
AnnaBridge 145:64910690c574 255 __IO uint8_t EraseOffset; /*!< Carries information about the erase offset */
Kojto 122:f9eeca106725 256
Kojto 122:f9eeca106725 257 }HAL_SD_CardStatusTypedef;
Kojto 122:f9eeca106725 258 /**
Kojto 122:f9eeca106725 259 * @}
Kojto 122:f9eeca106725 260 */
Kojto 122:f9eeca106725 261
Kojto 122:f9eeca106725 262 /**
Kojto 122:f9eeca106725 263 * @}
Kojto 122:f9eeca106725 264 */
Kojto 122:f9eeca106725 265
AnnaBridge 145:64910690c574 266 /* Exported constants --------------------------------------------------------*/
AnnaBridge 145:64910690c574 267 /** @defgroup SD_Exported_Constants Exported Constants
Kojto 122:f9eeca106725 268 * @{
Kojto 122:f9eeca106725 269 */
AnnaBridge 145:64910690c574 270
AnnaBridge 145:64910690c574 271 #define BLOCKSIZE ((uint32_t)512U) /*!< Block size is 512 bytes */
Kojto 122:f9eeca106725 272
AnnaBridge 145:64910690c574 273 /** @defgroup SD_Exported_Constansts_Group1 SD Error status enumeration Structure definition
AnnaBridge 145:64910690c574 274 * @{
AnnaBridge 145:64910690c574 275 */
AnnaBridge 145:64910690c574 276 #define HAL_SD_ERROR_NONE SDMMC_ERROR_NONE /*!< No error */
AnnaBridge 145:64910690c574 277 #define HAL_SD_ERROR_CMD_CRC_FAIL SDMMC_ERROR_CMD_CRC_FAIL /*!< Command response received (but CRC check failed) */
AnnaBridge 145:64910690c574 278 #define HAL_SD_ERROR_DATA_CRC_FAIL SDMMC_ERROR_DATA_CRC_FAIL /*!< Data block sent/received (CRC check failed) */
AnnaBridge 145:64910690c574 279 #define HAL_SD_ERROR_CMD_RSP_TIMEOUT SDMMC_ERROR_CMD_RSP_TIMEOUT /*!< Command response timeout */
AnnaBridge 145:64910690c574 280 #define HAL_SD_ERROR_DATA_TIMEOUT SDMMC_ERROR_DATA_TIMEOUT /*!< Data timeout */
AnnaBridge 145:64910690c574 281 #define HAL_SD_ERROR_TX_UNDERRUN SDMMC_ERROR_TX_UNDERRUN /*!< Transmit FIFO underrun */
AnnaBridge 145:64910690c574 282 #define HAL_SD_ERROR_RX_OVERRUN SDMMC_ERROR_RX_OVERRUN /*!< Receive FIFO overrun */
AnnaBridge 145:64910690c574 283 #define HAL_SD_ERROR_ADDR_MISALIGNED SDMMC_ERROR_ADDR_MISALIGNED /*!< Misaligned address */
AnnaBridge 145:64910690c574 284 #define HAL_SD_ERROR_BLOCK_LEN_ERR SDMMC_ERROR_BLOCK_LEN_ERR /*!< Transferred block length is not allowed for the card or the
AnnaBridge 145:64910690c574 285 number of transferred bytes does not match the block length */
AnnaBridge 145:64910690c574 286 #define HAL_SD_ERROR_ERASE_SEQ_ERR SDMMC_ERROR_ERASE_SEQ_ERR /*!< An error in the sequence of erase command occurs */
AnnaBridge 145:64910690c574 287 #define HAL_SD_ERROR_BAD_ERASE_PARAM SDMMC_ERROR_BAD_ERASE_PARAM /*!< An invalid selection for erase groups */
AnnaBridge 145:64910690c574 288 #define HAL_SD_ERROR_WRITE_PROT_VIOLATION SDMMC_ERROR_WRITE_PROT_VIOLATION /*!< Attempt to program a write protect block */
AnnaBridge 145:64910690c574 289 #define HAL_SD_ERROR_LOCK_UNLOCK_FAILED SDMMC_ERROR_LOCK_UNLOCK_FAILED /*!< Sequence or password error has been detected in unlock
AnnaBridge 145:64910690c574 290 command or if there was an attempt to access a locked card */
AnnaBridge 145:64910690c574 291 #define HAL_SD_ERROR_COM_CRC_FAILED SDMMC_ERROR_COM_CRC_FAILED /*!< CRC check of the previous command failed */
AnnaBridge 145:64910690c574 292 #define HAL_SD_ERROR_ILLEGAL_CMD SDMMC_ERROR_ILLEGAL_CMD /*!< Command is not legal for the card state */
AnnaBridge 145:64910690c574 293 #define HAL_SD_ERROR_CARD_ECC_FAILED SDMMC_ERROR_CARD_ECC_FAILED /*!< Card internal ECC was applied but failed to correct the data */
AnnaBridge 145:64910690c574 294 #define HAL_SD_ERROR_CC_ERR SDMMC_ERROR_CC_ERR /*!< Internal card controller error */
AnnaBridge 145:64910690c574 295 #define HAL_SD_ERROR_GENERAL_UNKNOWN_ERR SDMMC_ERROR_GENERAL_UNKNOWN_ERR /*!< General or unknown error */
AnnaBridge 145:64910690c574 296 #define HAL_SD_ERROR_STREAM_READ_UNDERRUN SDMMC_ERROR_STREAM_READ_UNDERRUN /*!< The card could not sustain data reading in stream rmode */
AnnaBridge 145:64910690c574 297 #define HAL_SD_ERROR_STREAM_WRITE_OVERRUN SDMMC_ERROR_STREAM_WRITE_OVERRUN /*!< The card could not sustain data programming in stream mode */
AnnaBridge 145:64910690c574 298 #define HAL_SD_ERROR_CID_CSD_OVERWRITE SDMMC_ERROR_CID_CSD_OVERWRITE /*!< CID/CSD overwrite error */
AnnaBridge 145:64910690c574 299 #define HAL_SD_ERROR_WP_ERASE_SKIP SDMMC_ERROR_WP_ERASE_SKIP /*!< Only partial address space was erased */
AnnaBridge 145:64910690c574 300 #define HAL_SD_ERROR_CARD_ECC_DISABLED SDMMC_ERROR_CARD_ECC_DISABLED /*!< Command has been executed without using internal ECC */
AnnaBridge 145:64910690c574 301 #define HAL_SD_ERROR_ERASE_RESET SDMMC_ERROR_ERASE_RESET /*!< Erase sequence was cleared before executing because an out
AnnaBridge 145:64910690c574 302 of erase sequence command was received */
AnnaBridge 145:64910690c574 303 #define HAL_SD_ERROR_AKE_SEQ_ERR SDMMC_ERROR_AKE_SEQ_ERR /*!< Error in sequence of authentication */
AnnaBridge 145:64910690c574 304 #define HAL_SD_ERROR_INVALID_VOLTRANGE SDMMC_ERROR_INVALID_VOLTRANGE /*!< Error in case of invalid voltage range */
AnnaBridge 145:64910690c574 305 #define HAL_SD_ERROR_ADDR_OUT_OF_RANGE SDMMC_ERROR_ADDR_OUT_OF_RANGE /*!< Error when addressed block is out of range */
AnnaBridge 145:64910690c574 306 #define HAL_SD_ERROR_REQUEST_NOT_APPLICABLE SDMMC_ERROR_REQUEST_NOT_APPLICABLE /*!< Error when command request is not applicable */
AnnaBridge 145:64910690c574 307 #define HAL_SD_ERROR_PARAM SDMMC_ERROR_INVALID_PARAMETER /*!< the used parameter is not valid */
AnnaBridge 145:64910690c574 308 #define HAL_SD_ERROR_UNSUPPORTED_FEATURE SDMMC_ERROR_UNSUPPORTED_FEATURE /*!< Error when feature is not insupported */
AnnaBridge 145:64910690c574 309 #define HAL_SD_ERROR_BUSY SDMMC_ERROR_BUSY /*!< Error when transfer process is busy */
AnnaBridge 145:64910690c574 310 #define HAL_SD_ERROR_DMA SDMMC_ERROR_DMA /*!< Error while DMA transfer */
AnnaBridge 145:64910690c574 311 #define HAL_SD_ERROR_TIMEOUT SDMMC_ERROR_TIMEOUT /*!< Timeout error */
AnnaBridge 145:64910690c574 312
Kojto 122:f9eeca106725 313 /**
Kojto 122:f9eeca106725 314 * @}
Kojto 122:f9eeca106725 315 */
Kojto 122:f9eeca106725 316
AnnaBridge 145:64910690c574 317 /** @defgroup SD_Exported_Constansts_Group2 SD context enumeration
Kojto 122:f9eeca106725 318 * @{
AnnaBridge 145:64910690c574 319 */
AnnaBridge 145:64910690c574 320 #define SD_CONTEXT_NONE ((uint32_t)0x00000000U) /*!< None */
AnnaBridge 145:64910690c574 321 #define SD_CONTEXT_READ_SINGLE_BLOCK ((uint32_t)0x00000001U) /*!< Read single block operation */
AnnaBridge 145:64910690c574 322 #define SD_CONTEXT_READ_MULTIPLE_BLOCK ((uint32_t)0x00000002U) /*!< Read multiple blocks operation */
AnnaBridge 145:64910690c574 323 #define SD_CONTEXT_WRITE_SINGLE_BLOCK ((uint32_t)0x00000010U) /*!< Write single block operation */
AnnaBridge 145:64910690c574 324 #define SD_CONTEXT_WRITE_MULTIPLE_BLOCK ((uint32_t)0x00000020U) /*!< Write multiple blocks operation */
AnnaBridge 145:64910690c574 325 #define SD_CONTEXT_IT ((uint32_t)0x00000008U) /*!< Process in Interrupt mode */
AnnaBridge 145:64910690c574 326 #define SD_CONTEXT_DMA ((uint32_t)0x00000080U) /*!< Process in DMA mode */
Kojto 122:f9eeca106725 327
Kojto 122:f9eeca106725 328 /**
Kojto 122:f9eeca106725 329 * @}
Kojto 122:f9eeca106725 330 */
Kojto 122:f9eeca106725 331
AnnaBridge 145:64910690c574 332 /** @defgroup SD_Exported_Constansts_Group3 SD Supported Memory Cards
Kojto 122:f9eeca106725 333 * @{
Kojto 122:f9eeca106725 334 */
AnnaBridge 145:64910690c574 335 #define CARD_SDSC ((uint32_t)0x00000000U)
AnnaBridge 145:64910690c574 336 #define CARD_SDHC_SDXC ((uint32_t)0x00000001U)
AnnaBridge 145:64910690c574 337 #define CARD_SECURED ((uint32_t)0x00000003U)
AnnaBridge 145:64910690c574 338
AnnaBridge 145:64910690c574 339 /**
AnnaBridge 145:64910690c574 340 * @}
AnnaBridge 145:64910690c574 341 */
Kojto 122:f9eeca106725 342
AnnaBridge 145:64910690c574 343 /** @defgroup SD_Exported_Constansts_Group4 SD Supported Version
AnnaBridge 145:64910690c574 344 * @{
Kojto 122:f9eeca106725 345 */
AnnaBridge 145:64910690c574 346 #define CARD_V1_X ((uint32_t)0x00000000U)
AnnaBridge 145:64910690c574 347 #define CARD_V2_X ((uint32_t)0x00000001U)
AnnaBridge 145:64910690c574 348 /**
AnnaBridge 145:64910690c574 349 * @}
AnnaBridge 145:64910690c574 350 */
Kojto 122:f9eeca106725 351
Kojto 122:f9eeca106725 352 /**
Kojto 122:f9eeca106725 353 * @}
Kojto 122:f9eeca106725 354 */
Kojto 122:f9eeca106725 355
Kojto 122:f9eeca106725 356 /* Exported macro ------------------------------------------------------------*/
Kojto 122:f9eeca106725 357 /** @defgroup SD_Exported_macros SD Exported Macros
Kojto 122:f9eeca106725 358 * @brief macros to handle interrupts and specific clock configurations
Kojto 122:f9eeca106725 359 * @{
Kojto 122:f9eeca106725 360 */
Kojto 122:f9eeca106725 361
Kojto 122:f9eeca106725 362 /**
Kojto 122:f9eeca106725 363 * @brief Enable the SD device.
Kojto 122:f9eeca106725 364 * @retval None
Kojto 122:f9eeca106725 365 */
AnnaBridge 145:64910690c574 366 #define __HAL_SD_ENABLE(__HANDLE__) __SDMMC_ENABLE((__HANDLE__)->Instance)
Kojto 122:f9eeca106725 367
Kojto 122:f9eeca106725 368 /**
Kojto 122:f9eeca106725 369 * @brief Disable the SD device.
Kojto 122:f9eeca106725 370 * @retval None
Kojto 122:f9eeca106725 371 */
AnnaBridge 145:64910690c574 372 #define __HAL_SD_DISABLE(__HANDLE__) __SDMMC_DISABLE((__HANDLE__)->Instance)
Kojto 122:f9eeca106725 373
Kojto 122:f9eeca106725 374 /**
Kojto 122:f9eeca106725 375 * @brief Enable the SDMMC DMA transfer.
Kojto 122:f9eeca106725 376 * @retval None
Kojto 122:f9eeca106725 377 */
AnnaBridge 145:64910690c574 378 #define __HAL_SD_DMA_ENABLE(__HANDLE__) __SDMMC_DMA_ENABLE((__HANDLE__)->Instance)
Kojto 122:f9eeca106725 379
Kojto 122:f9eeca106725 380 /**
Kojto 122:f9eeca106725 381 * @brief Disable the SDMMC DMA transfer.
Kojto 122:f9eeca106725 382 * @retval None
Kojto 122:f9eeca106725 383 */
AnnaBridge 145:64910690c574 384 #define __HAL_SD_DMA_DISABLE(__HANDLE__) __SDMMC_DMA_DISABLE((__HANDLE__)->Instance)
Kojto 122:f9eeca106725 385
Kojto 122:f9eeca106725 386 /**
Kojto 122:f9eeca106725 387 * @brief Enable the SD device interrupt.
Kojto 122:f9eeca106725 388 * @param __HANDLE__: SD Handle
Kojto 122:f9eeca106725 389 * @param __INTERRUPT__: specifies the SDMMC interrupt sources to be enabled.
Kojto 122:f9eeca106725 390 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 391 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 392 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 393 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 394 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 395 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 396 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 397 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 398 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
Kojto 122:f9eeca106725 399 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
Kojto 122:f9eeca106725 400 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
Kojto 122:f9eeca106725 401 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
Kojto 122:f9eeca106725 402 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
Kojto 122:f9eeca106725 403 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
Kojto 122:f9eeca106725 404 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
Kojto 122:f9eeca106725 405 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
AnnaBridge 145:64910690c574 406 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
AnnaBridge 145:64910690c574 407 * @arg SDMMC_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
AnnaBridge 145:64910690c574 408 * @arg SDMMC_IT_DHOLD: Data transfer Hold interrupt
AnnaBridge 145:64910690c574 409 * @arg SDMMC_IT_DABORT: Data transfer aborted by CMD12 interrupt
AnnaBridge 145:64910690c574 410 * @arg SDMMC_IT_BUSYD0END: End of SDMMC_D0 Busy following a CMD response detected interrupt
AnnaBridge 145:64910690c574 411 * @arg SDMMC_IT_ACKFAIL: Boot Acknowledgment received interrupt
AnnaBridge 145:64910690c574 412 * @arg SDMMC_IT_ACKTIMEOUT: Boot Acknowledgment timeout interrupt
AnnaBridge 145:64910690c574 413 * @arg SDMMC_IT_VSWEND: Voltage switch critical timing section completion interrupt
AnnaBridge 145:64910690c574 414 * @arg SDMMC_IT_CKSTOP: SDMMC_CK stopped in Voltage switch procedure interrupt
AnnaBridge 145:64910690c574 415 * @arg SDMMC_IT_IDMABTC: IDMA buffer transfer complete interrupt
AnnaBridge 145:64910690c574 416 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
AnnaBridge 145:64910690c574 417 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
AnnaBridge 145:64910690c574 418 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
AnnaBridge 145:64910690c574 419 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
Kojto 122:f9eeca106725 420 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
Kojto 122:f9eeca106725 421 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
Kojto 122:f9eeca106725 422 * @retval None
Kojto 122:f9eeca106725 423 */
AnnaBridge 145:64910690c574 424 #define __HAL_SD_ENABLE_IT(__HANDLE__, __INTERRUPT__) __SDMMC_ENABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
Kojto 122:f9eeca106725 425
Kojto 122:f9eeca106725 426 /**
Kojto 122:f9eeca106725 427 * @brief Disable the SD device interrupt.
Kojto 122:f9eeca106725 428 * @param __HANDLE__: SD Handle
Kojto 122:f9eeca106725 429 * @param __INTERRUPT__: specifies the SDMMC interrupt sources to be disabled.
Kojto 122:f9eeca106725 430 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 431 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 432 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 433 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 434 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 435 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 436 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 437 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 438 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
Kojto 122:f9eeca106725 439 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
Kojto 122:f9eeca106725 440 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
Kojto 122:f9eeca106725 441 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
Kojto 122:f9eeca106725 442 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
Kojto 122:f9eeca106725 443 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
Kojto 122:f9eeca106725 444 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
Kojto 122:f9eeca106725 445 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
AnnaBridge 145:64910690c574 446 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
AnnaBridge 145:64910690c574 447 * @arg SDMMC_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
AnnaBridge 145:64910690c574 448 * @arg SDMMC_IT_DHOLD: Data transfer Hold interrupt
AnnaBridge 145:64910690c574 449 * @arg SDMMC_IT_DABORT: Data transfer aborted by CMD12 interrupt
AnnaBridge 145:64910690c574 450 * @arg SDMMC_IT_BUSYD0END: End of SDMMC_D0 Busy following a CMD response detected interrupt
AnnaBridge 145:64910690c574 451 * @arg SDMMC_IT_ACKFAIL: Boot Acknowledgment received interrupt
AnnaBridge 145:64910690c574 452 * @arg SDMMC_IT_ACKTIMEOUT: Boot Acknowledgment timeout interrupt
AnnaBridge 145:64910690c574 453 * @arg SDMMC_IT_VSWEND: Voltage switch critical timing section completion interrupt
AnnaBridge 145:64910690c574 454 * @arg SDMMC_IT_CKSTOP: SDMMC_CK stopped in Voltage switch procedure interrupt
AnnaBridge 145:64910690c574 455 * @arg SDMMC_IT_IDMABTC: IDMA buffer transfer complete interrupt
AnnaBridge 145:64910690c574 456 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
AnnaBridge 145:64910690c574 457 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
AnnaBridge 145:64910690c574 458 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
AnnaBridge 145:64910690c574 459 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
Kojto 122:f9eeca106725 460 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
Kojto 122:f9eeca106725 461 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
Kojto 122:f9eeca106725 462 * @retval None
Kojto 122:f9eeca106725 463 */
AnnaBridge 145:64910690c574 464 #define __HAL_SD_DISABLE_IT(__HANDLE__, __INTERRUPT__) __SDMMC_DISABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
Kojto 122:f9eeca106725 465
Kojto 122:f9eeca106725 466 /**
Kojto 122:f9eeca106725 467 * @brief Check whether the specified SD flag is set or not.
Kojto 122:f9eeca106725 468 * @param __HANDLE__: SD Handle
Kojto 122:f9eeca106725 469 * @param __FLAG__: specifies the flag to check.
Kojto 122:f9eeca106725 470 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 471 * @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)
Kojto 122:f9eeca106725 472 * @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
Kojto 122:f9eeca106725 473 * @arg SDMMC_FLAG_CTIMEOUT: Command response timeout
Kojto 122:f9eeca106725 474 * @arg SDMMC_FLAG_DTIMEOUT: Data timeout
Kojto 122:f9eeca106725 475 * @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error
Kojto 122:f9eeca106725 476 * @arg SDMMC_FLAG_RXOVERR: Received FIFO overrun error
Kojto 122:f9eeca106725 477 * @arg SDMMC_FLAG_CMDREND: Command response received (CRC check passed)
Kojto 122:f9eeca106725 478 * @arg SDMMC_FLAG_CMDSENT: Command sent (no response required)
Kojto 122:f9eeca106725 479 * @arg SDMMC_FLAG_DBCKEND: Data block sent/received (CRC check passed)
Kojto 122:f9eeca106725 480 * @arg SDMMC_FLAG_CMDACT: Command transfer in progress
Kojto 122:f9eeca106725 481 * @arg SDMMC_FLAG_TXFIFOHE: Transmit FIFO Half Empty
Kojto 122:f9eeca106725 482 * @arg SDMMC_FLAG_RXFIFOHF: Receive FIFO Half Full
Kojto 122:f9eeca106725 483 * @arg SDMMC_FLAG_TXFIFOF: Transmit FIFO full
Kojto 122:f9eeca106725 484 * @arg SDMMC_FLAG_RXFIFOF: Receive FIFO full
Kojto 122:f9eeca106725 485 * @arg SDMMC_FLAG_TXFIFOE: Transmit FIFO empty
Kojto 122:f9eeca106725 486 * @arg SDMMC_FLAG_RXFIFOE: Receive FIFO empty
AnnaBridge 145:64910690c574 487 * @arg SDMMC_FLAG_SDIOIT: SD I/O interrupt received
AnnaBridge 145:64910690c574 488 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, DATACOUNT, is zero)
AnnaBridge 145:64910690c574 489 * @arg SDMMC_FLAG_DHOLD: Data transfer Hold
AnnaBridge 145:64910690c574 490 * @arg SDMMC_FLAG_DABORT: Data transfer aborted by CMD12
AnnaBridge 145:64910690c574 491 * @arg SDMMC_FLAG_CPSMACT: Command path state machine active
AnnaBridge 145:64910690c574 492 * @arg SDMMC_FLAG_DPSMACT: Data path state machine active
AnnaBridge 145:64910690c574 493 * @arg SDMMC_FLAG_BUSYD0: Inverted value of SDMMC_D0 line (Busy)
AnnaBridge 145:64910690c574 494 * @arg SDMMC_FLAG_BUSYD0END: End of SDMMC_D0 Busy following a CMD response detected
AnnaBridge 145:64910690c574 495 * @arg SDMMC_FLAG_ACKFAIL: Boot Acknowledgment received
AnnaBridge 145:64910690c574 496 * @arg SDMMC_FLAG_ACKTIMEOUT: Boot Acknowledgment timeout
AnnaBridge 145:64910690c574 497 * @arg SDMMC_FLAG_VSWEND: Voltage switch critical timing section completion
AnnaBridge 145:64910690c574 498 * @arg SDMMC_FLAG_CKSTOP: SDMMC_CK stopped in Voltage switch procedure
AnnaBridge 145:64910690c574 499 * @arg SDMMC_FLAG_IDMATE: IDMA transfer error
AnnaBridge 145:64910690c574 500 * @arg SDMMC_FLAG_IDMABTC: IDMA buffer transfer complete
AnnaBridge 145:64910690c574 501 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
AnnaBridge 145:64910690c574 502 * @arg SDMMC_FLAG_TXACT: Data transmit in progress
AnnaBridge 145:64910690c574 503 * @arg SDMMC_FLAG_RXACT: Data receive in progress
Kojto 122:f9eeca106725 504 * @arg SDMMC_FLAG_TXDAVL: Data available in transmit FIFO
Kojto 122:f9eeca106725 505 * @arg SDMMC_FLAG_RXDAVL: Data available in receive FIFO
Kojto 122:f9eeca106725 506 * @retval The new state of SD FLAG (SET or RESET).
Kojto 122:f9eeca106725 507 */
AnnaBridge 145:64910690c574 508 #define __HAL_SD_GET_FLAG(__HANDLE__, __FLAG__) __SDMMC_GET_FLAG((__HANDLE__)->Instance, (__FLAG__))
Kojto 122:f9eeca106725 509
Kojto 122:f9eeca106725 510 /**
Kojto 122:f9eeca106725 511 * @brief Clear the SD's pending flags.
Kojto 122:f9eeca106725 512 * @param __HANDLE__: SD Handle
Kojto 122:f9eeca106725 513 * @param __FLAG__: specifies the flag to clear.
Kojto 122:f9eeca106725 514 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 515 * @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)
Kojto 122:f9eeca106725 516 * @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
Kojto 122:f9eeca106725 517 * @arg SDMMC_FLAG_CTIMEOUT: Command response timeout
Kojto 122:f9eeca106725 518 * @arg SDMMC_FLAG_DTIMEOUT: Data timeout
Kojto 122:f9eeca106725 519 * @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error
Kojto 122:f9eeca106725 520 * @arg SDMMC_FLAG_RXOVERR: Received FIFO overrun error
Kojto 122:f9eeca106725 521 * @arg SDMMC_FLAG_CMDREND: Command response received (CRC check passed)
Kojto 122:f9eeca106725 522 * @arg SDMMC_FLAG_CMDSENT: Command sent (no response required)
Kojto 122:f9eeca106725 523 * @arg SDMMC_FLAG_DBCKEND: Data block sent/received (CRC check passed)
Kojto 122:f9eeca106725 524 * @arg SDMMC_FLAG_SDIOIT: SD I/O interrupt received
AnnaBridge 145:64910690c574 525 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, DATACOUNT, is zero)
AnnaBridge 145:64910690c574 526 * @arg SDMMC_FLAG_DHOLD: Data transfer Hold
AnnaBridge 145:64910690c574 527 * @arg SDMMC_FLAG_DABORT: Data transfer aborted by CMD12
AnnaBridge 145:64910690c574 528 * @arg SDMMC_FLAG_BUSYD0END: End of SDMMC_D0 Busy following a CMD response detected
AnnaBridge 145:64910690c574 529 * @arg SDMMC_FLAG_ACKFAIL: Boot Acknowledgment received
AnnaBridge 145:64910690c574 530 * @arg SDMMC_FLAG_ACKTIMEOUT: Boot Acknowledgment timeout
AnnaBridge 145:64910690c574 531 * @arg SDMMC_FLAG_VSWEND: Voltage switch critical timing section completion
AnnaBridge 145:64910690c574 532 * @arg SDMMC_FLAG_CKSTOP: SDMMC_CK stopped in Voltage switch procedure
AnnaBridge 145:64910690c574 533 * @arg SDMMC_FLAG_IDMATE: IDMA transfer error
AnnaBridge 145:64910690c574 534 * @arg SDMMC_FLAG_IDMABTC: IDMA buffer transfer complete
AnnaBridge 145:64910690c574 535 * @arg SDMMC_FLAG_DATAEND: Data end (data counter, SDIDCOUNT, is zero)
Kojto 122:f9eeca106725 536 * @retval None
Kojto 122:f9eeca106725 537 */
AnnaBridge 145:64910690c574 538 #define __HAL_SD_CLEAR_FLAG(__HANDLE__, __FLAG__) __SDMMC_CLEAR_FLAG((__HANDLE__)->Instance, (__FLAG__))
Kojto 122:f9eeca106725 539
Kojto 122:f9eeca106725 540 /**
Kojto 122:f9eeca106725 541 * @brief Check whether the specified SD interrupt has occurred or not.
Kojto 122:f9eeca106725 542 * @param __HANDLE__: SD Handle
Kojto 122:f9eeca106725 543 * @param __INTERRUPT__: specifies the SDMMC interrupt source to check.
Kojto 122:f9eeca106725 544 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 545 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 546 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 547 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 548 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 549 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 550 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 551 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 552 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
Kojto 122:f9eeca106725 553 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
Kojto 122:f9eeca106725 554 * @arg SDMMC_IT_CMDACT: Command transfer in progress interrupt
Kojto 122:f9eeca106725 555 * @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
Kojto 122:f9eeca106725 556 * @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt
Kojto 122:f9eeca106725 557 * @arg SDMMC_IT_TXFIFOF: Transmit FIFO full interrupt
Kojto 122:f9eeca106725 558 * @arg SDMMC_IT_RXFIFOF: Receive FIFO full interrupt
Kojto 122:f9eeca106725 559 * @arg SDMMC_IT_TXFIFOE: Transmit FIFO empty interrupt
Kojto 122:f9eeca106725 560 * @arg SDMMC_IT_RXFIFOE: Receive FIFO empty interrupt
AnnaBridge 145:64910690c574 561 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
AnnaBridge 145:64910690c574 562 * @arg SDMMC_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
AnnaBridge 145:64910690c574 563 * @arg SDMMC_IT_DHOLD: Data transfer Hold interrupt
AnnaBridge 145:64910690c574 564 * @arg SDMMC_IT_DABORT: Data transfer aborted by CMD12 interrupt
AnnaBridge 145:64910690c574 565 * @arg SDMMC_IT_DPSMACT: Data path state machine active interrupt
AnnaBridge 145:64910690c574 566 * @arg SDMMC_IT_CPSMACT: Command path state machine active interrupt
AnnaBridge 145:64910690c574 567 * @arg SDMMC_IT_BUSYD0: Inverted value of SDMMC_D0 line (Busy)
AnnaBridge 145:64910690c574 568 * @arg SDMMC_IT_BUSYD0END: End of SDMMC_D0 Busy following a CMD response detected interrupt
AnnaBridge 145:64910690c574 569 * @arg SDMMC_IT_ACKFAIL: Boot Acknowledgment received interrupt
AnnaBridge 145:64910690c574 570 * @arg SDMMC_IT_ACKTIMEOUT: Boot Acknowledgment timeout interrupt
AnnaBridge 145:64910690c574 571 * @arg SDMMC_IT_VSWEND: Voltage switch critical timing section completion interrupt
AnnaBridge 145:64910690c574 572 * @arg SDMMC_IT_CKSTOP: SDMMC_CK stopped in Voltage switch procedure interrupt
AnnaBridge 145:64910690c574 573 * @arg SDMMC_IT_IDMATE: IDMA transfer error interrupt
AnnaBridge 145:64910690c574 574 * @arg SDMMC_IT_IDMABTC: IDMA buffer transfer complete interrupt
AnnaBridge 145:64910690c574 575 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDIDCOUNT, is zero) interrupt
AnnaBridge 145:64910690c574 576 * @arg SDMMC_IT_TXACT: Data transmit in progress interrupt
AnnaBridge 145:64910690c574 577 * @arg SDMMC_IT_RXACT: Data receive in progress interrupt
Kojto 122:f9eeca106725 578 * @arg SDMMC_IT_TXDAVL: Data available in transmit FIFO interrupt
Kojto 122:f9eeca106725 579 * @arg SDMMC_IT_RXDAVL: Data available in receive FIFO interrupt
Kojto 122:f9eeca106725 580 * @retval The new state of SD IT (SET or RESET).
Kojto 122:f9eeca106725 581 */
AnnaBridge 145:64910690c574 582 #define __HAL_SD_GET_IT(__HANDLE__, __INTERRUPT__) __SDMMC_GET_IT((__HANDLE__)->Instance, (__INTERRUPT__))
Kojto 122:f9eeca106725 583
Kojto 122:f9eeca106725 584 /**
Kojto 122:f9eeca106725 585 * @brief Clear the SD's interrupt pending bits.
Kojto 122:f9eeca106725 586 * @param __HANDLE__: SD Handle
Kojto 122:f9eeca106725 587 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
Kojto 122:f9eeca106725 588 * This parameter can be one or a combination of the following values:
Kojto 122:f9eeca106725 589 * @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
Kojto 122:f9eeca106725 590 * @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
Kojto 122:f9eeca106725 591 * @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt
Kojto 122:f9eeca106725 592 * @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt
Kojto 122:f9eeca106725 593 * @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt
Kojto 122:f9eeca106725 594 * @arg SDMMC_IT_RXOVERR: Received FIFO overrun error interrupt
Kojto 122:f9eeca106725 595 * @arg SDMMC_IT_CMDREND: Command response received (CRC check passed) interrupt
Kojto 122:f9eeca106725 596 * @arg SDMMC_IT_CMDSENT: Command sent (no response required) interrupt
AnnaBridge 145:64910690c574 597 * @arg SDMMC_IT_SDIOIT: SD I/O interrupt received interrupt
AnnaBridge 145:64910690c574 598 * @arg SDMMC_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
AnnaBridge 145:64910690c574 599 * @arg SDMMC_IT_DHOLD: Data transfer Hold interrupt
AnnaBridge 145:64910690c574 600 * @arg SDMMC_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
AnnaBridge 145:64910690c574 601 * @arg SDMMC_IT_DABORT: Data transfer aborted by CMD12 interrupt
AnnaBridge 145:64910690c574 602 * @arg SDMMC_IT_BUSYD0END: End of SDMMC_D0 Busy following a CMD response detected interrupt
AnnaBridge 145:64910690c574 603 * @arg SDMMC_IT_ACKFAIL: Boot Acknowledgment received interrupt
AnnaBridge 145:64910690c574 604 * @arg SDMMC_IT_ACKTIMEOUT: Boot Acknowledgment timeout interrupt
AnnaBridge 145:64910690c574 605 * @arg SDMMC_IT_VSWEND: Voltage switch critical timing section completion interrupt
AnnaBridge 145:64910690c574 606 * @arg SDMMC_IT_CKSTOP: SDMMC_CK stopped in Voltage switch procedure interrupt
AnnaBridge 145:64910690c574 607 * @arg SDMMC_IT_IDMATE: IDMA transfer error interrupt
AnnaBridge 145:64910690c574 608 * @arg SDMMC_IT_IDMABTC: IDMA buffer transfer complete interrupt
Kojto 122:f9eeca106725 609 * @arg SDMMC_IT_DATAEND: Data end (data counter, SDMMC_DCOUNT, is zero) interrupt
Kojto 122:f9eeca106725 610 * @retval None
Kojto 122:f9eeca106725 611 */
AnnaBridge 145:64910690c574 612 #define __HAL_SD_CLEAR_IT(__HANDLE__, __INTERRUPT__) __SDMMC_CLEAR_IT((__HANDLE__)->Instance, (__INTERRUPT__))
AnnaBridge 145:64910690c574 613
Kojto 122:f9eeca106725 614 /**
Kojto 122:f9eeca106725 615 * @}
Kojto 122:f9eeca106725 616 */
Kojto 122:f9eeca106725 617
Kojto 122:f9eeca106725 618 /* Exported functions --------------------------------------------------------*/
Kojto 122:f9eeca106725 619 /** @defgroup SD_Exported_Functions SD Exported Functions
Kojto 122:f9eeca106725 620 * @{
Kojto 122:f9eeca106725 621 */
Kojto 122:f9eeca106725 622
Kojto 122:f9eeca106725 623 /** @defgroup SD_Exported_Functions_Group1 Initialization and de-initialization functions
Kojto 122:f9eeca106725 624 * @{
Kojto 122:f9eeca106725 625 */
AnnaBridge 145:64910690c574 626 HAL_StatusTypeDef HAL_SD_Init (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 627 HAL_StatusTypeDef HAL_SD_InitCard (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 628 HAL_StatusTypeDef HAL_SD_DeInit (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 629 void HAL_SD_MspInit (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 630 void HAL_SD_MspDeInit(SD_HandleTypeDef *hsd);
Kojto 122:f9eeca106725 631 /**
Kojto 122:f9eeca106725 632 * @}
Kojto 122:f9eeca106725 633 */
Kojto 122:f9eeca106725 634
Kojto 122:f9eeca106725 635 /** @defgroup SD_Exported_Functions_Group2 Input and Output operation functions
Kojto 122:f9eeca106725 636 * @{
Kojto 122:f9eeca106725 637 */
Kojto 122:f9eeca106725 638 /* Blocking mode: Polling */
AnnaBridge 145:64910690c574 639 HAL_StatusTypeDef HAL_SD_ReadBlocks (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout);
AnnaBridge 145:64910690c574 640 HAL_StatusTypeDef HAL_SD_WriteBlocks (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout);
AnnaBridge 145:64910690c574 641 HAL_StatusTypeDef HAL_SD_Erase (SD_HandleTypeDef *hsd, uint32_t BlockStartAdd, uint32_t BlockEndAdd);
AnnaBridge 145:64910690c574 642 /* Non-Blocking mode: IT */
AnnaBridge 145:64910690c574 643 HAL_StatusTypeDef HAL_SD_ReadBlocks_IT (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
AnnaBridge 145:64910690c574 644 HAL_StatusTypeDef HAL_SD_WriteBlocks_IT (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
AnnaBridge 145:64910690c574 645 /* Non-Blocking mode: DMA */
AnnaBridge 145:64910690c574 646 HAL_StatusTypeDef HAL_SD_ReadBlocks_DMA (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
AnnaBridge 145:64910690c574 647 HAL_StatusTypeDef HAL_SD_WriteBlocks_DMA(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
Kojto 122:f9eeca106725 648
AnnaBridge 145:64910690c574 649 void HAL_SD_IRQHandler (SD_HandleTypeDef *hsd);
Kojto 122:f9eeca106725 650
Kojto 122:f9eeca106725 651 /* Callback in non blocking modes (DMA) */
AnnaBridge 145:64910690c574 652 void HAL_SD_TxCpltCallback (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 653 void HAL_SD_RxCpltCallback (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 654 void HAL_SD_ErrorCallback (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 655 void HAL_SD_AbortCallback (SD_HandleTypeDef *hsd);
Kojto 122:f9eeca106725 656
Kojto 122:f9eeca106725 657 /**
Kojto 122:f9eeca106725 658 * @}
Kojto 122:f9eeca106725 659 */
Kojto 122:f9eeca106725 660
Kojto 122:f9eeca106725 661 /** @defgroup SD_Exported_Functions_Group3 Peripheral Control functions
Kojto 122:f9eeca106725 662 * @{
Kojto 122:f9eeca106725 663 */
AnnaBridge 145:64910690c574 664 HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation(SD_HandleTypeDef *hsd, uint32_t WideMode);
Kojto 122:f9eeca106725 665 /**
Kojto 122:f9eeca106725 666 * @}
Kojto 122:f9eeca106725 667 */
Kojto 122:f9eeca106725 668
AnnaBridge 145:64910690c574 669 /** @defgroup SD_Exported_Functions_Group4 SD card related functions
Kojto 122:f9eeca106725 670 * @{
Kojto 122:f9eeca106725 671 */
AnnaBridge 145:64910690c574 672 HAL_StatusTypeDef HAL_SD_SendSDStatus (SD_HandleTypeDef *hsd, uint32_t *pSDstatus);
AnnaBridge 145:64910690c574 673 HAL_SD_CardStateTypedef HAL_SD_GetCardState (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 674 HAL_StatusTypeDef HAL_SD_GetCardCID (SD_HandleTypeDef *hsd, HAL_SD_CardCIDTypedef *pCID);
AnnaBridge 145:64910690c574 675 HAL_StatusTypeDef HAL_SD_GetCardCSD (SD_HandleTypeDef *hsd, HAL_SD_CardCSDTypedef *pCSD);
AnnaBridge 145:64910690c574 676 HAL_StatusTypeDef HAL_SD_GetCardStatus(SD_HandleTypeDef *hsd, HAL_SD_CardStatusTypedef *pStatus);
AnnaBridge 145:64910690c574 677 HAL_StatusTypeDef HAL_SD_GetCardInfo (SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypeDef *pCardInfo);
AnnaBridge 145:64910690c574 678 /**
AnnaBridge 145:64910690c574 679 * @}
AnnaBridge 145:64910690c574 680 */
AnnaBridge 145:64910690c574 681
AnnaBridge 145:64910690c574 682 /** @defgroup SD_Exported_Functions_Group5 Peripheral State and Errors functions
AnnaBridge 145:64910690c574 683 * @{
AnnaBridge 145:64910690c574 684 */
AnnaBridge 145:64910690c574 685 HAL_SD_StateTypeDef HAL_SD_GetState(SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 686 uint32_t HAL_SD_GetError(SD_HandleTypeDef *hsd);
Kojto 122:f9eeca106725 687 /**
Kojto 122:f9eeca106725 688 * @}
Kojto 122:f9eeca106725 689 */
Kojto 122:f9eeca106725 690
AnnaBridge 145:64910690c574 691 /** @defgroup SD_Exported_Functions_Group6 Perioheral Abort management
AnnaBridge 145:64910690c574 692 * @{
AnnaBridge 145:64910690c574 693 */
AnnaBridge 145:64910690c574 694 HAL_StatusTypeDef HAL_SD_Abort (SD_HandleTypeDef *hsd);
AnnaBridge 145:64910690c574 695 HAL_StatusTypeDef HAL_SD_Abort_IT(SD_HandleTypeDef *hsd);
Kojto 122:f9eeca106725 696 /**
Kojto 122:f9eeca106725 697 * @}
Kojto 122:f9eeca106725 698 */
Kojto 122:f9eeca106725 699
Kojto 122:f9eeca106725 700 /* Private types -------------------------------------------------------------*/
Kojto 122:f9eeca106725 701 /** @defgroup SD_Private_Types SD Private Types
Kojto 122:f9eeca106725 702 * @{
Kojto 122:f9eeca106725 703 */
Kojto 122:f9eeca106725 704
Kojto 122:f9eeca106725 705 /**
Kojto 122:f9eeca106725 706 * @}
Kojto 122:f9eeca106725 707 */
Kojto 122:f9eeca106725 708
Kojto 122:f9eeca106725 709 /* Private defines -----------------------------------------------------------*/
Kojto 122:f9eeca106725 710 /** @defgroup SD_Private_Defines SD Private Defines
Kojto 122:f9eeca106725 711 * @{
Kojto 122:f9eeca106725 712 */
Kojto 122:f9eeca106725 713
Kojto 122:f9eeca106725 714 /**
Kojto 122:f9eeca106725 715 * @}
Kojto 122:f9eeca106725 716 */
Kojto 122:f9eeca106725 717
Kojto 122:f9eeca106725 718 /* Private variables ---------------------------------------------------------*/
Kojto 122:f9eeca106725 719 /** @defgroup SD_Private_Variables SD Private Variables
Kojto 122:f9eeca106725 720 * @{
Kojto 122:f9eeca106725 721 */
Kojto 122:f9eeca106725 722
Kojto 122:f9eeca106725 723 /**
Kojto 122:f9eeca106725 724 * @}
Kojto 122:f9eeca106725 725 */
Kojto 122:f9eeca106725 726
Kojto 122:f9eeca106725 727 /* Private constants ---------------------------------------------------------*/
Kojto 122:f9eeca106725 728 /** @defgroup SD_Private_Constants SD Private Constants
Kojto 122:f9eeca106725 729 * @{
Kojto 122:f9eeca106725 730 */
Kojto 122:f9eeca106725 731
Kojto 122:f9eeca106725 732 /**
Kojto 122:f9eeca106725 733 * @}
Kojto 122:f9eeca106725 734 */
Kojto 122:f9eeca106725 735
Kojto 122:f9eeca106725 736 /* Private macros ------------------------------------------------------------*/
Kojto 122:f9eeca106725 737 /** @defgroup SD_Private_Macros SD Private Macros
Kojto 122:f9eeca106725 738 * @{
Kojto 122:f9eeca106725 739 */
Kojto 122:f9eeca106725 740
Kojto 122:f9eeca106725 741 /**
Kojto 122:f9eeca106725 742 * @}
Kojto 122:f9eeca106725 743 */
Kojto 122:f9eeca106725 744
Kojto 122:f9eeca106725 745 /* Private functions prototypes ----------------------------------------------*/
Kojto 122:f9eeca106725 746 /** @defgroup SD_Private_Functions_Prototypes SD Private Functions Prototypes
Kojto 122:f9eeca106725 747 * @{
Kojto 122:f9eeca106725 748 */
Kojto 122:f9eeca106725 749
Kojto 122:f9eeca106725 750 /**
Kojto 122:f9eeca106725 751 * @}
Kojto 122:f9eeca106725 752 */
Kojto 122:f9eeca106725 753
Kojto 122:f9eeca106725 754 /* Private functions ---------------------------------------------------------*/
Kojto 122:f9eeca106725 755 /** @defgroup SD_Private_Functions SD Private Functions
Kojto 122:f9eeca106725 756 * @{
Kojto 122:f9eeca106725 757 */
Kojto 122:f9eeca106725 758
Kojto 122:f9eeca106725 759 /**
Kojto 122:f9eeca106725 760 * @}
Kojto 122:f9eeca106725 761 */
Kojto 122:f9eeca106725 762
AnnaBridge 145:64910690c574 763
AnnaBridge 145:64910690c574 764 /**
AnnaBridge 145:64910690c574 765 * @}
AnnaBridge 145:64910690c574 766 */
AnnaBridge 145:64910690c574 767
Kojto 122:f9eeca106725 768 /**
Kojto 122:f9eeca106725 769 * @}
Kojto 122:f9eeca106725 770 */
Kojto 122:f9eeca106725 771
Kojto 122:f9eeca106725 772 /**
Kojto 122:f9eeca106725 773 * @}
Kojto 122:f9eeca106725 774 */
Kojto 122:f9eeca106725 775
Kojto 122:f9eeca106725 776 #endif /* SDMMC1 */
Kojto 122:f9eeca106725 777
Kojto 122:f9eeca106725 778 #ifdef __cplusplus
Kojto 122:f9eeca106725 779 }
Kojto 122:f9eeca106725 780 #endif
Kojto 122:f9eeca106725 781
Kojto 122:f9eeca106725 782
Kojto 122:f9eeca106725 783 #endif /* __STM32L4xx_HAL_SD_H */
Kojto 122:f9eeca106725 784
Kojto 122:f9eeca106725 785 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/