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   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                       opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32L4xx_HAL_SD_EX_H
22 #define STM32L4xx_HAL_SD_EX_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 #if defined(STM32L4P5xx) || defined(STM32L4Q5xx) || defined(STM32L4R5xx) || defined(STM32L4R7xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx)
29 
30 /* Includes ------------------------------------------------------------------*/
31 #include "stm32l4xx_hal_def.h"
32 
33 /** @addtogroup STM32L4xx_HAL_Driver
34   * @{
35   */
36 
37 /** @addtogroup SDEx
38   * @brief SD HAL extended module driver
39   * @{
40   */
41 
42 /* Exported types ------------------------------------------------------------*/
43 /** @defgroup SDEx_Exported_Types SDEx Exported Types
44   * @{
45   */
46 
47 /** @defgroup SDEx_Exported_Types_Group1 SD Card Internal DMA Buffer structure
48   * @{
49   */
50 typedef enum
51 {
52   SD_DMA_BUFFER0      = 0x00U,    /*!< selects SD internal DMA Buffer 0     */
53   SD_DMA_BUFFER1      = 0x01U,    /*!< selects SD internal DMA Buffer 1     */
54 
55 }HAL_SDEx_DMABuffer_MemoryTypeDef;
56 
57 
58 /**
59   * @}
60   */
61 
62 /**
63   * @}
64   */
65 /* Exported constants --------------------------------------------------------*/
66 /* Exported macro ------------------------------------------------------------*/
67 /* Exported functions --------------------------------------------------------*/
68 /** @defgroup SDEx_Exported_Functions SDEx Exported Functions
69   * @{
70   */
71 
72 /** @defgroup SDEx_Exported_Functions_Group1 HighSpeed functions
73   * @{
74   */
75 uint32_t HAL_SDEx_HighSpeed (SD_HandleTypeDef *hsd);
76 
77 void HAL_SDEx_DriveTransceiver_1_8V_Callback(FlagStatus status);
78 
79 /**
80   * @}
81   */
82 
83 /** @defgroup SDEx_Exported_Functions_Group2 MultiBuffer functions
84   * @{
85   */
86 HAL_StatusTypeDef HAL_SDEx_ConfigDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t * pDataBuffer0, uint32_t * pDataBuffer1, uint32_t BufferSize);
87 HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks);
88 HAL_StatusTypeDef HAL_SDEx_WriteBlocksDMAMultiBuffer(SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks);
89 HAL_StatusTypeDef HAL_SDEx_ChangeDMABuffer(SD_HandleTypeDef *hsd, HAL_SDEx_DMABuffer_MemoryTypeDef Buffer, uint32_t *pDataBuffer);
90 
91 void HAL_SDEx_Read_DMADoubleBuffer0CpltCallback(SD_HandleTypeDef *hsd);
92 void HAL_SDEx_Read_DMADoubleBuffer1CpltCallback(SD_HandleTypeDef *hsd);
93 void HAL_SDEx_Write_DMADoubleBuffer0CpltCallback(SD_HandleTypeDef *hsd);
94 void HAL_SDEx_Write_DMADoubleBuffer1CpltCallback(SD_HandleTypeDef *hsd);
95 
96 /**
97   * @}
98   */
99 
100 /**
101   * @}
102   */
103 
104 /* Private types -------------------------------------------------------------*/
105 /* Private defines -----------------------------------------------------------*/
106 /* Private variables ---------------------------------------------------------*/
107 /* Private constants ---------------------------------------------------------*/
108 /* Private macros ------------------------------------------------------------*/
109 /* Private functions prototypes ----------------------------------------------*/
110 /* Private functions ---------------------------------------------------------*/
111 
112 /**
113   * @}
114   */
115 
116 /**
117   * @}
118   */
119 
120 #endif /* STM32L4P5xx || STM32L4Q5xx || STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 
127 #endif /* STM32L4xx_HAL_SDEx_H */
128 
129 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
130