STM32769I_EVAL BSP User Manual: stm32f769i_eval_camera.h Source File

STM32769I_EVAL BSP

stm32f769i_eval_camera.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32f769i_eval_camera.h
00004   * @author  MCD Application Team
00005   * @version V2.0.1
00006   * @date    06-April-2017
00007   * @brief   This file contains the common defines and functions prototypes for
00008   *          the stm32f769i_eval_camera.c driver.
00009   ******************************************************************************
00010   * @attention
00011   *
00012   * <h2><center>&copy; COPYRIGHT(c) 2017 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 __STM32F769I_EVAL_CAMERA_H
00041 #define __STM32F769I_EVAL_CAMERA_H
00042 
00043 #ifdef __cplusplus
00044  extern "C" {
00045 #endif 
00046 
00047 /* Includes ------------------------------------------------------------------*/
00048 /* Include Camera component Driver */
00049 #include "../Components/s5k5cag/s5k5cag.h"
00050 
00051 /* Include IO Driver */
00052 #include "stm32f769i_eval_io.h"
00053 
00054 /** @addtogroup BSP
00055   * @{
00056   */
00057 
00058 /** @addtogroup STM32F769I_EVAL
00059   * @{
00060   */
00061     
00062 /** @addtogroup STM32F769I_EVAL_CAMERA
00063   * @{
00064   */ 
00065    
00066 /** @defgroup STM32F769I_EVAL_CAMERA_Exported_Types CAMERA Exported Types
00067   * @{
00068   */
00069   
00070 /** 
00071   * @brief  Camera State structures definition  
00072   */
00073 #define CAMERA_OK             0x00
00074 #define CAMERA_ERROR          0x01
00075 #define CAMERA_TIMEOUT        0x02
00076 #define CAMERA_NOT_DETECTED   0x03
00077 #define CAMERA_NOT_SUPPORTED  0x04
00078 
00079 
00080 /**
00081   * @brief  Camera Image rotation definition
00082   *         in frame buffer for LCD Display.
00083   */
00084 #define CAMERA_NO_ROTATION        0x00
00085 #define CAMERA_ROTATION_90        0x01
00086 #define CAMERA_ROTATION_INVALID   0x02
00087 
00088 #define RESOLUTION_R160x120      CAMERA_R160x120      /* QQVGA Resolution     */
00089 #define RESOLUTION_R320x240      CAMERA_R320x240      /* QVGA Resolution      */
00090 #define RESOLUTION_R480x272      CAMERA_R480x272      /* 480x272 Resolution   */
00091 #define RESOLUTION_R640x480      CAMERA_R640x480      /* VGA Resolution       */
00092 
00093 #define CAMERA_VGA_RES_X          640
00094 #define CAMERA_VGA_RES_Y          480
00095 #define CAMERA_480x272_RES_X      480
00096 #define CAMERA_480x272_RES_Y      272
00097 #define CAMERA_QVGA_RES_X         320
00098 #define CAMERA_QVGA_RES_Y         240
00099 #define CAMERA_QQVGA_RES_X        160
00100 #define CAMERA_QQVGA_RES_Y        120
00101 /**
00102   * @}
00103   */ 
00104  
00105 /** @defgroup STM32F769I_EVAL_CAMERA_Exported_Constants CAMERA Exported Constants
00106   * @{
00107   */
00108  #define BSP_CAMERA_IRQHandler      DCMI_IRQHandler
00109  #define BSP_CAMERA_DMA_IRQHandler  DMA2_Stream1_IRQHandler  
00110 /**
00111   * @}
00112   */
00113 
00114 /** @defgroup STM32F769I_EVAL_CAMERA_Exported_Functions CAMERA Exported Functions
00115   * @{
00116   */    
00117 uint8_t BSP_CAMERA_Init(uint32_t Resolution);  
00118 uint8_t BSP_CAMERA_DeInit(void);
00119 void    BSP_CAMERA_ContinuousStart(uint8_t *buff);
00120 void    BSP_CAMERA_SnapshotStart(uint8_t *buff);
00121 void    BSP_CAMERA_Suspend(void);
00122 void    BSP_CAMERA_Resume(void);
00123 uint8_t BSP_CAMERA_Stop(void); 
00124 void    BSP_CAMERA_HwReset(void);
00125 void    BSP_CAMERA_PwrDown(void);
00126 void    BSP_CAMERA_LineEventCallback(void);
00127 void    BSP_CAMERA_VsyncEventCallback(void);
00128 void    BSP_CAMERA_FrameEventCallback(void);
00129 void    BSP_CAMERA_ErrorCallback(void);
00130 
00131 /* Camera features functions prototype */
00132 void    BSP_CAMERA_ContrastBrightnessConfig(uint32_t contrast_level, uint32_t brightness_level);
00133 void    BSP_CAMERA_BlackWhiteConfig(uint32_t Mode);
00134 void    BSP_CAMERA_ColorEffectConfig(uint32_t Effect);
00135 
00136    
00137 /* These functions can be modified in case the current settings (e.g. DMA stream)
00138    need to be changed for specific application needs */
00139 void BSP_CAMERA_MspInit(DCMI_HandleTypeDef *hdcmi, void *Params);
00140 void BSP_CAMERA_MspDeInit(DCMI_HandleTypeDef *hdcmi, void *Params);
00141 uint8_t  BSP_CAMERA_SetRotation(uint32_t rotation);
00142 uint32_t BSP_CAMERA_GetRotation(void);
00143 
00144 
00145 /**
00146   * @}
00147   */ 
00148 
00149 /**
00150   * @}
00151   */ 
00152 
00153 /**
00154   * @}
00155   */
00156 
00157 /**
00158   * @}
00159   */
00160 
00161 #ifdef __cplusplus
00162 }
00163 #endif
00164 
00165 #endif /* __STM32F769I_EVAL_CAMERA_H */
00166 
00167 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu May 25 2017 11:03:11 for STM32769I_EVAL BSP User Manual by   doxygen 1.7.6.1