STM324xG_EVAL BSP User Manual: stm324xg_eval_camera.h Source File

STM3240G / STM3241G EVAL BSP Drivers

stm324xg_eval_camera.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm324xg_eval_camera.h
00004   * @author  MCD Application Team
00005   * @version V2.2.1
00006   * @date    15-January-2016
00007   * @brief   This file contains all the functions prototypes for the 
00008   *          stm324xg_eval_camera.c driver.
00009   ******************************************************************************
00010   * @attention
00011   *
00012   * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
00013   *
00014   * Redistribution and use in source and binary forms, with or without modification,
00015   * are permitted provided that the following conditions are met:
00016   *   1. Redistributions of source code must retain the above copyright notice,
00017   *      this list of conditions and the following disclaimer.
00018   *   2. Redistributions in binary form must reproduce the above copyright notice,
00019   *      this list of conditions and the following disclaimer in the documentation
00020   *      and/or other materials provided with the distribution.
00021   *   3. Neither the name of STMicroelectronics nor the names of its contributors
00022   *      may be used to endorse or promote products derived from this software
00023   *      without specific prior written permission.
00024   *
00025   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00026   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00028   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00029   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00030   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00031   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00032   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00033   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00034   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00035   *
00036   ******************************************************************************
00037   */ 
00038 
00039 /* Define to prevent recursive inclusion -------------------------------------*/
00040 #ifndef __STM324xG_EVAL_CAMERA_H
00041 #define __STM324xG_EVAL_CAMERA_H
00042 
00043 #ifdef __cplusplus
00044  extern "C" {
00045 #endif 
00046 
00047 /* Includes ------------------------------------------------------------------*/
00048 #include "stm324xg_eval.h"
00049 #include "stm324xg_eval_io.h"
00050    
00051 /* Include Camera component Driver */  
00052 #include "../Components/ov2640/ov2640.h"   
00053    
00054 /** @addtogroup BSP
00055   * @{
00056   */
00057 
00058 /** @addtogroup STM324xG_EVAL
00059   * @{
00060   */
00061     
00062 /** @addtogroup STM324xG_EVAL_CAMERA
00063   * @{
00064   */ 
00065 
00066 /** @defgroup STM324xG_EVAL_CAMERA_Exported_Types STM324xG EVAL CAMERA Exported Types
00067   * @{
00068   */
00069    
00070 /** 
00071   * @brief Camera status structure definition  
00072   */   
00073 typedef enum 
00074 {
00075   CAMERA_OK       = 0x00,
00076   CAMERA_ERROR    = 0x01,
00077   CAMERA_TIMEOUT  = 0x02
00078 }Camera_StatusTypeDef;
00079 
00080 #define RESOLUTION_R160x120      CAMERA_R160x120  /* QQVGA Resolution */
00081 #define RESOLUTION_R320x240      CAMERA_R320x240  /* QVGA Resolution */
00082         
00083 /**
00084   * @}
00085   */ 
00086 
00087 /** @defgroup STM324xG_EVAL_CAMERA_Exported_Constants STM324xG EVAL CAMERA Exported Constants
00088   * @{
00089   */
00090 #define CAMERA_I2C_ADDRESS 0x60  
00091 /**
00092   * @}
00093   */  
00094        
00095 /** @defgroup STM324xG_EVAL_CAMERA_Exported_Functions STM324xG EVAL CAMERA Exported Functions
00096   * @{
00097   */        
00098 uint8_t BSP_CAMERA_Init(uint32_t Resolution);
00099 void    BSP_CAMERA_ContinuousStart(uint8_t *buff);
00100 void    BSP_CAMERA_SnapshotStart(uint8_t *buff);
00101 void    BSP_CAMERA_Suspend(void);
00102 void    BSP_CAMERA_Resume(void); 
00103 uint8_t BSP_CAMERA_Stop(void);
00104 void    BSP_CAMERA_LineEventCallback(void);
00105 void    BSP_CAMERA_VsyncEventCallback(void);
00106 void    BSP_CAMERA_FrameEventCallback(void);
00107 void    BSP_CAMERA_ErrorCallback(void);
00108 
00109 /* Camera features functions prototype */
00110 void    BSP_CAMERA_ContrastBrightnessConfig(uint32_t contrast_level, uint32_t brightness_level);
00111 void    BSP_CAMERA_BlackWhiteConfig(uint32_t Mode);
00112 void    BSP_CAMERA_ColorEffectConfig(uint32_t Effect);
00113 
00114 /* To be called in DCMI_IRQHandler function */
00115 void    BSP_CAMERA_IRQHandler(void);
00116 /* To be called in DMA2_Stream1_IRQHandler function */
00117 void    BSP_CAMERA_DMA_IRQHandler(void);
00118 
00119 /**
00120   * @}
00121   */ 
00122 
00123 /**
00124   * @}
00125   */ 
00126 
00127 /**
00128   * @}
00129   */ 
00130 
00131 /**
00132   * @}
00133   */
00134    
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 
00139 #endif /* __STM324xG_EVAL_CAMERA_H */
00140 
00141 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Fri Jan 15 2016 14:22:29 for STM324xG_EVAL BSP User Manual by   doxygen 1.7.6.1