STM32F103xB HAL User Manual
Functions
Input and Output operation functions
DMA Exported Functions

Input and Output operation functions. More...

Functions

HAL_StatusTypeDef HAL_DMA_Start (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
 Start the DMA Transfer.
HAL_StatusTypeDef HAL_DMA_Start_IT (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
 Start the DMA Transfer with interrupt enabled.
HAL_StatusTypeDef HAL_DMA_Abort (DMA_HandleTypeDef *hdma)
 Abort the DMA Transfer.
HAL_StatusTypeDef HAL_DMA_Abort_IT (DMA_HandleTypeDef *hdma)
 Aborts the DMA Transfer in Interrupt mode.
HAL_StatusTypeDef HAL_DMA_PollForTransfer (DMA_HandleTypeDef *hdma, uint32_t CompleteLevel, uint32_t Timeout)
 Polling for transfer complete.
void HAL_DMA_IRQHandler (DMA_HandleTypeDef *hdma)
 Handles DMA interrupt request.
HAL_StatusTypeDef HAL_DMA_RegisterCallback (DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID, void(*pCallback)(DMA_HandleTypeDef *_hdma))
 Register callbacks.
HAL_StatusTypeDef HAL_DMA_UnRegisterCallback (DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID)
 UnRegister callbacks.

Detailed Description

Input and Output operation functions.

 ===============================================================================
                      #####  IO operation functions  #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Configure the source, destination address and data length and Start DMA transfer
      (+) Configure the source, destination address and data length and
          Start DMA transfer with interrupt
      (+) Abort DMA transfer
      (+) Poll for transfer complete
      (+) Handle DMA interrupt request


Function Documentation

HAL_StatusTypeDef HAL_DMA_Abort ( DMA_HandleTypeDef hdma)
HAL_StatusTypeDef HAL_DMA_Abort_IT ( DMA_HandleTypeDef hdma)
HAL_StatusTypeDef HAL_DMA_PollForTransfer ( DMA_HandleTypeDef hdma,
uint32_t  CompleteLevel,
uint32_t  Timeout 
)

Polling for transfer complete.

Parameters:
hdma,:pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
CompleteLevel,:Specifies the DMA level complete.
Timeout,:Timeout duration.
Return values:
HALstatus

Definition at line 502 of file stm32f1xx_hal_dma.c.

References __HAL_DMA_CLEAR_FLAG, __HAL_DMA_GET_FLAG, __HAL_DMA_GET_HT_FLAG_INDEX, __HAL_DMA_GET_TC_FLAG_INDEX, __HAL_DMA_GET_TE_FLAG_INDEX, __DMA_HandleTypeDef::ChannelIndex, __DMA_HandleTypeDef::DmaBaseAddress, __DMA_HandleTypeDef::ErrorCode, HAL_DMA_ERROR_NO_XFER, HAL_DMA_ERROR_NOT_SUPPORTED, HAL_DMA_ERROR_TE, HAL_DMA_ERROR_TIMEOUT, HAL_DMA_FULL_TRANSFER, HAL_DMA_STATE_BUSY, HAL_DMA_STATE_READY, HAL_GetTick(), __DMA_HandleTypeDef::Instance, and __DMA_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA_RegisterCallback ( DMA_HandleTypeDef hdma,
HAL_DMA_CallbackIDTypeDef  CallbackID,
void(*)(DMA_HandleTypeDef *_hdma)  pCallback 
)

Register callbacks.

Parameters:
hdma,:pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
CallbackID,:User Callback identifer a HAL_DMA_CallbackIDTypeDef ENUM as parameter.
pCallback,:pointer to private callbacsk function which has pointer to a DMA_HandleTypeDef structure as parameter.
Return values:
HALstatus

Definition at line 693 of file stm32f1xx_hal_dma.c.

References HAL_DMA_STATE_READY, HAL_DMA_XFER_ABORT_CB_ID, HAL_DMA_XFER_CPLT_CB_ID, HAL_DMA_XFER_ERROR_CB_ID, HAL_DMA_XFER_HALFCPLT_CB_ID, __DMA_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

HAL_StatusTypeDef HAL_DMA_Start ( DMA_HandleTypeDef hdma,
uint32_t  SrcAddress,
uint32_t  DstAddress,
uint32_t  DataLength 
)

Start the DMA Transfer.

Parameters:
hdma,:pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
SrcAddress,:The source memory Buffer address
DstAddress,:The destination memory Buffer address
DataLength,:The length of data to be transferred from source to destination
Return values:
HALstatus

Definition at line 319 of file stm32f1xx_hal_dma.c.

References __HAL_DMA_DISABLE, __HAL_DMA_ENABLE, assert_param, DMA_SetConfig(), __DMA_HandleTypeDef::ErrorCode, HAL_DMA_ERROR_NONE, HAL_DMA_STATE_BUSY, HAL_DMA_STATE_READY, IS_DMA_BUFFER_SIZE, and __DMA_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA_Start_IT ( DMA_HandleTypeDef hdma,
uint32_t  SrcAddress,
uint32_t  DstAddress,
uint32_t  DataLength 
)

Start the DMA Transfer with interrupt enabled.

Parameters:
hdma,:pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
SrcAddress,:The source memory Buffer address
DstAddress,:The destination memory Buffer address
DataLength,:The length of data to be transferred from source to destination
Return values:
HALstatus

Definition at line 362 of file stm32f1xx_hal_dma.c.

References __HAL_DMA_DISABLE, __HAL_DMA_DISABLE_IT, __HAL_DMA_ENABLE, __HAL_DMA_ENABLE_IT, assert_param, DMA_IT_HT, DMA_IT_TC, DMA_IT_TE, DMA_SetConfig(), __DMA_HandleTypeDef::ErrorCode, HAL_DMA_ERROR_NONE, HAL_DMA_STATE_BUSY, HAL_DMA_STATE_READY, IS_DMA_BUFFER_SIZE, __DMA_HandleTypeDef::State, and __DMA_HandleTypeDef::XferHalfCpltCallback.

Referenced by HAL_ADC_Start_DMA(), HAL_ADCEx_MultiModeStart_DMA(), HAL_I2C_Master_Receive_DMA(), HAL_I2C_Master_Seq_Receive_DMA(), HAL_I2C_Master_Seq_Transmit_DMA(), HAL_I2C_Master_Transmit_DMA(), HAL_I2C_Mem_Read_DMA(), HAL_I2C_Mem_Write_DMA(), HAL_I2C_Slave_Receive_DMA(), HAL_I2C_Slave_Seq_Receive_DMA(), HAL_I2C_Slave_Seq_Transmit_DMA(), HAL_I2C_Slave_Transmit_DMA(), HAL_IRDA_Receive_DMA(), HAL_IRDA_Transmit_DMA(), HAL_SMARTCARD_Receive_DMA(), HAL_SMARTCARD_Transmit_DMA(), HAL_SPI_Receive_DMA(), HAL_SPI_Transmit_DMA(), HAL_SPI_TransmitReceive_DMA(), HAL_TIM_Base_Start_DMA(), HAL_TIM_DMABurst_MultiReadStart(), HAL_TIM_DMABurst_MultiWriteStart(), HAL_TIM_Encoder_Start_DMA(), HAL_TIM_IC_Start_DMA(), HAL_TIM_OC_Start_DMA(), HAL_TIM_PWM_Start_DMA(), HAL_TIMEx_HallSensor_Start_DMA(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_PWMN_Start_DMA(), HAL_UART_Transmit_DMA(), HAL_USART_Receive_DMA(), HAL_USART_Transmit_DMA(), HAL_USART_TransmitReceive_DMA(), and UART_Start_Receive_DMA().

HAL_StatusTypeDef HAL_DMA_UnRegisterCallback ( DMA_HandleTypeDef hdma,
HAL_DMA_CallbackIDTypeDef  CallbackID 
)

UnRegister callbacks.

Parameters:
hdma,:pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
CallbackID,:User Callback identifer a HAL_DMA_CallbackIDTypeDef ENUM as parameter.
Return values:
HALstatus

Definition at line 744 of file stm32f1xx_hal_dma.c.

References HAL_DMA_STATE_READY, HAL_DMA_XFER_ABORT_CB_ID, HAL_DMA_XFER_ALL_CB_ID, HAL_DMA_XFER_CPLT_CB_ID, HAL_DMA_XFER_ERROR_CB_ID, HAL_DMA_XFER_HALFCPLT_CB_ID, __DMA_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.