STM32F4 Standard Peripheral bibliotheek
1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
|
DMA driver modules. More...
Modules | |
DMA_Exported_Constants | |
DMA_Private_Functions | |
Data Structures | |
struct | DMA_InitTypeDef |
DMA Init structure definition. More... | |
Functions | |
void | DMA_DeInit (DMA_Stream_TypeDef *DMAy_Streamx) |
Deinitialize the DMAy Streamx registers to their default reset values. More... | |
void | DMA_Init (DMA_Stream_TypeDef *DMAy_Streamx, DMA_InitTypeDef *DMA_InitStruct) |
Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure. More... | |
void | DMA_StructInit (DMA_InitTypeDef *DMA_InitStruct) |
Fills each DMA_InitStruct member with its default value. More... | |
void | DMA_Cmd (DMA_Stream_TypeDef *DMAy_Streamx, FunctionalState NewState) |
Enables or disables the specified DMAy Streamx. More... | |
void | DMA_PeriphIncOffsetSizeConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_Pincos) |
Configures, when the PINC (Peripheral Increment address mode) bit is set, if the peripheral address should be incremented with the data size (configured with PSIZE bits) or by a fixed offset equal to 4 (32-bit aligned addresses). More... | |
void | DMA_FlowControllerConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_FlowCtrl) |
Configures, when the DMAy Streamx is disabled, the flow controller for the next transactions (Peripheral or Memory). More... | |
void | DMA_SetCurrDataCounter (DMA_Stream_TypeDef *DMAy_Streamx, uint16_t Counter) |
Writes the number of data units to be transferred on the DMAy Streamx. More... | |
uint16_t | DMA_GetCurrDataCounter (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the number of remaining data units in the current DMAy Streamx transfer. More... | |
void | DMA_DoubleBufferModeConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t Memory1BaseAddr, uint32_t DMA_CurrentMemory) |
Configures, when the DMAy Streamx is disabled, the double buffer mode and the current memory target. More... | |
void | DMA_DoubleBufferModeCmd (DMA_Stream_TypeDef *DMAy_Streamx, FunctionalState NewState) |
Enables or disables the double buffer mode for the selected DMA stream. More... | |
void | DMA_MemoryTargetConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t MemoryBaseAddr, uint32_t DMA_MemoryTarget) |
Configures the Memory address for the next buffer transfer in double buffer mode (for dynamic use). This function can be called when the DMA Stream is enabled and when the transfer is ongoing. More... | |
uint32_t | DMA_GetCurrentMemoryTarget (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the current memory target used by double buffer transfer. More... | |
FunctionalState | DMA_GetCmdStatus (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the status of EN bit for the specified DMAy Streamx. More... | |
uint32_t | DMA_GetFIFOStatus (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the current DMAy Streamx FIFO filled level. More... | |
FlagStatus | DMA_GetFlagStatus (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_FLAG) |
Checks whether the specified DMAy Streamx flag is set or not. More... | |
void | DMA_ClearFlag (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_FLAG) |
Clears the DMAy Streamx's pending flags. More... | |
void | DMA_ITConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_IT, FunctionalState NewState) |
Enables or disables the specified DMAy Streamx interrupts. More... | |
ITStatus | DMA_GetITStatus (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_IT) |
Checks whether the specified DMAy Streamx interrupt has occurred or not. More... | |
void | DMA_ClearITPendingBit (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_IT) |
Clears the DMAy Streamx's interrupt pending bits. More... | |
DMA driver modules.
#define DMA_Stream0_IT_MASK |
#define TRANSFER_IT_ENABLE_MASK |
void DMA_ClearFlag | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_FLAG | ||
) |
Clears the DMAy Streamx's pending flags.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_FLAG,: | specifies the flag to clear. This parameter can be any combination of the following values:
|
None |
void DMA_ClearITPendingBit | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_IT | ||
) |
Clears the DMAy Streamx's interrupt pending bits.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_IT,: | specifies the DMA interrupt pending bit to clear. This parameter can be any combination of the following values:
|
None |
void DMA_Cmd | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified DMAy Streamx.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
NewState,: | new state of the DMAy Streamx. This parameter can be: ENABLE or DISABLE. |
None |
void DMA_DeInit | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Deinitialize the DMAy Streamx registers to their default reset values.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
None |
void DMA_DoubleBufferModeCmd | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
FunctionalState | NewState | ||
) |
Enables or disables the double buffer mode for the selected DMA stream.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
NewState,: | new state of the DMAy Streamx double buffer mode. This parameter can be: ENABLE or DISABLE. |
None |
void DMA_DoubleBufferModeConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | Memory1BaseAddr, | ||
uint32_t | DMA_CurrentMemory | ||
) |
Configures, when the DMAy Streamx is disabled, the double buffer mode and the current memory target.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
Memory1BaseAddr,: | the base address of the second buffer (Memory 1) |
DMA_CurrentMemory,: | specifies which memory will be first buffer for the transactions when the Stream will be enabled. This parameter can be one of the following values:
|
None |
void DMA_FlowControllerConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_FlowCtrl | ||
) |
Configures, when the DMAy Streamx is disabled, the flow controller for the next transactions (Peripheral or Memory).
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_FlowCtrl,: | specifies the DMA flow controller. This parameter can be one of the following values:
|
None |
FunctionalState DMA_GetCmdStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the status of EN bit for the specified DMAy Streamx.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
Current | state of the DMAy Streamx (ENABLE or DISABLE). |
uint16_t DMA_GetCurrDataCounter | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the number of remaining data units in the current DMAy Streamx transfer.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
The | number of remaining data units in the current DMAy Streamx transfer. |
uint32_t DMA_GetCurrentMemoryTarget | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the current memory target used by double buffer transfer.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
The | memory target number: 0 for Memory0 or 1 for Memory1. |
uint32_t DMA_GetFIFOStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the current DMAy Streamx FIFO filled level.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
The | FIFO filling state.
|
FlagStatus DMA_GetFlagStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_FLAG | ||
) |
Checks whether the specified DMAy Streamx flag is set or not.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_FLAG,: | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of DMA_FLAG (SET or RESET). |
ITStatus DMA_GetITStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_IT | ||
) |
Checks whether the specified DMAy Streamx interrupt has occurred or not.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_IT,: | specifies the DMA interrupt source to check. This parameter can be one of the following values:
|
The | new state of DMA_IT (SET or RESET). |
void DMA_Init | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
DMA_InitTypeDef * | DMA_InitStruct | ||
) |
Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_InitStruct,: | pointer to a DMA_InitTypeDef structure that contains the configuration information for the specified DMA Stream. |
None |
void DMA_ITConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_IT, | ||
FunctionalState | NewState | ||
) |
Enables or disables the specified DMAy Streamx interrupts.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_IT,: | specifies the DMA interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
|
NewState,: | new state of the specified DMA interrupts. This parameter can be: ENABLE or DISABLE. |
None |
void DMA_MemoryTargetConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | MemoryBaseAddr, | ||
uint32_t | DMA_MemoryTarget | ||
) |
Configures the Memory address for the next buffer transfer in double buffer mode (for dynamic use). This function can be called when the DMA Stream is enabled and when the transfer is ongoing.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
MemoryBaseAddr,: | The base address of the target memory buffer |
DMA_MemoryTarget,: | Next memory target to be used. This parameter can be one of the following values:
|
None |
void DMA_PeriphIncOffsetSizeConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_Pincos | ||
) |
Configures, when the PINC (Peripheral Increment address mode) bit is set, if the peripheral address should be incremented with the data size (configured with PSIZE bits) or by a fixed offset equal to 4 (32-bit aligned addresses).
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_Pincos,: | specifies the Peripheral increment offset size. This parameter can be one of the following values:
|
None |
void DMA_SetCurrDataCounter | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint16_t | Counter | ||
) |
Writes the number of data units to be transferred on the DMAy Streamx.
DMAy_Streamx,: | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
Counter,: | Number of data units to be transferred (from 0 to 65535) Number of data items depends only on the Peripheral data format. |
The | number of remaining data units in the current DMAy Streamx transfer. |
void DMA_StructInit | ( | DMA_InitTypeDef * | DMA_InitStruct | ) |
Fills each DMA_InitStruct member with its default value.
DMA_InitStruct | : pointer to a DMA_InitTypeDef structure which will be initialized. |
None |