STM32L4R9I-Discovery BSP User Manual
|
Functions | |
uint8_t | BSP_SD_Init (void) |
Initializes the SD card device. | |
uint8_t | BSP_SD_DeInit (void) |
DeInitializes the SD card device. | |
uint8_t | BSP_SD_ITConfig (void) |
Configures Interrupt mode for SD detection pin. | |
uint8_t | BSP_SD_IsDetected (void) |
Detects if SD card is correctly plugged in the memory slot or not. | |
uint8_t | BSP_SD_ReadBlocks (uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout) |
Reads block(s) from a specified address in an SD card, in polling mode. | |
uint8_t | BSP_SD_WriteBlocks (uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout) |
Writes block(s) to a specified address in an SD card, in polling mode. | |
uint8_t | BSP_SD_ReadBlocks_DMA (uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks) |
Reads block(s) from a specified address in an SD card, in DMA mode. | |
uint8_t | BSP_SD_WriteBlocks_DMA (uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks) |
Writes block(s) to a specified address in an SD card, in DMA mode. | |
uint8_t | BSP_SD_Erase (uint32_t StartAddr, uint32_t EndAddr) |
Erases the specified memory area of the given SD card. | |
uint8_t | BSP_SD_GetCardState (void) |
Gets the current SD card data status. | |
void | BSP_SD_GetCardInfo (BSP_SD_CardInfo *CardInfo) |
Get SD information about specific SD card. | |
__weak void | BSP_SD_MspInit (SD_HandleTypeDef *hsd, void *Params) |
Initializes the SD MSP. | |
__weak void | BSP_SD_MspDeInit (SD_HandleTypeDef *hsd, void *Params) |
De-Initializes the SD MSP. | |
__weak void | BSP_SD_AbortCallback (void) |
BSP SD Abort callback. | |
__weak void | BSP_SD_WriteCpltCallback (void) |
BSP Tx Transfer completed callback. | |
__weak void | BSP_SD_ReadCpltCallback (void) |
BSP Rx Transfer completed callback. | |
void | HAL_SD_AbortCallback (SD_HandleTypeDef *hsd) |
SD Abort callbacks. | |
void | HAL_SD_TxCpltCallback (SD_HandleTypeDef *hsd) |
Tx Transfer completed callback. | |
void | HAL_SD_RxCpltCallback (SD_HandleTypeDef *hsd) |
Rx Transfer completed callback. |
Function Documentation
void BSP_SD_AbortCallback | ( | void | ) |
BSP SD Abort callback.
- Return values:
-
None
Definition at line 466 of file stm32l4r9i_discovery_sd.c.
Referenced by HAL_SD_AbortCallback().
uint8_t BSP_SD_DeInit | ( | void | ) |
DeInitializes the SD card device.
- Return values:
-
SD status
Definition at line 156 of file stm32l4r9i_discovery_sd.c.
References BSP_SD_MspDeInit(), hsd_discovery, MSD_ERROR, MSD_OK, and UseExtiModeDetection.
uint8_t BSP_SD_Erase | ( | uint32_t | StartAddr, |
uint32_t | EndAddr | ||
) |
Erases the specified memory area of the given SD card.
- Parameters:
-
StartAddr,: Start byte address EndAddr,: End byte address
- Return values:
-
SD status
Definition at line 332 of file stm32l4r9i_discovery_sd.c.
References hsd_discovery, MSD_ERROR, and MSD_OK.
void BSP_SD_GetCardInfo | ( | BSP_SD_CardInfo * | CardInfo | ) |
Get SD information about specific SD card.
- Parameters:
-
CardInfo,: Pointer to HAL_SD_CardInfoTypedef structure
- Return values:
-
None
Definition at line 365 of file stm32l4r9i_discovery_sd.c.
References hsd_discovery.
uint8_t BSP_SD_GetCardState | ( | void | ) |
Gets the current SD card data status.
- Return values:
-
Data transfer state. This value can be one of the following values: - SD_TRANSFER_OK: No data transfer is acting
- SD_TRANSFER_BUSY: Data transfer is acting
Definition at line 355 of file stm32l4r9i_discovery_sd.c.
References hsd_discovery, SD_TRANSFER_BUSY, and SD_TRANSFER_OK.
uint8_t BSP_SD_Init | ( | void | ) |
Initializes the SD card device.
- Return values:
-
SD status
Definition at line 115 of file stm32l4r9i_discovery_sd.c.
References BSP_IO_ConfigPin(), BSP_IO_Init(), BSP_SD_IsDetected(), BSP_SD_MspInit(), hsd_discovery, MSD_ERROR, MSD_ERROR_SD_NOT_PRESENT, MSD_OK, SD_DETECT_PIN, and SD_PRESENT.
uint8_t BSP_SD_IsDetected | ( | void | ) |
Detects if SD card is correctly plugged in the memory slot or not.
- Return values:
-
Returns if SD is detected or not
Definition at line 204 of file stm32l4r9i_discovery_sd.c.
References BSP_IO_ConfigPin(), BSP_IO_ReadPin(), SD_DETECT_PIN, SD_NOT_PRESENT, SD_PRESENT, and UseExtiModeDetection.
Referenced by BSP_SD_Init().
uint8_t BSP_SD_ITConfig | ( | void | ) |
Configures Interrupt mode for SD detection pin.
- Return values:
-
IO_OK,: if all initializations are OK. Other value if error.
Definition at line 181 of file stm32l4r9i_discovery_sd.c.
References BSP_IO_ConfigPin(), BSP_IO_ReadPin(), SD_DETECT_PIN, and UseExtiModeDetection.
void BSP_SD_MspDeInit | ( | SD_HandleTypeDef * | hsd, |
void * | Params | ||
) |
De-Initializes the SD MSP.
- Return values:
-
None
Definition at line 433 of file stm32l4r9i_discovery_sd.c.
References SDMMCx_IRQn.
Referenced by BSP_SD_DeInit().
void BSP_SD_MspInit | ( | SD_HandleTypeDef * | hsd, |
void * | Params | ||
) |
Initializes the SD MSP.
- Return values:
-
None
Definition at line 376 of file stm32l4r9i_discovery_sd.c.
References SDMMCx_IRQn.
Referenced by BSP_SD_Init().
uint8_t BSP_SD_ReadBlocks | ( | uint32_t * | pData, |
uint32_t | ReadAddr, | ||
uint32_t | NumOfBlocks, | ||
uint32_t | Timeout | ||
) |
Reads block(s) from a specified address in an SD card, in polling mode.
- Parameters:
-
pData,: Pointer to the buffer that will contain the data to transmit ReadAddr,: Address from where data is to be read NumOfBlocks,: Number of SD blocks to read Timeout,: Timeout for read operation
- Return values:
-
SD status
Definition at line 238 of file stm32l4r9i_discovery_sd.c.
References hsd_discovery, MSD_ERROR, and MSD_OK.
uint8_t BSP_SD_ReadBlocks_DMA | ( | uint32_t * | pData, |
uint32_t | ReadAddr, | ||
uint32_t | NumOfBlocks | ||
) |
Reads block(s) from a specified address in an SD card, in DMA mode.
- Parameters:
-
pData,: Pointer to the buffer that will contain the data to transmit ReadAddr,: Address from where data is to be read NumOfBlocks,: Number of SD blocks to read
- Return values:
-
SD status
Definition at line 285 of file stm32l4r9i_discovery_sd.c.
References hsd_discovery, MSD_ERROR, and MSD_OK.
void BSP_SD_ReadCpltCallback | ( | void | ) |
BSP Rx Transfer completed callback.
- Return values:
-
None
Definition at line 484 of file stm32l4r9i_discovery_sd.c.
Referenced by HAL_SD_RxCpltCallback().
uint8_t BSP_SD_WriteBlocks | ( | uint32_t * | pData, |
uint32_t | WriteAddr, | ||
uint32_t | NumOfBlocks, | ||
uint32_t | Timeout | ||
) |
Writes block(s) to a specified address in an SD card, in polling mode.
- Parameters:
-
pData,: Pointer to the buffer that will contain the data to transmit WriteAddr,: Address from where data is to be written NumOfBlocks,: Number of SD blocks to write Timeout,: Timeout for write operation
- Return values:
-
SD status
Definition at line 262 of file stm32l4r9i_discovery_sd.c.
References hsd_discovery, MSD_ERROR, and MSD_OK.
uint8_t BSP_SD_WriteBlocks_DMA | ( | uint32_t * | pData, |
uint32_t | WriteAddr, | ||
uint32_t | NumOfBlocks | ||
) |
Writes block(s) to a specified address in an SD card, in DMA mode.
- Parameters:
-
pData,: Pointer to the buffer that will contain the data to transmit WriteAddr,: Address from where data is to be written NumOfBlocks,: Number of SD blocks to write
- Return values:
-
SD status
Definition at line 309 of file stm32l4r9i_discovery_sd.c.
References hsd_discovery, MSD_ERROR, and MSD_OK.
void BSP_SD_WriteCpltCallback | ( | void | ) |
BSP Tx Transfer completed callback.
- Return values:
-
None
Definition at line 475 of file stm32l4r9i_discovery_sd.c.
Referenced by HAL_SD_TxCpltCallback().
void HAL_SD_AbortCallback | ( | SD_HandleTypeDef * | hsd | ) |
SD Abort callbacks.
- Parameters:
-
hsd,: SD handle
- Return values:
-
None
Definition at line 494 of file stm32l4r9i_discovery_sd.c.
References BSP_SD_AbortCallback().
void HAL_SD_RxCpltCallback | ( | SD_HandleTypeDef * | hsd | ) |
Rx Transfer completed callback.
- Parameters:
-
hsd,: SD handle
- Return values:
-
None
Definition at line 514 of file stm32l4r9i_discovery_sd.c.
References BSP_SD_ReadCpltCallback().
void HAL_SD_TxCpltCallback | ( | SD_HandleTypeDef * | hsd | ) |
Tx Transfer completed callback.
- Parameters:
-
hsd,: SD handle
- Return values:
-
None
Definition at line 504 of file stm32l4r9i_discovery_sd.c.
References BSP_SD_WriteCpltCallback().
Generated on Fri Oct 13 2017 02:37:42 for STM32L4R9I-Discovery BSP User Manual by 1.7.6.1