RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
stm32h7xx_hal_sd.h File Reference

Header file of SD HAL module. More...

#include "stm32h7xx_ll_sdmmc.h"
#include "stm32h7xx_hal_sd_ex.h"

Go to the source code of this file.

Data Structures

struct  HAL_SD_CardInfoTypeDef
 SD Card Information Structure definition. More...
 
struct  SD_HandleTypeDef
 SD handle Structure definition. More...
 
struct  HAL_SD_CardCSDTypeDef
 
struct  HAL_SD_CardCIDTypeDef
 
struct  HAL_SD_CardStatusTypeDef
 

Macros

#define HAL_SD_CARD_READY   0x00000001U
 
#define HAL_SD_CARD_IDENTIFICATION   0x00000002U
 
#define HAL_SD_CARD_STANDBY   0x00000003U
 
#define HAL_SD_CARD_TRANSFER   0x00000004U
 
#define HAL_SD_CARD_SENDING   0x00000005U
 
#define HAL_SD_CARD_RECEIVING   0x00000006U
 
#define HAL_SD_CARD_PROGRAMMING   0x00000007U
 
#define HAL_SD_CARD_DISCONNECTED   0x00000008U
 
#define HAL_SD_CARD_ERROR   0x000000FFU
 
#define SD_InitTypeDef   SDMMC_InitTypeDef
 
#define SD_TypeDef   SDMMC_TypeDef
 
#define BLOCKSIZE   ((uint32_t)512U)
 
#define HAL_SD_ERROR_NONE   SDMMC_ERROR_NONE
 
#define HAL_SD_ERROR_CMD_CRC_FAIL   SDMMC_ERROR_CMD_CRC_FAIL
 
#define HAL_SD_ERROR_DATA_CRC_FAIL   SDMMC_ERROR_DATA_CRC_FAIL
 
#define HAL_SD_ERROR_CMD_RSP_TIMEOUT   SDMMC_ERROR_CMD_RSP_TIMEOUT
 
#define HAL_SD_ERROR_DATA_TIMEOUT   SDMMC_ERROR_DATA_TIMEOUT
 
#define HAL_SD_ERROR_TX_UNDERRUN   SDMMC_ERROR_TX_UNDERRUN
 
#define HAL_SD_ERROR_RX_OVERRUN   SDMMC_ERROR_RX_OVERRUN
 
#define HAL_SD_ERROR_ADDR_MISALIGNED   SDMMC_ERROR_ADDR_MISALIGNED
 
#define HAL_SD_ERROR_BLOCK_LEN_ERR   SDMMC_ERROR_BLOCK_LEN_ERR
 
#define HAL_SD_ERROR_ERASE_SEQ_ERR   SDMMC_ERROR_ERASE_SEQ_ERR
 
#define HAL_SD_ERROR_BAD_ERASE_PARAM   SDMMC_ERROR_BAD_ERASE_PARAM
 
#define HAL_SD_ERROR_WRITE_PROT_VIOLATION   SDMMC_ERROR_WRITE_PROT_VIOLATION
 
#define HAL_SD_ERROR_LOCK_UNLOCK_FAILED   SDMMC_ERROR_LOCK_UNLOCK_FAILED
 
#define HAL_SD_ERROR_COM_CRC_FAILED   SDMMC_ERROR_COM_CRC_FAILED
 
#define HAL_SD_ERROR_ILLEGAL_CMD   SDMMC_ERROR_ILLEGAL_CMD
 
#define HAL_SD_ERROR_CARD_ECC_FAILED   SDMMC_ERROR_CARD_ECC_FAILED
 
#define HAL_SD_ERROR_CC_ERR   SDMMC_ERROR_CC_ERR
 
#define HAL_SD_ERROR_GENERAL_UNKNOWN_ERR   SDMMC_ERROR_GENERAL_UNKNOWN_ERR
 
#define HAL_SD_ERROR_STREAM_READ_UNDERRUN   SDMMC_ERROR_STREAM_READ_UNDERRUN
 
#define HAL_SD_ERROR_STREAM_WRITE_OVERRUN   SDMMC_ERROR_STREAM_WRITE_OVERRUN
 
#define HAL_SD_ERROR_CID_CSD_OVERWRITE   SDMMC_ERROR_CID_CSD_OVERWRITE
 
