STM32L486xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l4xx_hal_sd_ex.c 00004 * @author MCD Application Team 00005 * @brief SD card Extended HAL module driver. 00006 * This file provides firmware functions to manage the following 00007 * functionalities of the Secure Digital (SD) peripheral: 00008 * + Extended features functions 00009 * 00010 @verbatim 00011 ============================================================================== 00012 ##### How to use this driver ##### 00013 ============================================================================== 00014 [..] 00015 The SD Extension HAL driver can be used as follows: 00016 (+) Set card in High Speed mode using HAL_SDEx_HighSpeed() function. 00017 (+) Configure Buffer0 and Buffer1 start address and Buffer size using HAL_SDEx_ConfigDMAMultiBuffer() function. 00018 (+) Start Read and Write for multibuffer mode using HAL_SDEx_ReadBlocksDMAMultiBuffer() and HAL_SDEx_WriteBlocksDMAMultiBuffer() functions. 00019 00020 @endverbatim 00021 ****************************************************************************** 00022 * @attention 00023 * 00024 * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> 00025 * 00026 * Redistribution and use in source and binary forms, with or without modification, 00027 * are permitted provided that the following conditions are met: 00028 * 1. Redistributions of source code must retain the above copyright notice, 00029 * this list of conditions and the following disclaimer. 00030 * 2. Redistributions in binary form must reproduce the above copyright notice, 00031 * this list of conditions and the following disclaimer in the documentation 00032 * and/or other materials provided with the distribution. 00033 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00034 * may be used to endorse or promote products derived from this software 00035 * without specific prior written permission. 00036 * 00037 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00038 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00039 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00040 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00041 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00042 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00043 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00044 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00045 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00046 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00047 * 00048 ****************************************************************************** 00049 */ 00050 00051 /* Includes ------------------------------------------------------------------*/ 00052 #include "stm32l4xx_hal.h" 00053 00054 #if defined(STM32L4R5xx) || defined(STM32L4R7xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx) 00055 00056 /** @addtogroup STM32L4xx_HAL_Driver 00057 * @{ 00058 */ 00059 00060 /** @defgroup SDEx SDEx 00061 * @brief SD HAL extended module driver 00062 * @{ 00063 */ 00064 00065 #ifdef HAL_SD_MODULE_ENABLED 00066 00067 /* Private typedef -----------------------------------------------------------*/ 00068 /* Private define ------------------------------------------------------------*/ 00069 /* Private macro -------------------------------------------------------------*/ 00070 /* Private variables ---------------------------------------------------------*/ 00071 /* Private function prototypes -----------------------------------------------*/ 00072 /* Private functions ---------------------------------------------------------*/ 00073 /* Exported functions --------------------------------------------------------*/ 00074 /** @addtogroup SDEx_Exported_Functions 00075 * @{ 00076 */ 00077 00078 /** @addtogroup SDEx_Exported_Functions_Group1 00079 * @brief High Speed function 00080 * 00081 @verbatim 00082 ============================================================================== 00083 ##### High Speed function ##### 00084 ============================================================================== 00085 [..] 00086 This section provides function allowing to configure the card in High Speed mode. 00087 00088 @endverbatim 00089 * @{ 00090 */ 00091 00092 /** 00093 * @brief Switches the SD card to High Speed mode. 00094 * This API must be used after "Transfer State" 00095 * @note This operation should be followed by the configuration 00096 * of PLL to have SDMMCCK clock between 50 and 120 MHz 00097 * @param hsd: SD handle 00098 * @retval SD Card error state 00099 */ 00100 uint32_t HAL_SDEx_HighSpeed(SD_HandleTypeDef *hsd) 00101 { 00102 uint32_t errorstate = HAL_SD_ERROR_NONE; 00103 SDMMC_DataInitTypeDef sdmmc_datainitstructure; 00104 uint8_t SD_hs[64] = {0}; 00105 uint8_t *tempbuff = SD_hs; 00106 uint32_t count, data; 00107 uint32_t Timeout = HAL_GetTick(); 00108 00109 if(hsd->SdCard.CardSpeed == CARD_NORMAL_SPEED) 00110 { 00111 /* Standard Speed Card <= 12.5Mhz */ 00112 return HAL_SD_ERROR_REQUEST_NOT_APPLICABLE; 00113 } 00114 00115 if((hsd->SdCard.CardSpeed == CARD_ULTRA_HIGH_SPEED) && 00116 (hsd->Init.Transceiver == SDMMC_TRANSCEIVER_ENABLE)) 00117 { 00118 /* Initialize the Data control register */ 00119 hsd->Instance->DCTRL = 0; 00120 errorstate = SDMMC_CmdBlockLength(hsd->Instance, 64); 00121 00122 if (errorstate != HAL_SD_ERROR_NONE) 00123 { 00124 return errorstate; 00125 } 00126 00127 /* Configure the SD DPSM (Data Path State Machine) */ 00128 sdmmc_datainitstructure.DataTimeOut = SDMMC_DATATIMEOUT; 00129 sdmmc_datainitstructure.DataLength = 64; 00130 sdmmc_datainitstructure.DataBlockSize = SDMMC_DATABLOCK_SIZE_64B ; 00131 sdmmc_datainitstructure.TransferDir = SDMMC_TRANSFER_DIR_TO_SDMMC; 00132 sdmmc_datainitstructure.TransferMode = SDMMC_TRANSFER_MODE_BLOCK; 00133 sdmmc_datainitstructure.DPSM = SDMMC_DPSM_ENABLE; 00134 (void)SDMMC_ConfigData(hsd->Instance, &sdmmc_datainitstructure); 00135 00136 errorstate = SDMMC_CmdSwitch(hsd->Instance, SDMMC_SDR25_SWITCH_PATTERN); 00137 if(errorstate != HAL_SD_ERROR_NONE) 00138 { 00139 return errorstate; 00140 } 00141 00142 while(!__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXOVERR | SDMMC_FLAG_DCRCFAIL | SDMMC_FLAG_DTIMEOUT | SDMMC_FLAG_DBCKEND| SDMMC_FLAG_DATAEND )) 00143 { 00144 if (__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXFIFOHF)) 00145 { 00146 for (count = 0U; count < 8U; count++) 00147 { 00148 data = SDMMC_ReadFIFO(hsd->Instance); 00149 *tempbuff = (uint8_t)(data & 0xFFU); 00150 tempbuff++; 00151 *tempbuff = (uint8_t)((data >> 8U) & 0xFFU); 00152 tempbuff++; 00153 *tempbuff = (uint8_t)((data >> 16U) & 0xFFU); 00154 tempbuff++; 00155 *tempbuff = (uint8_t)((data >> 24U) & 0xFFU); 00156 tempbuff++; 00157 } 00158 } 00159 00160 if((HAL_GetTick()-Timeout) >= SDMMC_DATATIMEOUT) 00161 { 00162 hsd->ErrorCode = HAL_SD_ERROR_TIMEOUT; 00163 hsd->State= HAL_SD_STATE_READY; 00164 return HAL_SD_ERROR_TIMEOUT; 00165 } 00166 } 00167 00168 if (__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_DTIMEOUT)) 00169 { 00170 __HAL_SD_CLEAR_FLAG(hsd, SDMMC_FLAG_DTIMEOUT); 00171 00172 errorstate = 0; 00173 00174 return errorstate; 00175 } 00176 else if (__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_DCRCFAIL)) 00177 { 00178 __HAL_SD_CLEAR_FLAG(hsd, SDMMC_FLAG_DCRCFAIL); 00179 00180 errorstate = SDMMC_ERROR_DATA_CRC_FAIL; 00181 00182 return errorstate; 00183 } 00184 else if (__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXOVERR)) 00185 { 00186 __HAL_SD_CLEAR_FLAG(hsd, SDMMC_FLAG_RXOVERR); 00187 00188 errorstate = SDMMC_ERROR_RX_OVERRUN; 00189 00190 return errorstate; 00191 } 00192 else 00193 { 00194 /* No error flag set */ 00195 } 00196 00197 /* Clear all the static flags */ 00198 __HAL_SD_CLEAR_FLAG(hsd, SDMMC_STATIC_DATA_FLAGS); 00199 00200 /* Test if the switch mode HS is ok */ 00201 if ((SD_hs[13U] & 2U) == 0U) 00202 { 00203 errorstate = SDMMC_ERROR_UNSUPPORTED_FEATURE; 00204 return errorstate; 00205 } 00206 else 00207 { 00208 #if (USE_HAL_SD_REGISTER_CALLBACKS == 1) 00209 hsd->DriveTransceiver_1_8V_Callback(SET); 00210 #else 00211 HAL_SDEx_DriveTransceiver_1_8V_Callback(SET); 00212 #endif 00213 } 00214 00215 /* Set Block Size for Card */ 00216 errorstate = SDMMC_CmdBlockLength(hsd->Instance, BLOCKSIZE); 00217 if(errorstate != HAL_SD_ERROR_NONE) 00218 { 00219 hsd->State = HAL_SD_STATE_READY; 00220 hsd->ErrorCode |= errorstate; 00221 return errorstate; 00222 } 00223 } 00224 00225 return errorstate; 00226 } 00227 00228 /** 00229 * @brief Enable/Disable the SD Transceiver 1.8V Mode Callback. 00230 * @param status: Voltage Switch State 00231 * @retval None 00232 */ 00233 __weak void HAL_SDEx_DriveTransceiver_1_8V_Callback(FlagStatus status) 00234 { 00235 /* Prevent unused argument(s) compilation warning */ 00236 UNUSED(status); 00237 00238 /* NOTE : This function Should not be modified, when the callback is needed, 00239 the HAL_SD_EnableTransciver could be implemented in the user file 00240 */ 00241 } 00242 00243 /** 00244 * @} 00245 */ 00246 00247 /** @addtogroup SDEx_Exported_Functions_Group2 00248 * @brief Multibuffer functions 00249 * 00250 @verbatim 00251 ============================================================================== 00252 ##### Multibuffer functions ##### 00253 ============================================================================== 00254 [..] 00255 This section provides functions allowing to configure the multibuffer mode and start read and write 00256 multibuffer mode for SD HAL driver. 00257 00258 @endverbatim 00259 * @{ 00260 */ 00261 00262 /** 00263 * @brief Configure DMA Dual Buffer mode. The Data transfer is managed by an Internal DMA. 00264 * @param hsd: SD handle 00265 * @param pDataBuffer0: Pointer to the buffer0 that will contain/receive the transfered data 00266 * @param pDataBuffer1: Pointer to the buffer1 that will contain/receive the transfered data 00267 * @param BufferSize: Size of Buffer0 in Blocks. Buffer0 and Buffer1 must have the same size. 00268 * @retval HAL status 00269 */ 00270 HAL_StatusTypeDef HAL_SDEx_ConfigDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t *pDataBuffer0, uint32_t *pDataBuffer1, uint32_t BufferSize) 00271 { 00272 if(hsd->State == HAL_SD_STATE_READY) 00273 { 00274 hsd->Instance->IDMABASE0 = (uint32_t) pDataBuffer0; 00275 hsd->Instance->IDMABASE1 = (uint32_t) pDataBuffer1; 00276 hsd->Instance->IDMABSIZE = (uint32_t) (BLOCKSIZE * BufferSize); 00277 00278 return HAL_OK; 00279 } 00280 else 00281 { 00282 return HAL_BUSY; 00283 } 00284 } 00285 00286 /** 00287 * @brief Reads block(s) from a specified address in a card. The received Data will be stored in Buffer0 and Buffer1. 00288 * Buffer0, Buffer1 and BufferSize need to be configured by function HAL_SDEx_ConfigDMAMultiBuffer before call this function. 00289 * @param hsd: SD handle 00290 * @param BlockAdd: Block Address from where data is to be read 00291 * @param NumberOfBlocks: Total number of blocks to read 00292 * @retval HAL status 00293 */ 00294 HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks) 00295 { 00296 SDMMC_DataInitTypeDef config; 00297 uint32_t errorstate; 00298 uint32_t DmaBase0_reg, DmaBase1_reg; 00299 uint32_t add = BlockAdd; 00300 00301 if(hsd->State == HAL_SD_STATE_READY) 00302 { 00303 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) 00304 { 00305 hsd->ErrorCode |= HAL_SD_ERROR_ADDR_OUT_OF_RANGE; 00306 return HAL_ERROR; 00307 } 00308 00309 DmaBase0_reg = hsd->Instance->IDMABASE0; 00310 DmaBase1_reg = hsd->Instance->IDMABASE1; 00311 if ((hsd->Instance->IDMABSIZE == 0U) || (DmaBase0_reg == 0U) || (DmaBase1_reg == 0U)) 00312 { 00313 hsd->ErrorCode = HAL_SD_ERROR_ADDR_OUT_OF_RANGE; 00314 return HAL_ERROR; 00315 } 00316 00317 /* Initialize data control register */ 00318 hsd->Instance->DCTRL = 0; 00319 00320 hsd->ErrorCode = HAL_SD_ERROR_NONE; 00321 hsd->State = HAL_SD_STATE_BUSY; 00322 00323 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) 00324 { 00325 add *= 512U; 00326 } 00327 00328 /* Configure the SD DPSM (Data Path State Machine) */ 00329 config.DataTimeOut = SDMMC_DATATIMEOUT; 00330 config.DataLength = BLOCKSIZE * NumberOfBlocks; 00331 config.DataBlockSize = SDMMC_DATABLOCK_SIZE_512B; 00332 config.TransferDir = SDMMC_TRANSFER_DIR_TO_SDMMC; 00333 config.TransferMode = SDMMC_TRANSFER_MODE_BLOCK; 00334 config.DPSM = SDMMC_DPSM_DISABLE; 00335 (void)SDMMC_ConfigData(hsd->Instance, &config); 00336 00337 hsd->Instance->DCTRL |= SDMMC_DCTRL_FIFORST; 00338 00339 /* Set Block Size for Card */ 00340 errorstate = SDMMC_CmdBlockLength(hsd->Instance, BLOCKSIZE); 00341 if(errorstate != HAL_SD_ERROR_NONE) 00342 { 00343 hsd->State = HAL_SD_STATE_READY; 00344 hsd->ErrorCode |= errorstate; 00345 return HAL_ERROR; 00346 } 00347 00348 __SDMMC_CMDTRANS_ENABLE( hsd->Instance); 00349 00350 hsd->Instance->IDMACTRL = SDMMC_ENABLE_IDMA_DOUBLE_BUFF0; 00351 00352 __HAL_SD_ENABLE_IT(hsd, (SDMMC_IT_DCRCFAIL | SDMMC_IT_DTIMEOUT | SDMMC_IT_RXOVERR | SDMMC_IT_DATAEND | SDMMC_IT_IDMABTC)); 00353 00354 /* Read Blocks in DMA mode */ 00355 hsd->Context = (SD_CONTEXT_READ_MULTIPLE_BLOCK | SD_CONTEXT_DMA); 00356 00357 /* Read Multi Block command */ 00358 errorstate = SDMMC_CmdReadMultiBlock(hsd->Instance, add); 00359 if(errorstate != HAL_SD_ERROR_NONE) 00360 { 00361 hsd->State = HAL_SD_STATE_READY; 00362 hsd->ErrorCode |= errorstate; 00363 return HAL_ERROR; 00364 } 00365 00366 return HAL_OK; 00367 } 00368 else 00369 { 00370 return HAL_BUSY; 00371 } 00372 00373 } 00374 00375 /** 00376 * @brief Write block(s) to a specified address in a card. The transfered Data are stored in Buffer0 and Buffer1. 00377 * Buffer0, Buffer1 and BufferSize need to be configured by function HAL_SDEx_ConfigDMAMultiBuffer before call this function. 00378 * @param hsd: SD handle 00379 * @param BlockAdd: Block Address from where data is to be read 00380 * @param NumberOfBlocks: Total number of blocks to read 00381 * @retval HAL status 00382 */ 00383 HAL_StatusTypeDef HAL_SDEx_WriteBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks) 00384 { 00385 SDMMC_DataInitTypeDef config; 00386 uint32_t errorstate; 00387 uint32_t DmaBase0_reg, DmaBase1_reg; 00388 uint32_t add = BlockAdd; 00389 00390 if(hsd->State == HAL_SD_STATE_READY) 00391 { 00392 if((add + NumberOfBlocks) > (hsd->SdCard.LogBlockNbr)) 00393 { 00394 hsd->ErrorCode |= HAL_SD_ERROR_ADDR_OUT_OF_RANGE; 00395 return HAL_ERROR; 00396 } 00397 00398 DmaBase0_reg = hsd->Instance->IDMABASE0; 00399 DmaBase1_reg = hsd->Instance->IDMABASE1; 00400 if ((hsd->Instance->IDMABSIZE == 0U) || (DmaBase0_reg == 0U) || (DmaBase1_reg == 0U)) 00401 { 00402 hsd->ErrorCode = HAL_SD_ERROR_ADDR_OUT_OF_RANGE; 00403 return HAL_ERROR; 00404 } 00405 00406 /* Initialize data control register */ 00407 hsd->Instance->DCTRL = 0; 00408 00409 hsd->ErrorCode = HAL_SD_ERROR_NONE; 00410 00411 hsd->State = HAL_SD_STATE_BUSY; 00412 00413 if(hsd->SdCard.CardType != CARD_SDHC_SDXC) 00414 { 00415 add *= 512U; 00416 } 00417 00418 /* Configure the SD DPSM (Data Path State Machine) */ 00419 config.DataTimeOut = SDMMC_DATATIMEOUT; 00420 config.DataLength = BLOCKSIZE * NumberOfBlocks; 00421 config.DataBlockSize = SDMMC_DATABLOCK_SIZE_512B; 00422 config.TransferDir = SDMMC_TRANSFER_DIR_TO_CARD; 00423 config.TransferMode = SDMMC_TRANSFER_MODE_BLOCK; 00424 config.DPSM = SDMMC_DPSM_DISABLE; 00425 (void)SDMMC_ConfigData(hsd->Instance, &config); 00426 00427 /* Set Block Size for Card */ 00428 errorstate = SDMMC_CmdBlockLength(hsd->Instance, BLOCKSIZE); 00429 if(errorstate != HAL_SD_ERROR_NONE) 00430 { 00431 hsd->State = HAL_SD_STATE_READY; 00432 hsd->ErrorCode |= errorstate; 00433 return HAL_ERROR; 00434 } 00435 00436 __SDMMC_CMDTRANS_ENABLE( hsd->Instance); 00437 00438 hsd->Instance->IDMACTRL = SDMMC_ENABLE_IDMA_DOUBLE_BUFF0; 00439 00440 __HAL_SD_ENABLE_IT(hsd, (SDMMC_IT_DCRCFAIL | SDMMC_IT_DTIMEOUT | SDMMC_IT_TXUNDERR | SDMMC_IT_DATAEND | SDMMC_IT_IDMABTC)); 00441 00442 /* Write Blocks in DMA mode */ 00443 hsd->Context = (SD_CONTEXT_WRITE_MULTIPLE_BLOCK | SD_CONTEXT_DMA); 00444 00445 /* Write Multi Block command */ 00446 errorstate = SDMMC_CmdWriteMultiBlock(hsd->Instance, add); 00447 if(errorstate != HAL_SD_ERROR_NONE) 00448 { 00449 hsd->State = HAL_SD_STATE_READY; 00450 hsd->ErrorCode |= errorstate; 00451 return HAL_ERROR; 00452 } 00453 00454 return HAL_OK; 00455 } 00456 else 00457 { 00458 return HAL_BUSY; 00459 } 00460 } 00461 00462 00463 /** 00464 * @brief Change the DMA Buffer0 or Buffer1 address on the fly. 00465 * @param hsd: pointer to a SD_HandleTypeDef structure. 00466 * @param Buffer: the buffer to be changed, This parameter can be one of 00467 * the following values: SD_DMA_BUFFER0 or SD_DMA_BUFFER1 00468 * @param pDataBuffer: The new address 00469 * @note The BUFFER0 address can be changed only when the current transfer use 00470 * BUFFER1 and the BUFFER1 address can be changed only when the current 00471 * transfer use BUFFER0. 00472 * @retval HAL status 00473 */ 00474 HAL_StatusTypeDef HAL_SDEx_ChangeDMABuffer(SD_HandleTypeDef *hsd, HAL_SDEx_DMABuffer_MemoryTypeDef Buffer, uint32_t *pDataBuffer) 00475 { 00476 if(Buffer == SD_DMA_BUFFER0) 00477 { 00478 /* change the buffer0 address */ 00479 hsd->Instance->IDMABASE0 = (uint32_t)pDataBuffer; 00480 } 00481 else 00482 { 00483 /* change the memory1 address */ 00484 hsd->Instance->IDMABASE1 = (uint32_t)pDataBuffer; 00485 } 00486 00487 return HAL_OK; 00488 } 00489 00490 /** 00491 * @brief Read DMA Buffer 0 Transfer completed callbacks 00492 * @param hsd: SD handle 00493 * @retval None 00494 */ 00495 __weak void HAL_SDEx_Read_DMADoubleBuffer0CpltCallback(SD_HandleTypeDef *hsd) 00496 { 00497 /* Prevent unused argument(s) compilation warning */ 00498 UNUSED(hsd); 00499 00500 /* NOTE : This function should not be modified, when the callback is needed, 00501 the HAL_SDEx_Read_DMADoubleBuffer0CpltCallback can be implemented in the user file 00502 */ 00503 } 00504 00505 /** 00506 * @brief Read DMA Buffer 1 Transfer completed callbacks 00507 * @param hsd: SD handle 00508 * @retval None 00509 */ 00510 __weak void HAL_SDEx_Read_DMADoubleBuffer1CpltCallback(SD_HandleTypeDef *hsd) 00511 { 00512 /* Prevent unused argument(s) compilation warning */ 00513 UNUSED(hsd); 00514 00515 /* NOTE : This function should not be modified, when the callback is needed, 00516 the HAL_SDEx_Read_DMADoubleBuffer1CpltCallback can be implemented in the user file 00517 */ 00518 } 00519 00520 /** 00521 * @brief Write DMA Buffer 0 Transfer completed callbacks 00522 * @param hsd: SD handle 00523 * @retval None 00524 */ 00525 __weak void HAL_SDEx_Write_DMADoubleBuffer0CpltCallback(SD_HandleTypeDef *hsd) 00526 { 00527 /* Prevent unused argument(s) compilation warning */ 00528 UNUSED(hsd); 00529 00530 /* NOTE : This function should not be modified, when the callback is needed, 00531 the HAL_SDEx_Write_DMADoubleBuffer0CpltCallback can be implemented in the user file 00532 */ 00533 } 00534 00535 /** 00536 * @brief Write DMA Buffer 1 Transfer completed callbacks 00537 * @param hsd: SD handle 00538 * @retval None 00539 */ 00540 __weak void HAL_SDEx_Write_DMADoubleBuffer1CpltCallback(SD_HandleTypeDef *hsd) 00541 { 00542 /* Prevent unused argument(s) compilation warning */ 00543 UNUSED(hsd); 00544 00545 /* NOTE : This function should not be modified, when the callback is needed, 00546 the HAL_SDEx_Write_DMADoubleBuffer0CpltCallback can be implemented in the user file 00547 */ 00548 } 00549 00550 /** 00551 * @} 00552 */ 00553 00554 /** 00555 * @} 00556 */ 00557 00558 #endif /* HAL_SD_MODULE_ENABLED */ 00559 00560 /** 00561 * @} 00562 */ 00563 00564 /** 00565 * @} 00566 */ 00567 00568 #endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */ 00569 00570 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/