Macros
DMA Private Macros
Peripheral Driver » HAL Driver » DMA » Defines

## Macros
#define | IS_DMA_ALL_P_INSTANCE(__p_instance__) (((__p_instance__) == DMA0))
| Check if DMA instance is valid. More...
#define | IS_DMA_ALL_INSTANCE(__instance__)
| Check if DMA channel instance is valid. More...
#define | IS_DMA_ALL_REQUEST(__REQUEST__)
| Check if DMA request is valid. More...
#define | IS_DMA_DIRECTION(__DIRECTION__)
| Check if DMA direction is valid. More...
#define | IS_DMA_BUFFER_SIZE(__SIZE__) (((__SIZE__) >= 0x1) && ((__SIZE__) <= 0xFFF))
| Check if DMA buffer size is valid. More...
#define | IS_DMA_SOURCE_INC_STATE(__STATE__)
| Check if DMA source address increment state is valid. More...
#define | IS_DMA_DESTINATION_INC_STATE(__STATE__)
| Check if DMA destination address increment state is valid. More...
#define | IS_DMA_SOURCE_DATA_SIZE(__SIZE__)
| Check if DMA source data size is valid. More...
#define | IS_DMA_DESTINATION_DATA_SIZE(__SIZE__)
| Check if DMA destination data size is valid. More...
#define | IS_DMA_PRIORITY(__PRIORITY__)
| Check if DMA priority is valid. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_DMA_ALL_INSTANCE

#define IS_DMA_ALL_INSTANCE | ( |  | __instance__ | ) |

Value:
(((__instance__) == DMA_Channel0) || \
((__instance__) == DMA_Channel1) || \
((__instance__) == DMA_Channel2) || \
((__instance__) == DMA_Channel3) || \
((__instance__) == DMA_Channel4))

Check if DMA channel instance is valid.

Parameters

  __instance__ | DMA channel instance.

Return values

  SET | (__instance__ is valid) or RESET (__instance__ is invalid)

Definition at line 364 of file gr533x_hal_dma.h.

## ◆ IS_DMA_ALL_P_INSTANCE

#define IS_DMA_ALL_P_INSTANCE | ( |  | __p_instance__ | ) | (((__p_instance__) == DMA0))

Check if DMA instance is valid.

Parameters

  __p_instance__ | DMA instance.

Return values

  SET | (__p_instance__ is valid) or RESET (__p_instance__ is invalid)

Definition at line 357 of file gr533x_hal_dma.h.

## ◆ IS_DMA_ALL_REQUEST

#define IS_DMA_ALL_REQUEST | ( |  | __REQUEST__ | ) |

Value:
(((__REQUEST__) == DMA0_REQUEST_SPIM_TX) || \
((__REQUEST__) == DMA0_REQUEST_SPIM_RX) || \
((__REQUEST__) == DMA0_REQUEST_SPIS_TX) || \
((__REQUEST__) == DMA0_REQUEST_SPIS_RX) || \
((__REQUEST__) == DMA0_REQUEST_UART0_TX) || \
((__REQUEST__) == DMA0_REQUEST_UART0_RX) || \
((__REQUEST__) == DMA0_REQUEST_UART1_TX) || \
((__REQUEST__) == DMA0_REQUEST_UART1_RX) || \
((__REQUEST__) == DMA0_REQUEST_SNSADC) || \
((__REQUEST__) == DMA0_REQUEST_MEM) || \
((__REQUEST__) == DMA0_REQUEST_I2C0_TX) || \
((__REQUEST__) == DMA0_REQUEST_I2C0_RX) || \
((__REQUEST__) == DMA0_REQUEST_I2C1_TX) || \
((__REQUEST__) == DMA0_REQUEST_I2C1_RX))

Check if DMA request is valid.

Parameters

  __REQUEST__ | DMA request.

Return values

  SET | (__REQUEST__ is valid) or RESET (__REQUEST__ is invalid)

Definition at line 377 of file gr533x_hal_dma.h.

## ◆ IS_DMA_BUFFER_SIZE

#define IS_DMA_BUFFER_SIZE | ( |  | __SIZE__ | ) | (((__SIZE__) >= 0x1) && ((__SIZE__) <= 0xFFF))

Check if DMA buffer size is valid.

Parameters

  __SIZE__ | DMA buffer size.

Return values

  SET | (__SIZE__ is valid) or RESET (__SIZE__ is invalid)

Definition at line 405 of file gr533x_hal_dma.h.

## ◆ IS_DMA_DESTINATION_DATA_SIZE

#define IS_DMA_DESTINATION_DATA_SIZE | ( |  | __SIZE__ | ) |

