discoverpixy
Macros | Functions
stm32f4xx_dma2d.c File Reference

This file provides firmware functions to manage the following functionalities of the DMA2D controller (DMA2D) peripheral: More...

#include "stm32f4xx_dma2d.h"
#include "stm32f4xx_rcc.h"
Include dependency graph for stm32f4xx_dma2d.c:

Macros

#define CR_MASK   ((uint32_t)0xFFFCE0FC) /* DMA2D CR Mask */
 
#define PFCCR_MASK   ((uint32_t)0x00FC00C0) /* DMA2D FGPFCCR Mask */
 
#define DEAD_MASK   ((uint32_t)0xFFFF00FE) /* DMA2D DEAD Mask */
 

Functions

void DMA2D_DeInit (void)
 Deinitializes the DMA2D peripheral registers to their default reset values. More...
 
void DMA2D_Init (DMA2D_InitTypeDef *DMA2D_InitStruct)
 Initializes the DMA2D peripheral according to the specified parameters in the DMA2D_InitStruct. More...
 
void DMA2D_StructInit (DMA2D_InitTypeDef *DMA2D_InitStruct)
 
void DMA2D_StartTransfer (void)
 Start the DMA2D transfer. More...
 
void DMA2D_AbortTransfer (void)
 Aboart the DMA2D transfer. More...
 
void DMA2D_Suspend (FunctionalState NewState)
 Stop or continue the DMA2D transfer. More...
 
void DMA2D_FGConfig (DMA2D_FG_InitTypeDef *DMA2D_FG_InitStruct)
 Configures the Foreground according to the specified parameters in the DMA2D_FGStruct. More...
 
void DMA2D_FG_StructInit (DMA2D_FG_InitTypeDef *DMA2D_FG_InitStruct)
 Fills each DMA2D_FGStruct member with its default value. More...
 
void DMA2D_BGConfig (DMA2D_BG_InitTypeDef *DMA2D_BG_InitStruct)
 Configures the Background according to the specified parameters in the DMA2D_BGStruct. More...
 
void DMA2D_BG_StructInit (DMA2D_BG_InitTypeDef *DMA2D_BG_InitStruct)
 Fills each DMA2D_BGStruct member with its default value. More...
 
void DMA2D_FGStart (FunctionalState NewState)
 Start the automatic loading of the CLUT or abort the transfer. More...
 
void DMA2D_BGStart (FunctionalState NewState)
 Start the automatic loading of the CLUT or abort the transfer. More...
 
void DMA2D_DeadTimeConfig (uint32_t DMA2D_DeadTime, FunctionalState NewState)
 Configures the DMA2D dead time. More...
 
void DMA2D_LineWatermarkConfig (uint32_t DMA2D_LWatermarkConfig)
 Define the configuration of the line watermark . More...
 
void DMA2D_ITConfig (uint32_t DMA2D_IT, FunctionalState NewState)
 Enables or disables the specified DMA2D's interrupts. More...
 
FlagStatus DMA2D_GetFlagStatus (uint32_t DMA2D_FLAG)
 Checks whether the specified DMA2D's flag is set or not. More...
 
void DMA2D_ClearFlag (uint32_t DMA2D_FLAG)
 Clears the DMA2D's pending flags. More...
 
ITStatus DMA2D_GetITStatus (uint32_t DMA2D_IT)
 Checks whether the specified DMA2D's interrupt has occurred or not. More...
 
void DMA2D_ClearITPendingBit (uint32_t DMA2D_IT)
 Clears the DMA2D's interrupt pending bits. More...
 

Detailed Description

This file provides firmware functions to manage the following functionalities of the DMA2D controller (DMA2D) peripheral:

Author
MCD Application Team
Version
V1.4.0
Date
04-August-2014
  • Initialization and configuration
  • Interrupts and flags management
===============================================================================
                     ##### How to use this driver #####
===============================================================================
   [..]
       (#) Enable DMA2D clock using 
           RCC_APB2PeriphResetCmd(RCC_APB2Periph_DMA2D, ENABLE) function.
           
       (#) Configures DMA2D
         (++) transfer mode 
         (++) pixel format, line_number, pixel_per_line
         (++) output memory address
         (++) alpha value
         (++) output offset
         (++) Default color (RGB)
          
       (#) Configures Foreground or/and background
         (++) memory address
         (++) alpha value
         (++) offset and default color
 
       (#) Call the DMA2D_Start() to enable the DMA2D controller.
Attention

© COPYRIGHT 2014 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.