mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
107:4f6c30876dfa
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

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