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