cc y / mbed

Fork of mbed by mbed official

Committer:
Kojto
Date:
Fri Oct 02 07:35:07 2015 +0200
Revision:
108:34e6b704fe68
Child:
110:165afa46840b
Release 108  of the mbed library

Changes:
- new platforms - ELMO_F411RE, WIZNET_7500P, ARM_MPS2_BEID
- EFM32 - bugfixes in rtc, serial
- Cortex A cmsis - update files
- STML4 - RAM fixes

Who changed what in which revision?

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