Functions
IRQ Handler and Callbacks
Peripheral Driver » HAL Driver » DMA » Functions

IRQ Handler and Callbacks functions. More...

Collaboration diagram for IRQ Handler and Callbacks:

## Functions
void | hal_dma_irq_handler (dma_handle_t *p_dma)
| Handle DMA interrupt request. More...
hal_status_t | hal_dma_register_callback (dma_handle_t *p_dma, hal_dma_callback_id_t id, void(*callback)(dma_handle_t *p_dma))
| Register callbacks. More...
hal_status_t | hal_dma_unregister_callback (dma_handle_t *p_dma, hal_dma_callback_id_t id)
| UnRegister callbacks. More...

## Detailed Description

IRQ Handler and Callbacks functions.

## Function Documentation

## ◆ hal_dma_irq_handler()

void hal_dma_irq_handler | ( | dma_handle_t * | p_dma | ) |

Handle DMA interrupt request.

Parameters

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

## ◆ hal_dma_register_callback()

hal_status_t hal_dma_register_callback | ( | dma_handle_t * | p_dma,
|  | hal_dma_callback_id_t | id,
|  | void(*)(dma_handle_t *p_dma) | callback
| ) |  |

Register callbacks.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | id | User Callback identifer. This parameter can be one of the following values: HAL_DMA_XFER_TFR_CB_ID HAL_DMA_XFER_BLK_CB_ID HAL_DMA_XFER_ERROR_CB_ID HAL_DMA_XFER_ABORT_CB_ID
  [in] | callback | Pointer to private callbacsk function which has pointer to a dma_handle_t structure as parameter.

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_unregister_callback()

hal_status_t hal_dma_unregister_callback | ( | dma_handle_t * | p_dma,
|  | hal_dma_callback_id_t | id
| ) |  |

UnRegister callbacks.

Parameters

  [in] | p_dma | Pointer to a DMA handle which contains the configuration information for the specified DMA Channel.
  [in] | id | User Callback identifer. This parameter can be a combiantion of the following values: HAL_DMA_XFER_TFR_CB_ID HAL_DMA_XFER_BLK_CB_ID HAL_DMA_XFER_ERROR_CB_ID HAL_DMA_XFER_ABORT_CB_ID HAL_DMA_XFER_ALL_CB_ID

Return values

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