stm32l4xx_hal_sd_ex.h 3.9 KB

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