Functions
Input and Output operation functions
Peripheral Driver » HAL Driver » DMA » Functions

Input and Output operation functions. More...

Collaboration diagram for Input and Output operation functions:

## Functions
hal_status_t | hal_dma_start (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length)
| Start the DMA Transfer. More...
hal_status_t | hal_dma_start_sg_llp (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length, dma_sg_llp_config_t *sg_llp_config)
| Start the DMA Transfer. More...
hal_status_t | hal_dma_start_it_dc (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length)
| Start the DMA Transfer with interrupt enabled & Channel Diabled. More...
hal_status_t | hal_dma_start_it (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length)
| Start the DMA Transfer with interrupt enabled & Channel Enabled. More...
hal_status_t | hal_dma_start_sg_llp_it_dc (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length, dma_sg_llp_config_t *sg_llp_config)
| Start the DMA Transfer with Channel Disabled. More...
hal_status_t | hal_dma_start_sg_llp_it (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length, dma_sg_llp_config_t *sg_llp_config)
| Start the DMA Transfer with Channel Enabled. More...
hal_status_t | hal_dma_abort (dma_handle_t *p_dma)
| Abort the DMA Transfer. More...
hal_status_t | hal_dma_abort_it (dma_handle_t *p_dma)
| Aborts the DMA Transfer in Interrupt mode. More...
hal_status_t | hal_dma_poll_for_transfer (dma_handle_t *p_dma, uint32_t timeout)
| Polling for transfer complete. More...

## 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_dma_abort()

hal_status_t hal_dma_abort | ( | dma_handle_t * | p_dma | ) |

Abort the DMA Transfer.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_abort_it()

hal_status_t hal_dma_abort_it | ( | dma_handle_t * | p_dma | ) |

Aborts the DMA Transfer in Interrupt mode.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_poll_for_transfer()

hal_status_t hal_dma_poll_for_transfer | ( | dma_handle_t * | p_dma,
|  | uint32_t | timeout
| ) |  |

Polling for transfer complete.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | timeout | Timeout duration.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_start()

hal_status_t hal_dma_start | ( | dma_handle_t * | p_dma,
|  | uint32_t | src_address,
|  | uint32_t | dst_address,
|  | uint32_t | data_length
| ) |  |

Start the DMA Transfer.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | src_address | The source memory Buffer address
  [in] | dst_address | The destination memory Buffer address
  [in] | data_length | The length of data to be transferred from source to destination, ranging between 0 and 4095.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_start_it()

hal_status_t hal_dma_start_it | ( | dma_handle_t * | p_dma,
|  | uint32_t | src_address,
|  | uint32_t | dst_address,
|  | uint32_t | data_length
| ) |  |

Start the DMA Transfer with interrupt enabled & Channel Enabled.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | src_address | The source memory Buffer address
  [in] | dst_address | The destination memory Buffer address
  [in] | data_length | The length of data to be transferred from source to destination, ranging between 0 and 4095.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_start_it_dc()

hal_status_t hal_dma_start_it_dc | ( | dma_handle_t * | p_dma,
|  | uint32_t | src_address,
|  | uint32_t | dst_address,
|  | uint32_t | data_length
| ) |  |

Start the DMA Transfer with interrupt enabled & Channel Diabled.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | src_address | The source memory Buffer address
  [in] | dst_address | The destination memory Buffer address
  [in] | data_length | The length of data to be transferred from source to destination, ranging between 0 and 4095.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_start_sg_llp()

hal_status_t hal_dma_start_sg_llp | ( | dma_handle_t * | p_dma,
|  | uint32_t | src_address,
|  | uint32_t | dst_address,
|  | uint32_t | data_length,
|  | dma_sg_llp_config_t * | sg_llp_config
| ) |  |

Start the DMA Transfer.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | src_address | The source memory Buffer address
  [in] | dst_address | The destination memory Buffer address
  [in] | data_length | The length of data to be transferred from source to destination, ranging between 0 and 4095.
  [in] | sg_llp_config | The config of source and destination.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_start_sg_llp_it()

hal_status_t hal_dma_start_sg_llp_it | ( | dma_handle_t * | p_dma,
|  | uint32_t | src_address,
|  | uint32_t | dst_address,
|  | uint32_t | data_length,
|  | dma_sg_llp_config_t * | sg_llp_config
| ) |  |

Start the DMA Transfer with Channel Enabled.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | src_address | The source memory Buffer address
  [in] | dst_address | The destination memory Buffer address
  [in] | data_length | The length of data to be transferred from source to destination, ranging between 0 and 4095.
  [in] | sg_llp_config | The config of source and destination.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_dma_start_sg_llp_it_dc()

hal_status_t hal_dma_start_sg_llp_it_dc | ( | dma_handle_t * | p_dma,
|  | uint32_t | src_address,
|  | uint32_t | dst_address,
|  | uint32_t | data_length,
|  | dma_sg_llp_config_t * | sg_llp_config
| ) |  |

Start the DMA Transfer with Channel Disabled.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | src_address | The source memory Buffer address
  [in] | dst_address | The destination memory Buffer address
  [in] | data_length | The length of data to be transferred from source to destination, ranging between 0 and 4095.
  [in] | sg_llp_config | The config of source and destination.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.