L4 HAL Drivers

Committer:
EricLew
Date:
Mon Nov 02 19:37:23 2015 +0000
Revision:
0:80ee8f3b695e
Errors are with definitions of LCD and QSPI functions. I believe all .h and .c files are  uploaded, but there may need to be certain functions called.

Who changed what in which revision?

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