| BlueNRG-1 Peripherals drivers APIs

- Main Page
- Modules
- Classes
- Files

Functions
Exported Functions
BLUENRG1 Peripheral Driver » DMA Peripheral

## Functions

void | DMA_DeInit (DMA_CH_Type *DMAy_Channelx)
| Deinitializes the DMAy Channelx registers to their default reset values. More...
void | DMA_Init (DMA_CH_Type *DMAy_Channelx, DMA_InitType *DMA_InitStruct)
| Initializes the DMAy Channelx according to the specified parameters in the DMA_InitStruct. More...
void | DMA_StructInit (DMA_InitType *DMA_InitStruct)
| Fills each DMA_InitStruct member with its default value. More...
void | DMA_Cmd (DMA_CH_Type *DMAy_Channelx, FunctionalState NewState)
| Enables or disables the specified DMAy Channelx. More...
void | DMA_SelectAdcChannel (uint8_t DMA_AdcChannel, FunctionalState NewState)
| Enables or disables the specified DMA ADC Channel. More...
void | DMA_SetCurrDataCounter (DMA_CH_Type *DMAy_Channelx, uint16_t DataNumber)
| Sets the number of data units in the current DMAy Channelx transfer. More...
uint16_t | DMA_GetCurrDataCounter (DMA_CH_Type *DMAy_Channelx)
| Returns the number of remaining data units in the current DMAy Channelx transfer. More...
FlagStatus | DMA_GetFlagStatus (uint32_t DMA_Flag)
| Checks whether the specified DMAy Channelx flag is set or not. More...
void | DMA_FlagConfig (DMA_CH_Type *DMAy_Channelx, uint32_t DMA_Flag, FunctionalState NewState)
| Enables or disables the specified DMAy Channelx interrupts. More...
void | DMA_ClearFlag (uint32_t DMA_Flag)
| Clears the DMAy Channelx's pending flags. More...

## Detailed Description

## Function Documentation

void DMA_ClearFlag | ( | uint32_t | DMA_Flag | ) |

Clears the DMAy Channelx's pending flags.

Parameters

  DMA_Flag | specifies the flag to clear. This parameter can be any combination (for the same DMA) of the following values:
  - DMA_FLAG_GL1: DMA Channel1 global flag.
  - DMA_FLAG_TC1: DMA Channel1 transfer complete flag.
  - DMA_FLAG_HT1: DMA Channel1 half transfer flag.
  - DMA_FLAG_TE1: DMA Channel1 transfer error flag.
  - DMA_FLAG_GL2: DMA Channel2 global flag.
  - DMA_FLAG_TC2: DMA Channel2 transfer complete flag.
  - DMA_FLAG_HT2: DMA Channel2 half transfer flag.
  - DMA_FLAG_TE2: DMA Channel2 transfer error flag.
  - DMA_FLAG_GL3: DMA Channel3 global flag.
  - DMA_FLAG_TC3: DMA Channel3 transfer complete flag.
  - DMA_FLAG_HT3: DMA Channel3 half transfer flag.
  - DMA_FLAG_TE3: DMA Channel3 transfer error flag.
  - DMA_FLAG_GL4: DMA Channel4 global flag.
  - DMA_FLAG_TC4: DMA Channel4 transfer complete flag.
  - DMA_FLAG_HT4: DMA Channel4 half transfer flag.
  - DMA_FLAG_TE4: DMA Channel4 transfer error flag.
  - DMA_FLAG_GL5: DMA Channel5 global flag.
  - DMA_FLAG_TC5: DMA Channel5 transfer complete flag.
  - DMA_FLAG_HT5: DMA Channel5 half transfer flag.
  - DMA_FLAG_TE5: DMA Channel5 transfer error flag.
  - DMA_FLAG_GL6: DMA Channel6 global flag.
  - DMA_FLAG_TC6: DMA Channel6 transfer complete flag.
  - DMA_FLAG_HT6: DMA Channel6 half transfer flag.
  - DMA_FLAG_TE6: DMA Channel6 transfer error flag.
  - DMA_FLAG_GL7: DMA Channel7 global flag.
  - DMA_FLAG_TC7: DMA Channel7 transfer complete flag.
  - DMA_FLAG_HT7: DMA Channel7 half transfer flag.
  - DMA_FLAG_TE7: DMA Channel7 transfer error flag.

Note
  Clearing the Global flag (DMAy_FLAG_GLx) results in clearing all other flags relative to the same channel (Transfer Complete, Half-transfer Complete and Transfer Error flags: DMAy_FLAG_TCx, DMAy_FLAG_HTx and DMAy_FLAG_TEx).

Return values

  None |

Definition at line 487 of file BlueNRG1_dma.c.

