STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
Data transfer functions. More...
Functions | |
HAL_StatusTypeDef | HAL_MMC_ReadBlocks (MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout) |
Reads block(s) from a specified address in a card. The Data transfer is managed by polling mode. | |
HAL_StatusTypeDef | HAL_MMC_WriteBlocks (MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout) |
Allows to write block(s) to a specified address in a card. The Data transfer is managed by polling mode. | |
HAL_StatusTypeDef | HAL_MMC_Erase (MMC_HandleTypeDef *hmmc, uint32_t BlockStartAdd, uint32_t BlockEndAdd) |
Erases the specified memory area of the given MMC card. | |
HAL_StatusTypeDef | HAL_MMC_ReadBlocks_IT (MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks) |
Reads block(s) from a specified address in a card. The Data transfer is managed in interrupt mode. | |
HAL_StatusTypeDef | HAL_MMC_WriteBlocks_IT (MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks) |
Writes block(s) to a specified address in a card. The Data transfer is managed in interrupt mode. | |
HAL_StatusTypeDef | HAL_MMC_ReadBlocks_DMA (MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks) |
Reads block(s) from a specified address in a card. The Data transfer is managed by DMA mode. | |
HAL_StatusTypeDef | HAL_MMC_WriteBlocks_DMA (MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks) |
Writes block(s) to a specified address in a card. The Data transfer is managed by DMA mode. | |
void | HAL_MMC_IRQHandler (MMC_HandleTypeDef *hmmc) |
This function handles MMC card interrupt request. | |
void | HAL_MMC_TxCpltCallback (MMC_HandleTypeDef *hmmc) |
Tx Transfer completed callbacks. | |
void | HAL_MMC_RxCpltCallback (MMC_HandleTypeDef *hmmc) |
Rx Transfer completed callbacks. | |
void | HAL_MMC_ErrorCallback (MMC_HandleTypeDef *hmmc) |
MMC error callbacks. | |
void | HAL_MMC_AbortCallback (MMC_HandleTypeDef *hmmc) |
MMC Abort callbacks. | |
HAL_MMC_StateTypeDef | HAL_MMC_GetState (MMC_HandleTypeDef *hmmc) |
return the MMC state | |
uint32_t | HAL_MMC_GetError (MMC_HandleTypeDef *hmmc) |
Return the MMC error code. | |
Data transfer functions.
============================================================================== ##### IO operation functions ##### ============================================================================== [..] This subsection provides a set of functions allowing to manage the data transfer from/to MMC card.
HAL_StatusTypeDef HAL_MMC_ReadBlocks | ( | MMC_HandleTypeDef * | hmmc, |
uint8_t * | pData, | ||
uint32_t | BlockAdd, | ||
uint32_t | NumberOfBlocks, | ||
uint32_t | Timeout ) |
#include <stm32f4xx_hal_mmc.h>
Reads block(s) from a specified address in a card. The Data transfer is managed by polling mode.
hmmc | Pointer to MMC handle |
pData | pointer to the buffer that will contain the received data |
BlockAdd | Block Address from where data is to be read |
NumberOfBlocks | Number of MMC blocks to read |
Timeout | Specify timeout value |
HAL | status |
Definition at line 600 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_GET_FLAG, HAL_MMC_CardInfoTypeDef::CardType, MMC_HandleTypeDef::Context, MMC_HandleTypeDef::ErrorCode, HAL_ERROR, HAL_GetTick(), HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_BUSY, HAL_MMC_ERROR_DATA_CRC_FAIL, HAL_MMC_ERROR_DATA_TIMEOUT, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_ERROR_RX_OVERRUN, HAL_MMC_ERROR_TIMEOUT, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, HAL_TIMEOUT, MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_READ_MULTIPLE_BLOCK, MMC_CONTEXT_READ_SINGLE_BLOCK, MMC_HIGH_CAPACITY_CARD, MMC_HandleTypeDef::MmcCard, and MMC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_MMC_WriteBlocks | ( | MMC_HandleTypeDef * | hmmc, |
uint8_t * | pData, | ||
uint32_t | BlockAdd, | ||
uint32_t | NumberOfBlocks, | ||
uint32_t | Timeout ) |
#include <stm32f4xx_hal_mmc.h>
Allows to write block(s) to a specified address in a card. The Data transfer is managed by polling mode.
hmmc | Pointer to MMC handle |
pData | pointer to the buffer that will contain the data to transmit |
BlockAdd | Block Address where data will be written |
NumberOfBlocks | Number of MMC blocks to write |
Timeout | Specify timeout value |
HAL | status |
Definition at line 805 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_GET_FLAG, HAL_MMC_CardInfoTypeDef::CardType, MMC_HandleTypeDef::Context, MMC_HandleTypeDef::ErrorCode, HAL_ERROR, HAL_GetTick(), HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_BUSY, HAL_MMC_ERROR_DATA_CRC_FAIL, HAL_MMC_ERROR_DATA_TIMEOUT, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_ERROR_TX_UNDERRUN, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, HAL_TIMEOUT, MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_WRITE_MULTIPLE_BLOCK, MMC_CONTEXT_WRITE_SINGLE_BLOCK, MMC_HIGH_CAPACITY_CARD, MMC_HandleTypeDef::MmcCard, and MMC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_MMC_Erase | ( | MMC_HandleTypeDef * | hmmc, |
uint32_t | BlockStartAdd, | ||
uint32_t | BlockEndAdd ) |
#include <stm32f4xx_hal_mmc.h>
Erases the specified memory area of the given MMC card.
hmmc | Pointer to MMC handle |
BlockStartAdd | Start Block address |
BlockEndAdd | End Block address |
HAL | status |
Definition at line 1416 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, HAL_MMC_CardInfoTypeDef::CardType, HAL_MMC_CardInfoTypeDef::Class, MMC_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_ERROR, HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_LOCK_UNLOCK_FAILED, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_ERROR_REQUEST_NOT_APPLICABLE, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_HIGH_CAPACITY_CARD, MMC_HandleTypeDef::MmcCard, and MMC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_MMC_ReadBlocks_IT | ( | MMC_HandleTypeDef * | hmmc, |
uint8_t * | pData, | ||
uint32_t | BlockAdd, | ||
uint32_t | NumberOfBlocks ) |
#include <stm32f4xx_hal_mmc.h>
Reads block(s) from a specified address in a card. The Data transfer is managed in interrupt mode.
hmmc | Pointer to MMC handle |
pData | Pointer to the buffer that will contain the received data |
BlockAdd | Block Address from where data is to be read |
NumberOfBlocks | Number of blocks to read. |
HAL | status |
Definition at line 984 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_ENABLE_IT, HAL_MMC_CardInfoTypeDef::CardType, MMC_HandleTypeDef::Context, MMC_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_ERROR, HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_IT, MMC_CONTEXT_READ_MULTIPLE_BLOCK, MMC_CONTEXT_READ_SINGLE_BLOCK, MMC_HIGH_CAPACITY_CARD, MMC_HandleTypeDef::MmcCard, MMC_HandleTypeDef::pRxBuffPtr, MMC_HandleTypeDef::RxXferSize, and MMC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_MMC_WriteBlocks_IT | ( | MMC_HandleTypeDef * | hmmc, |
uint8_t * | pData, | ||
uint32_t | BlockAdd, | ||
uint32_t | NumberOfBlocks ) |
#include <stm32f4xx_hal_mmc.h>
Writes block(s) to a specified address in a card. The Data transfer is managed in interrupt mode.
hmmc | Pointer to MMC handle |
pData | Pointer to the buffer that will contain the data to transmit |
BlockAdd | Block Address where data will be written |
NumberOfBlocks | Number of blocks to write |
HAL | status |
Definition at line 1080 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_ENABLE_IT, HAL_MMC_CardInfoTypeDef::CardType, MMC_HandleTypeDef::Context, MMC_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_ERROR, HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_IT, MMC_CONTEXT_WRITE_MULTIPLE_BLOCK, MMC_CONTEXT_WRITE_SINGLE_BLOCK, MMC_HIGH_CAPACITY_CARD, MMC_HandleTypeDef::MmcCard, MMC_HandleTypeDef::pTxBuffPtr, MMC_HandleTypeDef::State, and MMC_HandleTypeDef::TxXferSize.
HAL_StatusTypeDef HAL_MMC_ReadBlocks_DMA | ( | MMC_HandleTypeDef * | hmmc, |
uint8_t * | pData, | ||
uint32_t | BlockAdd, | ||
uint32_t | NumberOfBlocks ) |
#include <stm32f4xx_hal_mmc.h>
Reads block(s) from a specified address in a card. The Data transfer is managed by DMA mode.
hmmc | Pointer MMC handle |
pData | Pointer to the buffer that will contain the received data |
BlockAdd | Block Address from where data is to be read |
NumberOfBlocks | Number of blocks to read. |
HAL | status |
Definition at line 1176 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_DISABLE_IT, __HAL_MMC_DMA_ENABLE, __HAL_MMC_ENABLE_IT, HAL_MMC_CardInfoTypeDef::CardType, MMC_HandleTypeDef::Context, DMA_InitTypeDef::Direction, DMA_PERIPH_TO_MEMORY, MMC_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_DMA_Start_IT(), HAL_ERROR, HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_DMA, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, MMC_HandleTypeDef::hdmarx, __DMA_HandleTypeDef::Init, __DMA_HandleTypeDef::Instance, MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_DMA, MMC_CONTEXT_READ_MULTIPLE_BLOCK, MMC_CONTEXT_READ_SINGLE_BLOCK, MMC_DMAError(), MMC_DMAReceiveCplt(), MMC_HIGH_CAPACITY_CARD, MMC_HandleTypeDef::MmcCard, MMC_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.
HAL_StatusTypeDef HAL_MMC_WriteBlocks_DMA | ( | MMC_HandleTypeDef * | hmmc, |
uint8_t * | pData, | ||
uint32_t | BlockAdd, | ||
uint32_t | NumberOfBlocks ) |
#include <stm32f4xx_hal_mmc.h>
Writes block(s) to a specified address in a card. The Data transfer is managed by DMA mode.
hmmc | Pointer to MMC handle |
pData | Pointer to the buffer that will contain the data to transmit |
BlockAdd | Block Address where data will be written |
NumberOfBlocks | Number of blocks to write |
HAL | status |
Definition at line 1297 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_DISABLE_IT, __HAL_MMC_DMA_ENABLE, __HAL_MMC_ENABLE_IT, HAL_MMC_CardInfoTypeDef::CardType, MMC_HandleTypeDef::Context, DMA_InitTypeDef::Direction, DMA_MEMORY_TO_PERIPH, MMC_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_DMA_Start_IT(), HAL_ERROR, HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_DMA, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, MMC_HandleTypeDef::hdmatx, __DMA_HandleTypeDef::Init, __DMA_HandleTypeDef::Instance, MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_DMA, MMC_CONTEXT_WRITE_MULTIPLE_BLOCK, MMC_CONTEXT_WRITE_SINGLE_BLOCK, MMC_DMAError(), MMC_DMATransmitCplt(), MMC_HIGH_CAPACITY_CARD, MMC_HandleTypeDef::MmcCard, MMC_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.
void HAL_MMC_IRQHandler | ( | MMC_HandleTypeDef * | hmmc | ) |
#include <stm32f4xx_hal_mmc.h>
This function handles MMC card interrupt request.
hmmc | Pointer to MMC handle |
None |
Definition at line 1513 of file stm32f4xx_hal_mmc.c.
References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_DISABLE_IT, __HAL_MMC_GET_FLAG, MMC_HandleTypeDef::Context, MMC_HandleTypeDef::ErrorCode, HAL_DMA_Abort_IT(), HAL_MMC_AbortCallback(), HAL_MMC_ERROR_DATA_CRC_FAIL, HAL_MMC_ERROR_DATA_TIMEOUT, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_RX_OVERRUN, HAL_MMC_ERROR_TX_UNDERRUN, HAL_MMC_ErrorCallback(), HAL_MMC_RxCpltCallback(), HAL_MMC_STATE_READY, HAL_MMC_TxCpltCallback(), HAL_OK, MMC_HandleTypeDef::hdmarx, MMC_HandleTypeDef::hdmatx, MMC_HandleTypeDef::Instance, MMC_CONTEXT_DMA, MMC_CONTEXT_IT, MMC_CONTEXT_READ_MULTIPLE_BLOCK, MMC_CONTEXT_READ_SINGLE_BLOCK, MMC_CONTEXT_WRITE_MULTIPLE_BLOCK, MMC_DMARxAbort(), MMC_DMATxAbort(), MMC_Read_IT(), MMC_Write_IT(), MMC_HandleTypeDef::State, and __DMA_HandleTypeDef::XferAbortCallback.
__weak void HAL_MMC_TxCpltCallback | ( | MMC_HandleTypeDef * | hmmc | ) |
#include <stm32f4xx_hal_mmc.h>
Tx Transfer completed callbacks.
hmmc | Pointer to MMC handle |
None |
Definition at line 1748 of file stm32f4xx_hal_mmc.c.
References UNUSED.
Referenced by HAL_MMC_Init(), and HAL_MMC_IRQHandler().
__weak void HAL_MMC_RxCpltCallback | ( | MMC_HandleTypeDef * | hmmc | ) |
#include <stm32f4xx_hal_mmc.h>
Rx Transfer completed callbacks.
hmmc | Pointer MMC handle |
None |
Definition at line 1763 of file stm32f4xx_hal_mmc.c.
References UNUSED.
Referenced by HAL_MMC_Init(), HAL_MMC_IRQHandler(), and MMC_DMAReceiveCplt().
__weak void HAL_MMC_ErrorCallback | ( | MMC_HandleTypeDef * | hmmc | ) |
#include <stm32f4xx_hal_mmc.h>
MMC error callbacks.
hmmc | Pointer MMC handle |
None |
Definition at line 1778 of file stm32f4xx_hal_mmc.c.
References UNUSED.
Referenced by HAL_MMC_Init(), HAL_MMC_IRQHandler(), MMC_DMAError(), MMC_DMAReceiveCplt(), MMC_DMARxAbort(), and MMC_DMATxAbort().
__weak void HAL_MMC_AbortCallback | ( | MMC_HandleTypeDef * | hmmc | ) |
#include <stm32f4xx_hal_mmc.h>
MMC Abort callbacks.
hmmc | Pointer MMC handle |
None |
Definition at line 1793 of file stm32f4xx_hal_mmc.c.
References UNUSED.
Referenced by HAL_MMC_Abort_IT(), HAL_MMC_Init(), HAL_MMC_IRQHandler(), MMC_DMARxAbort(), and MMC_DMATxAbort().
HAL_MMC_StateTypeDef HAL_MMC_GetState | ( | MMC_HandleTypeDef * | hmmc | ) |
#include <stm32f4xx_hal_mmc.c>
return the MMC state
hmmc | Pointer to mmc handle |
HAL | state |
Definition at line 1727 of file stm32f4xx_hal_mmc.c.
References MMC_HandleTypeDef::State.
uint32_t HAL_MMC_GetError | ( | MMC_HandleTypeDef * | hmmc | ) |
#include <stm32f4xx_hal_mmc.c>
Return the MMC error code.
hmmc | : Pointer to a MMC_HandleTypeDef structure that contains the configuration information. |
MMC | Error Code |
Definition at line 1738 of file stm32f4xx_hal_mmc.c.
References MMC_HandleTypeDef::ErrorCode.