mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Committer:
yusuke_kyo
Date:
Wed Apr 08 08:04:18 2015 +0000
Revision:
98:01a414ca7d6d
Parent:
93:e188a91d3eaa
remove SerialHalfDuplex.h

Who changed what in which revision?

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