void DMA_Cmd | ( | DMA_CH_Type * | DMAy_Channelx,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified DMAy Channelx.

Parameters

  DMAy_Channelx | where y can be 1 to select the DMA and x can be 1 to 7 for DMA to select the DMA Channel.
  NewState | new state of the DMAy Channelx. This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 274 of file BlueNRG1_dma.c.

void DMA_DeInit | ( | DMA_CH_Type * | DMAy_Channelx | ) |

Deinitializes the DMAy Channelx registers to their default reset values.

Parameters

  DMAy_Channelx | where y can be 1 to select the DMA and x can be 1 to 7 for DMA to select the DMA Channel.

Return values

  None |

Definition at line 116 of file BlueNRG1_dma.c.

void DMA_FlagConfig | ( | DMA_CH_Type * | DMAy_Channelx,
|  | uint32_t | DMA_Flag,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified DMAy Channelx interrupts.

Parameters

  DMAy_Channelx | where y can be 1 to select the DMA and x can be 1 to 7 for DMA to select the DMA Channel.
  DMA_Flag | specifies the DMA interrupts sources to be enabled or disabled. This parameter can be any combination of the following values:
  - DMA_Flag_TC: Transfer complete interrupt mask
  - DMA_Flag_HT: Half transfer interrupt mask
  - DMA_Flag_TE: Transfer error interrupt mask
  NewState | new state of the specified DMA interrupts. This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 364 of file BlueNRG1_dma.c.

uint16_t DMA_GetCurrDataCounter | ( | DMA_CH_Type * | DMAy_Channelx | ) |

Returns the number of remaining data units in the current DMAy Channelx transfer.

Parameters

  DMAy_Channelx | where y can be 1 to select the DMA and x can be 1 to 7 for DMA to select the DMA Channel.

Return values

  The | number of remaining data units in the current DMAy Channelx transfer.

Definition at line 342 of file BlueNRG1_dma.c.

FlagStatus DMA_GetFlagStatus | ( | uint32_t | DMA_Flag | ) |

Checks whether the specified DMAy Channelx flag is set or not.

Parameters

  DMA_Flag | specifies the flag to check. This parameter can be one of the following values:
  - DMA_FLAG_GL1: DMA Channel1 global flag.
  - DMA_FLAG_TC1: DMA Channel1 transfer complete flag.
  - DMA_FLAG_HT1: DMA Channel1 half transfer flag.
  - DMA_FLAG_TE1: DMA Channel1 transfer error flag.
  - DMA_FLAG_GL2: DMA Channel2 global flag.
  - DMA_FLAG_TC2: DMA Channel2 transfer complete flag.
  - DMA_FLAG_HT2: DMA Channel2 half transfer flag.
  - DMA_FLAG_TE2: DMA Channel2 transfer error flag.
  - DMA_FLAG_GL3: DMA Channel3 global flag.
  - DMA_FLAG_TC3: DMA Channel3 transfer complete flag.
  - DMA_FLAG_HT3: DMA Channel3 half transfer flag.
  - DMA_FLAG_TE3: DMA Channel3 transfer error flag.
  - DMA_FLAG_GL4: DMA Channel4 global flag.
  - DMA_FLAG_TC4: DMA Channel4 transfer complete flag.
  - DMA_FLAG_HT4: DMA Channel4 half transfer flag.
  - DMA_FLAG_TE4: DMA Channel4 transfer error flag.
  - DMA_FLAG_GL5: DMA Channel5 global flag.
  - DMA_FLAG_TC5: DMA Channel5 transfer complete flag.
  - DMA_FLAG_HT5: DMA Channel5 half transfer flag.
  - DMA_FLAG_TE5: DMA Channel5 transfer error flag.
  - DMA_FLAG_GL6: DMA Channel6 global flag.
  - DMA_FLAG_TC6: DMA Channel6 transfer complete flag.
  - DMA_FLAG_HT6: DMA Channel6 half transfer flag.
  - DMA_FLAG_TE6: DMA Channel6 transfer error flag.
  - DMA_FLAG_GL7: DMA Channel7 global flag.
  - DMA_FLAG_TC7: DMA Channel7 transfer complete flag.
  - DMA_FLAG_HT7: DMA Channel7 half transfer flag.
  - DMA_FLAG_TE7: DMA Channel7 transfer error flag.

Note
  The Global flag (DMAy_FLAG_GLx) is set whenever any of the other flags relative to the same channel is set (Transfer Complete, Half-transfer Complete or Transfer Error flags: DMAy_FLAG_TCx, DMAy_FLAG_HTx or DMAy_FLAG_TEx).

Return values

  The | new state of DMA_Flag (SET or RESET).

Definition at line 422 of file BlueNRG1_dma.c.

void DMA_Init | ( | DMA_CH_Type * | DMAy_Channelx,
|  | DMA_InitType * | DMA_InitStruct
| ) |  |

Initializes the DMAy Channelx according to the specified parameters in the DMA_InitStruct.

Parameters

  DMAy_Channelx | where y can be 1 to select the DMA and x can be 1 to 7 for DMA to select the DMA Channel.
  DMA_InitStruct | pointer to a DMA_InitType structure that contains the configuration information for the specified DMA Channel.

Return values

  None |

Definition at line 182 of file BlueNRG1_dma.c.

void DMA_SelectAdcChannel | ( | uint8_t | DMA_AdcChannel,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified DMA ADC Channel.

Parameters

  DMA_AdcChannel | ADC channel from 0 to 7.
  NewState | new state of the DMA ADC Channel. This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 298 of file BlueNRG1_dma.c.

void DMA_SetCurrDataCounter | ( | DMA_CH_Type * | DMAy_Channelx,
|  | uint16_t | DataNumber
| ) |  |

Sets the number of data units in the current DMAy Channelx transfer.

Parameters

  DMAy_Channelx | where y can be 1 to select the DMA and x can be 1 to 7 for DMA to select the DMA Channel.
  DataNumber | The number of data units in the current DMAy Channelx transfer.

Note
  This function can only be used when the DMAy_Channelx is disabled.

Return values

  None. |

Definition at line 324 of file BlueNRG1_dma.c.

void DMA_StructInit | ( | DMA_InitType * | DMA_InitStruct | ) |

Fills each DMA_InitStruct member with its default value.

Parameters

  DMA_InitStruct | pointer to a DMA_InitType structure which will be initialized.

Return values

  None |

Definition at line 239 of file BlueNRG1_dma.c.