1 /** 2 ****************************************************************************** 3 * @file stm32l5xx_hal_sd_ex.h 4 * @author MCD Application Team 5 * @brief Header file of SD HAL extended module. 6 ****************************************************************************** 7 * @attention 8 * 9 * Copyright (c) 2019 STMicroelectronics. 10 * All rights reserved. 11 * 12 * This software is licensed under terms that can be found in the LICENSE file 13 * in the root directory of this software component. 14 * If no LICENSE file comes with this software, it is provided AS-IS. 15 * 16 ****************************************************************************** 17 */ 18 19 /* Define to prevent recursive inclusion -------------------------------------*/ 20 #ifndef STM32L5xx_HAL_SD_EX_H 21 #define STM32L5xx_HAL_SD_EX_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /* Includes ------------------------------------------------------------------*/ 28 #include "stm32l5xx_hal_def.h" 29 30 /** @addtogroup STM32L5xx_HAL_Driver 31 * @{ 32 */ 33 34 /** @addtogroup SDEx 35 * @brief SD HAL extended module driver 36 * @{ 37 */ 38 39 /* Exported types ------------------------------------------------------------*/ 40 /** @defgroup SDEx_Exported_Types SDEx Exported Types 41 * @{ 42 */ 43 44 /** @defgroup SDEx_Exported_Types_Group1 SD Card Internal DMA Buffer structure 45 * @{ 46 */ 47 typedef enum 48 { 49 SD_DMA_BUFFER0 = 0x00U, /*!< selects SD internal DMA Buffer 0 */ 50 SD_DMA_BUFFER1 = 0x01U, /*!< selects SD internal DMA Buffer 1 */ 51 52 } HAL_SDEx_DMABuffer_MemoryTypeDef; 53 54 /** 55 * @} 56 */ 57 /** 58 * @} 59 */ 60 61 /* Exported functions --------------------------------------------------------*/ 62 /** @defgroup SDEx_Exported_Functions SDEx Exported Functions 63 * @{ 64 */ 65 66 /** @defgroup SDEx_Exported_Functions_Group1 MultiBuffer functions 67 * @{ 68 */ 69 70 HAL_StatusTypeDef HAL_SDEx_ConfigDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t *pDataBuffer0, uint32_t *pDataBuffer1, 71 uint32_t BufferSize); 72 HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks); 73 HAL_StatusTypeDef HAL_SDEx_WriteBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks); 74 HAL_StatusTypeDef HAL_SDEx_ChangeDMABuffer(SD_HandleTypeDef *hsd, HAL_SDEx_DMABuffer_MemoryTypeDef Buffer, 75 uint32_t *pDataBuffer); 76 77 void HAL_SDEx_Read_DMADoubleBuf0CpltCallback(SD_HandleTypeDef *hsd); 78 void HAL_SDEx_Read_DMADoubleBuf1CpltCallback(SD_HandleTypeDef *hsd); 79 void HAL_SDEx_Write_DMADoubleBuf0CpltCallback(SD_HandleTypeDef *hsd); 80 void HAL_SDEx_Write_DMADoubleBuf1CpltCallback(SD_HandleTypeDef *hsd); 81 82 /** 83 * @} 84 */ 85 86 /** 87 * @} 88 */ 89 90 /* Private types -------------------------------------------------------------*/ 91 /* Private defines -----------------------------------------------------------*/ 92 /* Private variables ---------------------------------------------------------*/ 93 /* Private constants ---------------------------------------------------------*/ 94 /* Private macros ------------------------------------------------------------*/ 95 /* Private functions prototypes ----------------------------------------------*/ 96 /* Private functions ---------------------------------------------------------*/ 97 98 /** 99 * @} 100 */ 101 102 /** 103 * @} 104 */ 105 #ifdef __cplusplus 106 } 107 #endif 108 109 110 #endif /* stm32l5xx_HAL_SD_EX_H */ 111