Value:
(((__SIZE__) == DMA_DDATAALIGN_BYTE) || \
((__SIZE__) == DMA_DDATAALIGN_HALFWORD) || \
((__SIZE__) == DMA_DDATAALIGN_WORD ))

Check if DMA destination data size is valid.

Parameters

  __SIZE__ | DMA destination data size.

Return values

  SET | (__SIZE__ is valid) or RESET (__SIZE__ is invalid)

Definition at line 435 of file gr533x_hal_dma.h.

## ◆ IS_DMA_DESTINATION_INC_STATE

#define IS_DMA_DESTINATION_INC_STATE | ( |  | __STATE__ | ) |

Value:
(((__STATE__) == DMA_DST_INCREMENT) || \
((__STATE__) == DMA_DST_DECREMENT) || \
((__STATE__) == DMA_DST_NO_CHANGE))

Check if DMA destination address increment state is valid.

Parameters

  __STATE__ | DMA destination address increment state.

Return values

  SET | (__STATE__ is valid) or RESET (__STATE__ is invalid)

Definition at line 419 of file gr533x_hal_dma.h.

## ◆ IS_DMA_DIRECTION

#define IS_DMA_DIRECTION | ( |  | __DIRECTION__ | ) |

Value:
(((__DIRECTION__) == DMA_MEMORY_TO_MEMORY) || \
((__DIRECTION__) == DMA_MEMORY_TO_PERIPH) || \
((__DIRECTION__) == DMA_PERIPH_TO_MEMORY) || \
((__DIRECTION__) == DMA_PERIPH_TO_PERIPH))

Check if DMA direction is valid.

Parameters

  __DIRECTION__ | DMA direction.

Return values

  SET | (__DIRECTION__ is valid) or RESET (__DIRECTION__ is invalid)

Definition at line 396 of file gr533x_hal_dma.h.

## ◆ IS_DMA_PRIORITY

#define IS_DMA_PRIORITY | ( |  | __PRIORITY__ | ) |

Value:
(((__PRIORITY__) == DMA_PRIORITY_LOW ) || \
((__PRIORITY__) == DMA_PRIORITY_MEDIUM) || \
((__PRIORITY__) == DMA_PRIORITY_HIGH) || \
((__PRIORITY__) == DMA_PRIORITY_VERY_HIGH))

Check if DMA priority is valid.

Parameters

  __PRIORITY__ | DMA priority.

Return values

  SET | (__PRIORITY__ is valid) or RESET (__PRIORITY__ is invalid)

Definition at line 443 of file gr533x_hal_dma.h.

## ◆ IS_DMA_SOURCE_DATA_SIZE

#define IS_DMA_SOURCE_DATA_SIZE | ( |  | __SIZE__ | ) |

Value:
(((__SIZE__) == DMA_SDATAALIGN_BYTE) || \
((__SIZE__) == DMA_SDATAALIGN_HALFWORD) || \
((__SIZE__) == DMA_SDATAALIGN_WORD))

Check if DMA source data size is valid.

Parameters

  __SIZE__ | DMA source data size.

Return values

  SET | (__SIZE__ is valid) or RESET (__SIZE__ is invalid)

Definition at line 427 of file gr533x_hal_dma.h.

## ◆ IS_DMA_SOURCE_INC_STATE

#define IS_DMA_SOURCE_INC_STATE | ( |  | __STATE__ | ) |

Value:
(((__STATE__) == DMA_SRC_INCREMENT) || \
((__STATE__) == DMA_SRC_DECREMENT) || \
((__STATE__) == DMA_SRC_NO_CHANGE))

Check if DMA source address increment state is valid.

Parameters

  __STATE__ | DMA source address increment state.

Return values

  SET | (__STATE__ is valid) or RESET (__STATE__ is invalid)

Definition at line 411 of file gr533x_hal_dma.h.

