Functions
stm32f4xx_dcmi.c File Reference

This file provides firmware functions to manage the following functionalities of the DCMI peripheral: More...

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

Go to the source code of this file.

Functions

void DCMI_CaptureCmd (FunctionalState NewState)
 Enables or disables the DCMI Capture. More...
 
void DCMI_ClearFlag (uint16_t DCMI_FLAG)
 Clears the DCMI's pending flags. More...
 
void DCMI_ClearITPendingBit (uint16_t DCMI_IT)
 Clears the DCMI's interrupt pending bits. More...
 
void DCMI_Cmd (FunctionalState NewState)
 Enables or disables the DCMI interface. More...
 
void DCMI_CROPCmd (FunctionalState NewState)
 Enables or disables the DCMI Crop feature. More...
 
void DCMI_CROPConfig (DCMI_CROPInitTypeDef *DCMI_CROPInitStruct)
 Initializes the DCMI peripheral CROP mode according to the specified parameters in the DCMI_CROPInitStruct. More...
 
void DCMI_DeInit (void)
 Deinitializes the DCMI registers to their default reset values. More...
 
FlagStatus DCMI_GetFlagStatus (uint16_t DCMI_FLAG)
 Checks whether the DCMI interface flag is set or not. More...
 
ITStatus DCMI_GetITStatus (uint16_t DCMI_IT)
 Checks whether the DCMI interrupt has occurred or not. More...
 
void DCMI_Init (DCMI_InitTypeDef *DCMI_InitStruct)
 Initializes the DCMI according to the specified parameters in the DCMI_InitStruct. More...
 
void DCMI_ITConfig (uint16_t DCMI_IT, FunctionalState NewState)
 Enables or disables the DCMI interface interrupts. More...
 
void DCMI_JPEGCmd (FunctionalState NewState)
 Enables or disables the DCMI JPEG format. More...
 
uint32_t DCMI_ReadData (void)
 Reads the data stored in the DR register. More...
 
void DCMI_SetEmbeddedSynchroCodes (DCMI_CodesInitTypeDef *DCMI_CodesInitStruct)
 Sets the embedded synchronization codes. More...
 
void DCMI_StructInit (DCMI_InitTypeDef *DCMI_InitStruct)
 Fills each DCMI_InitStruct member with its default value. More...
 

Detailed Description

This file provides firmware functions to manage the following functionalities of the DCMI peripheral:

Author
MCD Application Team
Version
V1.1.0
Date
11-January-2013
  • Initialization and Configuration
  • Image capture functions
  • Interrupts and flags management
===============================================================================
                       ##### How to use this driver #####
===============================================================================  
   [..]       
     The sequence below describes how to use this driver to capture image
     from a camera module connected to the DCMI Interface.
     This sequence does not take into account the configuration of the  
     camera module, which should be made before to configure and enable
     the DCMI to capture images.
            
     (#) Enable the clock for the DCMI and associated GPIOs using the following 
         functions:
         RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_DCMI, ENABLE);
         RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOx, ENABLE);
 
     (#) DCMI pins configuration 
       (++) Connect the involved DCMI pins to AF13 using the following function 
           GPIO_PinAFConfig(GPIOx, GPIO_PinSourcex, GPIO_AF_DCMI); 
       (++) Configure these DCMI pins in alternate function mode by calling 
           the function GPIO_Init();
     
     (#) Declare a DCMI_InitTypeDef structure, for example:
         DCMI_InitTypeDef  DCMI_InitStructure;
         and fill the DCMI_InitStructure variable with the allowed values
         of the structure member.
   
     (#) Initialize the DCMI interface by calling the function
         DCMI_Init(&DCMI_InitStructure); 
   
     (#) Configure the DMA2_Stream1 channel1 to transfer Data from DCMI DR
         register to the destination memory buffer.
   
     (#) Enable DCMI interface using the function
         DCMI_Cmd(ENABLE);
                  
     (#) Start the image capture using the function
         DCMI_CaptureCmd(ENABLE);
                  
     (#) At this stage the DCMI interface waits for the first start of frame,
         then a DMA request is generated continuously/once (depending on the
         mode used, Continuous/Snapshot) to transfer the received data into
         the destination memory. 
    
     -@-  If you need to capture only a rectangular window from the received
          image, you have to use the DCMI_CROPConfig() function to configure 
          the coordinates and size of the window to be captured, then enable 
          the Crop feature using DCMI_CROPCmd(ENABLE);  
          In this case, the Crop configuration should be made before to enable
          and start the DCMI interface. 
Attention

© COPYRIGHT 2013 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.

Definition in file stm32f4xx_dcmi.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:27