#define HAL_SD_ERROR_WP_ERASE_SKIP   SDMMC_ERROR_WP_ERASE_SKIP
 
#define HAL_SD_ERROR_CARD_ECC_DISABLED   SDMMC_ERROR_CARD_ECC_DISABLED
 
#define HAL_SD_ERROR_ERASE_RESET   SDMMC_ERROR_ERASE_RESET
 
#define HAL_SD_ERROR_AKE_SEQ_ERR   SDMMC_ERROR_AKE_SEQ_ERR
 
#define HAL_SD_ERROR_INVALID_VOLTRANGE   SDMMC_ERROR_INVALID_VOLTRANGE
 
#define HAL_SD_ERROR_ADDR_OUT_OF_RANGE   SDMMC_ERROR_ADDR_OUT_OF_RANGE
 
#define HAL_SD_ERROR_REQUEST_NOT_APPLICABLE   SDMMC_ERROR_REQUEST_NOT_APPLICABLE
 
#define HAL_SD_ERROR_PARAM   SDMMC_ERROR_INVALID_PARAMETER
 
#define HAL_SD_ERROR_UNSUPPORTED_FEATURE   SDMMC_ERROR_UNSUPPORTED_FEATURE
 
#define HAL_SD_ERROR_BUSY   SDMMC_ERROR_BUSY
 
#define HAL_SD_ERROR_DMA   SDMMC_ERROR_DMA
 
#define HAL_SD_ERROR_TIMEOUT   SDMMC_ERROR_TIMEOUT
 
#define SD_CONTEXT_NONE   ((uint32_t)0x00000000U)
 
#define SD_CONTEXT_READ_SINGLE_BLOCK   ((uint32_t)0x00000001U)
 
#define SD_CONTEXT_READ_MULTIPLE_BLOCK   ((uint32_t)0x00000002U)
 
#define SD_CONTEXT_WRITE_SINGLE_BLOCK   ((uint32_t)0x00000010U)
 
#define SD_CONTEXT_WRITE_MULTIPLE_BLOCK   ((uint32_t)0x00000020U)
 
#define SD_CONTEXT_IT   ((uint32_t)0x00000008U)
 
#define SD_CONTEXT_DMA   ((uint32_t)0x00000080U)
 
#define CARD_NORMAL_SPEED   ((uint32_t)0x00000000U)
 
#define CARD_HIGH_SPEED   ((uint32_t)0x00000100U)
 
#define CARD_ULTRA_HIGH_SPEED   ((uint32_t)0x00000200U)
 
#define CARD_SDSC   ((uint32_t)0x00000000U)
 
#define CARD_SDHC_SDXC   ((uint32_t)0x00000001U)
 
#define CARD_SECURED   ((uint32_t)0x00000003U)
 
#define CARD_V1_X   ((uint32_t)0x00000000U)
 
#define CARD_V2_X   ((uint32_t)0x00000001U)
 
#define __HAL_SD_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SD_STATE_RESET)
 Reset SD handle state.
 
#define __HAL_SD_ENABLE_IT(__HANDLE__, __INTERRUPT__)   __SDMMC_ENABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
 Enable the SD device interrupt.
 
#define __HAL_SD_DISABLE_IT(__HANDLE__, __INTERRUPT__)   __SDMMC_DISABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
 Disable the SD device interrupt.
 
#define __HAL_SD_GET_FLAG(__HANDLE__, __FLAG__)   __SDMMC_GET_FLAG((__HANDLE__)->Instance, (__FLAG__))
 Check whether the specified SD flag is set or not.
 
#define __HAL_SD_CLEAR_FLAG(__HANDLE__, __FLAG__)   __SDMMC_CLEAR_FLAG((__HANDLE__)->Instance, (__FLAG__))
 Clear the SD's pending flags.
 
#define __HAL_SD_GET_IT(__HANDLE__, __INTERRUPT__)   __SDMMC_GET_IT((__HANDLE__)->Instance, (__INTERRUPT__))
 Check whether the specified SD interrupt has occurred or not.
 
