1 /** 2 ****************************************************************************** 3 * @file stm32l4xx_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) 2017 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 STM32L4xx_HAL_SD_EX_H 21 #define STM32L4xx_HAL_SD_EX_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 #if defined(STM32L4P5xx) || defined(STM32L4Q5xx) || defined(STM32L4R5xx) || defined(STM32L4R7xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx) 28 29 /* Includes ------------------------------------------------------------------*/ 30 #include "stm32l4xx_hal_def.h" 31 32 /** @addtogroup STM32L4xx_HAL_Driver 33 * @{ 34 */ 35 36 /** @addtogroup SDEx 37 * @brief SD HAL extended module driver 38 * @{ 39 */ 40 41 /* Exported types ------------------------------------------------------------*/ 42 /** @defgroup SDEx_Exported_Types SDEx Exported Types 43 * @{ 44 */ 45 46 /** @defgroup SDEx_Exported_Types_Group1 SD Card Internal DMA Buffer structure 47 * @{ 48 */ 49 typedef enum 50 { 51 SD_DMA_BUFFER0 = 0x00U, /*!< selects SD internal DMA Buffer 0 */ 52 SD_DMA_BUFFER1 = 0x01U, /*!< selects SD internal DMA Buffer 1 */ 53 54 }HAL_SDEx_DMABuffer_MemoryTypeDef; 55 56 57 /** 58 * @} 59 */ 60 61 /** 62 * @} 63 */ 64 /* Exported constants --------------------------------------------------------*/ 65 /* Exported macro ------------------------------------------------------------*/ 66 /* Exported functions --------------------------------------------------------*/ 67 /** @defgroup SDEx_Exported_Functions SDEx Exported Functions 68 * @{ 69 */ 70 71 /** @defgroup SDEx_Exported_Functions_Group1 HighSpeed functions 72 * @{ 73 */ 74 uint32_t HAL_SDEx_HighSpeed (SD_HandleTypeDef *hsd); 75 76 void HAL_SDEx_DriveTransceiver_1_8V_Callback(FlagStatus status); 77 78 /** 79 * @} 80 */ 81 82 /** @defgroup SDEx_Exported_Functions_Group2 MultiBuffer functions 83 * @{ 84 */ 85 HAL_StatusTypeDef HAL_SDEx_ConfigDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t * pDataBuffer0, uint32_t * pDataBuffer1, uint32_t BufferSize); 86 HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks); 87 HAL_StatusTypeDef HAL_SDEx_WriteBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks); 88 HAL_StatusTypeDef HAL_SDEx_ChangeDMABuffer(SD_HandleTypeDef *hsd, HAL_SDEx_DMABuffer_MemoryTypeDef Buffer, uint32_t *pDataBuffer); 89 90 void HAL_SDEx_Read_DMADoubleBuffer0CpltCallback(SD_HandleTypeDef *hsd); 91 void HAL_SDEx_Read_DMADoubleBuffer1CpltCallback(SD_HandleTypeDef *hsd); 92 void HAL_SDEx_Write_DMADoubleBuffer0CpltCallback(SD_HandleTypeDef *hsd); 93 void HAL_SDEx_Write_DMADoubleBuffer1CpltCallback(SD_HandleTypeDef *hsd); 94 95 /** 96 * @} 97 */ 98 99 /** 100 * @} 101 */ 102 103 /* Private types -------------------------------------------------------------*/ 104 /* Private defines -----------------------------------------------------------*/ 105 /* Private variables ---------------------------------------------------------*/ 106 /* Private constants ---------------------------------------------------------*/ 107 /* Private macros ------------------------------------------------------------*/ 108 /* Private functions prototypes ----------------------------------------------*/ 109 /* Private functions ---------------------------------------------------------*/ 110 111 /** 112 * @} 113 */ 114 115 /** 116 * @} 117 */ 118 119 #endif /* STM32L4P5xx || STM32L4Q5xx || STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */ 120 121 #ifdef __cplusplus 122 } 123 #endif 124 125 126 #endif /* STM32L4xx_HAL_SDEx_H */ 127