Macros | |
#define | __HAL_DMA_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DMA_STATE_RESET) |
Reset DMA handle state. More... | |
#define | __HAL_DMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR |= DMAC_CCR1_EN) |
Enable the specified DMA Channel. More... | |
#define | __HAL_DMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR &= ~DMAC_CCR1_EN) |
Disable the specified DMA Channel. More... | |
#define | __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) |
Return the current DMA Channel transfer complete flag. More... | |
#define | __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__) |
Return the current DMA Channel half transfer complete flag. More... | |
#define | __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__) |
Return the current DMA Channel transfer error flag. More... | |
#define | __HAL_DMA_GET_GI_FLAG_INDEX(__HANDLE__) |
Return the current DMA Channel Global interrupt flag. More... | |
#define | __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__) ((uint32_t)((__HANDLE__)->DmaBaseAddress->ISR & (__FLAG__:))) |
Get the DMA Channel pending flags. More... | |
#define | __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->DmaBaseAddress->IFCR = (__FLAG__)) |
Clear the DMA Channel pending flags. More... | |
#define | __HAL_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CCR |= (__INTERRUPT__)) |
Enable the specified DMA Channel interrupts. More... | |
#define | __HAL_DMA_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CCR &= ~(__INTERRUPT__)) |
Disable the specified DMA Channel interrupts. More... | |
#define | __HAL_DMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CCR & (__INTERRUPT__))) |
Check whether the specified DMA Channel interrupt is enabled or not. More... | |
#define | __HAL_DMA_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->CNDTR) |
Return the number of remaining data units in the current DMA Channel transfer. More... | |
#define | __HAL_DMA_SET_COUNTER(__HANDLE__, __DATA_COUNTS__) ((__HANDLE__)->Instance->CNDTR = __DATA_COUNTS__) |
restart the current DMA Channel transfer. More... | |
#define | __HAL_DMA_SET_CIRCLUAR_MODE(__HANDLE__, __CIRCLUAR_MODE__) ((__HANDLE__)->Instance->CCR |= __CIRCLUAR_MODE__) |
Set circular mode for the current DMA Channel transfer. More... | |
#define | __HAL_DMA_CLEAR_CIRCLUAR_MODE(__HANDLE__, __CIRCLUAR_MODE__) ((__HANDLE__)->Instance->CCR &= ~(__CIRCLUAR_MODE__)) |
Clear circular mode for the current DMA Channel transfer. More... | |
DMA_Exported_Constants
#define __HAL_DMA_CLEAR_CIRCLUAR_MODE | ( | __HANDLE__, | |
__CIRCLUAR_MODE__ | |||
) | ((__HANDLE__)->Instance->CCR &= ~(__CIRCLUAR_MODE__)) |
Clear circular mode for the current DMA Channel transfer.
__HANDLE__ | DMA handle |
__CIRCLUAR_MODE__ | Circluar mode, 0 disable, 1 enable |
None. |
#define __HAL_DMA_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((__HANDLE__)->DmaBaseAddress->IFCR = (__FLAG__)) |
Clear the DMA Channel pending flags.
__HANDLE__ | DMA handle |
__FLAG__ | specifies the flag to clear. This parameter can be any combination of the following values:
|
None |
#define __HAL_DMA_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CCR &= ~DMAC_CCR1_EN) |
Disable the specified DMA Channel.
__HANDLE__ | DMA handle |
None |
#define __HAL_DMA_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->CCR &= ~(__INTERRUPT__)) |
Disable the specified DMA Channel interrupts.
__HANDLE__ | DMA handle |
__INTERRUPT__ | specifies the DMA interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
|
None |
#define __HAL_DMA_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CCR |= DMAC_CCR1_EN) |
Enable the specified DMA Channel.
__HANDLE__ | DMA handle |
None |
#define __HAL_DMA_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->CCR |= (__INTERRUPT__)) |
Enable the specified DMA Channel interrupts.
__HANDLE__ | DMA handle |
__INTERRUPT__ | specifies the DMA interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
|
None |
#define __HAL_DMA_GET_COUNTER | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CNDTR) |
Return the number of remaining data units in the current DMA Channel transfer.
__HANDLE__ | DMA handle |
The | number of remaining data units in the current DMA Channel transfer. |
#define __HAL_DMA_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((uint32_t)((__HANDLE__)->DmaBaseAddress->ISR & (__FLAG__:))) |
Get the DMA Channel pending flags.
__HANDLE__ | DMA handle |
__FLAG__ | Get the specified flag. This parameter can be any combination of the following values:
|
The | state of FLAG (SET or RESET). |
#define __HAL_DMA_GET_GI_FLAG_INDEX | ( | __HANDLE__ | ) |
Return the current DMA Channel Global interrupt flag.
__HANDLE__ | DMA handle |
The | specified transfer error flag index. |
#define __HAL_DMA_GET_HT_FLAG_INDEX | ( | __HANDLE__ | ) |
Return the current DMA Channel half transfer complete flag.
__HANDLE__ | DMA handle |
The | specified half transfer complete flag index. |
#define __HAL_DMA_GET_IT_SOURCE | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | (((__HANDLE__)->Instance->CCR & (__INTERRUPT__))) |
Check whether the specified DMA Channel interrupt is enabled or not.
__HANDLE__ | DMA handle |
__INTERRUPT__ | specifies the DMA interrupt source to check. This parameter can be one of the following values:
|
The | state of DMA_IT (SET or RESET). |
#define __HAL_DMA_GET_TC_FLAG_INDEX | ( | __HANDLE__ | ) |
Return the current DMA Channel transfer complete flag.
__HANDLE__ | DMA handle |
The | specified transfer complete flag index. |
#define __HAL_DMA_GET_TE_FLAG_INDEX | ( | __HANDLE__ | ) |
Return the current DMA Channel transfer error flag.
__HANDLE__ | DMA handle |
The | specified transfer error flag index. |
#define __HAL_DMA_RESET_HANDLE_STATE | ( | __HANDLE__ | ) | ((__HANDLE__)->State = HAL_DMA_STATE_RESET) |
Reset DMA handle state.
__HANDLE__ | DMA handle |
None |
#define __HAL_DMA_SET_CIRCLUAR_MODE | ( | __HANDLE__, | |
__CIRCLUAR_MODE__ | |||
) | ((__HANDLE__)->Instance->CCR |= __CIRCLUAR_MODE__) |
Set circular mode for the current DMA Channel transfer.
__HANDLE__ | DMA handle |
__CIRCLUAR_MODE__ | Circluar mode, 0 disable, 1 enable |
None. |
#define __HAL_DMA_SET_COUNTER | ( | __HANDLE__, | |
__DATA_COUNTS__ | |||
) | ((__HANDLE__)->Instance->CNDTR = __DATA_COUNTS__) |
restart the current DMA Channel transfer.
__HANDLE__ | DMA handle |
__DATA_COUNTS__ | number of data to transfer (0 to 2^16 - 1) |
None. |