DMA0_REQUEST_I2C1_TX
#define DMA0_REQUEST_I2C1_TX
Definition: gr533x_hal_dma.h:259
DMA_Channel4
@ DMA_Channel4
Definition: gr533x_hal_dma.h:99
DMA0_REQUEST_I2C1_RX
#define DMA0_REQUEST_I2C1_RX
Definition: gr533x_hal_dma.h:260
DMA0_REQUEST_SPIS_RX
#define DMA0_REQUEST_SPIS_RX
Definition: gr533x_hal_dma.h:251
DMA_PRIORITY_MEDIUM
#define DMA_PRIORITY_MEDIUM
Definition: gr533x_hal_dma.h:312
DMA_SDATAALIGN_HALFWORD
#define DMA_SDATAALIGN_HALFWORD
Definition: gr533x_hal_dma.h:294
DMA0_REQUEST_I2C0_TX
#define DMA0_REQUEST_I2C0_TX
Definition: gr533x_hal_dma.h:257
DMA_Channel1
@ DMA_Channel1
Definition: gr533x_hal_dma.h:96
DMA_Channel0
@ DMA_Channel0
Definition: gr533x_hal_dma.h:95
DMA0_REQUEST_UART1_TX
#define DMA0_REQUEST_UART1_TX
Definition: gr533x_hal_dma.h:254
DMA_SRC_NO_CHANGE
#define DMA_SRC_NO_CHANGE
Definition: gr533x_hal_dma.h:279
DMA_PRIORITY_VERY_HIGH
#define DMA_PRIORITY_VERY_HIGH
Definition: gr533x_hal_dma.h:314
DMA0_REQUEST_UART0_TX
#define DMA0_REQUEST_UART0_TX
Definition: gr533x_hal_dma.h:252
DMA_SRC_DECREMENT
#define DMA_SRC_DECREMENT
Definition: gr533x_hal_dma.h:278
DMA0_REQUEST_UART1_RX
#define DMA0_REQUEST_UART1_RX
Definition: gr533x_hal_dma.h:255
DMA_DDATAALIGN_WORD
#define DMA_DDATAALIGN_WORD
Definition: gr533x_hal_dma.h:303
DMA_DDATAALIGN_BYTE
#define DMA_DDATAALIGN_BYTE
Definition: gr533x_hal_dma.h:301
DMA_Channel2
@ DMA_Channel2
Definition: gr533x_hal_dma.h:97
DMA_PERIPH_TO_PERIPH
#define DMA_PERIPH_TO_PERIPH
Definition: gr533x_hal_dma.h:271
DMA0_REQUEST_SNSADC
#define DMA0_REQUEST_SNSADC
Definition: gr533x_hal_dma.h:256
DMA0_REQUEST_MEM
#define DMA0_REQUEST_MEM
Definition: gr533x_hal_dma.h:261
DMA_PRIORITY_HIGH
#define DMA_PRIORITY_HIGH
Definition: gr533x_hal_dma.h:313
DMA0_REQUEST_UART0_RX
#define DMA0_REQUEST_UART0_RX
Definition: gr533x_hal_dma.h:253
DMA_SRC_INCREMENT
#define DMA_SRC_INCREMENT
Definition: gr533x_hal_dma.h:277
DMA_SDATAALIGN_BYTE
#define DMA_SDATAALIGN_BYTE
Definition: gr533x_hal_dma.h:293
DMA0_REQUEST_SPIS_TX
#define DMA0_REQUEST_SPIS_TX
Definition: gr533x_hal_dma.h:250
DMA_DST_NO_CHANGE
#define DMA_DST_NO_CHANGE
Definition: gr533x_hal_dma.h:287
DMA_MEMORY_TO_MEMORY
#define DMA_MEMORY_TO_MEMORY
Definition: gr533x_hal_dma.h:268
DMA_DST_DECREMENT
#define DMA_DST_DECREMENT
Definition: gr533x_hal_dma.h:286
DMA_SDATAALIGN_WORD
#define DMA_SDATAALIGN_WORD
Definition: gr533x_hal_dma.h:295
DMA_Channel3
@ DMA_Channel3
Definition: gr533x_hal_dma.h:98
DMA0_REQUEST_SPIM_RX
#define DMA0_REQUEST_SPIM_RX
Definition: gr533x_hal_dma.h:249
DMA_PERIPH_TO_MEMORY
#define DMA_PERIPH_TO_MEMORY
Definition: gr533x_hal_dma.h:270
DMA_PRIORITY_LOW
#define DMA_PRIORITY_LOW
Definition: gr533x_hal_dma.h:311
DMA_MEMORY_TO_PERIPH
#define DMA_MEMORY_TO_PERIPH
Definition: gr533x_hal_dma.h:269
DMA_DST_INCREMENT
#define DMA_DST_INCREMENT
Definition: gr533x_hal_dma.h:285
DMA0_REQUEST_SPIM_TX
#define DMA0_REQUEST_SPIM_TX
Definition: gr533x_hal_dma.h:248
DMA_DDATAALIGN_HALFWORD
#define DMA_DDATAALIGN_HALFWORD
Definition: gr533x_hal_dma.h:302
DMA0_REQUEST_I2C0_RX
#define DMA0_REQUEST_I2C0_RX
Definition: gr533x_hal_dma.h:258