#define __HAL_SD_CLEAR_IT(__HANDLE__, __INTERRUPT__)   __SDMMC_CLEAR_IT((__HANDLE__)->Instance, (__INTERRUPT__))
 Clear the SD's interrupt pending bits.
 

Typedefs

typedef uint32_t HAL_SD_CardStateTypeDef
 

Enumerations

enum  HAL_SD_StateTypeDef {
  HAL_SD_STATE_RESET = ((uint32_t)0x00000000U) , HAL_SD_STATE_READY = ((uint32_t)0x00000001U) , HAL_SD_STATE_TIMEOUT = ((uint32_t)0x00000002U) , HAL_SD_STATE_BUSY = ((uint32_t)0x00000003U) ,
  HAL_SD_STATE_PROGRAMMING = ((uint32_t)0x00000004U) , HAL_SD_STATE_RECEIVING = ((uint32_t)0x00000005U) , HAL_SD_STATE_TRANSFER = ((uint32_t)0x00000006U) , HAL_SD_STATE_ERROR = ((uint32_t)0x0000000FU)
}
 

Functions

HAL_StatusTypeDef HAL_SD_Init (SD_HandleTypeDef *hsd)
 
HAL_StatusTypeDef HAL_SD_InitCard (SD_HandleTypeDef *hsd)
 
HAL_StatusTypeDef HAL_SD_DeInit (SD_HandleTypeDef *hsd)
 
void HAL_SD_MspInit (SD_HandleTypeDef *hsd)
 
void HAL_SD_MspDeInit (SD_HandleTypeDef *hsd)
 
HAL_StatusTypeDef HAL_SD_ReadBlocks (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout)
 
HAL_StatusTypeDef HAL_SD_WriteBlocks (SD_HandleTypeDef *hsd, const uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout)
 
HAL_StatusTypeDef HAL_SD_Erase (SD_HandleTypeDef *hsd, uint32_t BlockStartAdd, uint32_t BlockEndAdd)
 
HAL_StatusTypeDef HAL_SD_ReadBlocks_IT (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 
HAL_StatusTypeDef HAL_SD_WriteBlocks_IT (SD_HandleTypeDef *hsd, const uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 
HAL_StatusTypeDef HAL_SD_ReadBlocks_DMA (SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 
HAL_StatusTypeDef HAL_SD_WriteBlocks_DMA (SD_HandleTypeDef *hsd, const uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 
void HAL_SD_IRQHandler (SD_HandleTypeDef *hsd)
 
void HAL_SD_TxCpltCallback (SD_HandleTypeDef *hsd)
 
void HAL_SD_RxCpltCallback (SD_HandleTypeDef *hsd)
 
void HAL_SD_ErrorCallback (SD_HandleTypeDef *hsd)
 
void HAL_SD_AbortCallback (SD_HandleTypeDef *hsd)
 
HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation (SD_HandleTypeDef *hsd, uint32_t WideMode)
 
HAL_StatusTypeDef HAL_SD_ConfigSpeedBusOperation (SD_HandleTypeDef *hsd, uint32_t SpeedMode)
 
HAL_SD_CardStateTypeDef HAL_SD_GetCardState (SD_HandleTypeDef *hsd)
 
HAL_StatusTypeDef HAL_SD_GetCardCID (SD_HandleTypeDef *hsd, HAL_SD_CardCIDTypeDef *pCID)
 
HAL_StatusTypeDef HAL_SD_GetCardCSD (SD_HandleTypeDef *hsd, HAL_SD_CardCSDTypeDef *pCSD)
 
HAL_StatusTypeDef HAL_SD_GetCardStatus (SD_HandleTypeDef *hsd, HAL_SD_CardStatusTypeDef *pStatus)
 
HAL_StatusTypeDef HAL_SD_GetCardInfo (SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypeDef *pCardInfo)
 
HAL_SD_StateTypeDef HAL_SD_GetState (SD_HandleTypeDef *hsd)
 
uint32_t HAL_SD_GetError (SD_HandleTypeDef *hsd)
 
HAL_StatusTypeDef HAL_SD_Abort (SD_HandleTypeDef *hsd)
 
HAL_StatusTypeDef HAL_SD_Abort_IT (SD_HandleTypeDef *hsd)
 

Detailed Description

Header file of SD HAL module.

Author
MCD Application Team
Attention

Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.