STM32746G-Discovery board drivers V1.0.0
Dependents: DISCO-F746NG_LCDTS_CC3000_NTP DISCO-F746NG_ROPE_WIFI F746_SpectralAnalysis_NoPhoto ecte433 ... more
stm32746g_discovery_camera.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32746g_discovery_camera.h 00004 * @author MCD Application Team 00005 * @brief This file contains the common defines and functions prototypes for 00006 * the stm32746g_discovery_camera.c driver. 00007 ****************************************************************************** 00008 * @attention 00009 * 00010 * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> 00011 * 00012 * Redistribution and use in source and binary forms, with or without modification, 00013 * are permitted provided that the following conditions are met: 00014 * 1. Redistributions of source code must retain the above copyright notice, 00015 * this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright notice, 00017 * this list of conditions and the following disclaimer in the documentation 00018 * and/or other materials provided with the distribution. 00019 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00020 * may be used to endorse or promote products derived from this software 00021 * without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00024 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00027 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00028 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00029 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00030 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00031 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 ****************************************************************************** 00035 */ 00036 00037 /* Define to prevent recursive inclusion -------------------------------------*/ 00038 #ifndef __STM32746G_DISCOVERY_CAMERA_H 00039 #define __STM32746G_DISCOVERY_CAMERA_H 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00045 /* Includes ------------------------------------------------------------------*/ 00046 /* Include Camera component Driver */ 00047 #include "../Components/ov9655/ov9655.h" 00048 #include "stm32746g_discovery.h" 00049 00050 /** @addtogroup BSP 00051 * @{ 00052 */ 00053 00054 /** @addtogroup STM32746G_DISCOVERY 00055 * @{ 00056 */ 00057 00058 /** @addtogroup STM32746G_DISCOVERY_CAMERA 00059 * @{ 00060 */ 00061 00062 /** @defgroup STM32746G_DISCOVERY_CAMERA_Exported_Types STM32746G_DISCOVERY_CAMERA Exported Types 00063 * @{ 00064 */ 00065 00066 /** 00067 * @brief Camera State structures definition 00068 */ 00069 typedef enum 00070 { 00071 CAMERA_OK = 0x00, 00072 CAMERA_ERROR = 0x01, 00073 CAMERA_TIMEOUT = 0x02, 00074 CAMERA_NOT_DETECTED = 0x03, 00075 CAMERA_NOT_SUPPORTED = 0x04 00076 00077 } Camera_StatusTypeDef; 00078 00079 #define RESOLUTION_R160x120 CAMERA_R160x120 /* QQVGA Resolution */ 00080 #define RESOLUTION_R320x240 CAMERA_R320x240 /* QVGA Resolution */ 00081 #define RESOLUTION_R480x272 CAMERA_R480x272 /* 480x272 Resolution */ 00082 #define RESOLUTION_R640x480 CAMERA_R640x480 /* VGA Resolution */ 00083 /** 00084 * @} 00085 */ 00086 00087 /** @defgroup STM32746G_DISCOVERY_CAMERA_Exported_Constants STM32746G_DISCOVERY_CAMERA Exported Constants 00088 * @{ 00089 */ 00090 #define BSP_CAMERA_IRQHandler DCMI_IRQHandler 00091 #define BSP_CAMERA_DMA_IRQHandler DMA2_Stream1_IRQHandler 00092 00093 /** 00094 * @} 00095 */ 00096 00097 /** @addtogroup STM32746G_DISCOVERY_CAMERA_Exported_Functions 00098 * @{ 00099 */ 00100 uint8_t BSP_CAMERA_Init(uint32_t Resolution); 00101 uint8_t BSP_CAMERA_DeInit(void); 00102 void BSP_CAMERA_ContinuousStart(uint8_t *buff); 00103 void BSP_CAMERA_SnapshotStart(uint8_t *buff); 00104 void BSP_CAMERA_Suspend(void); 00105 void BSP_CAMERA_Resume(void); 00106 uint8_t BSP_CAMERA_Stop(void); 00107 void BSP_CAMERA_PwrUp(void); 00108 void BSP_CAMERA_PwrDown(void); 00109 void BSP_CAMERA_LineEventCallback(void); 00110 void BSP_CAMERA_VsyncEventCallback(void); 00111 void BSP_CAMERA_FrameEventCallback(void); 00112 void BSP_CAMERA_ErrorCallback(void); 00113 00114 /* Camera features functions prototype */ 00115 void BSP_CAMERA_ContrastBrightnessConfig(uint32_t contrast_level, uint32_t brightness_level); 00116 void BSP_CAMERA_BlackWhiteConfig(uint32_t Mode); 00117 void BSP_CAMERA_ColorEffectConfig(uint32_t Effect); 00118 00119 /* These functions can be modified in case the current settings (e.g. DMA stream) 00120 need to be changed for specific application needs */ 00121 void BSP_CAMERA_MspInit(DCMI_HandleTypeDef *hdcmi, void *Params); 00122 void BSP_CAMERA_MspDeInit(DCMI_HandleTypeDef *hdcmi, void *Params); 00123 00124 00125 /** 00126 * @} 00127 */ 00128 00129 /** 00130 * @} 00131 */ 00132 00133 /** 00134 * @} 00135 */ 00136 00137 /** 00138 * @} 00139 */ 00140 00141 #ifdef __cplusplus 00142 } 00143 #endif 00144 00145 #endif /* __STM32746G_DISCOVERY_CAMERA_H */ 00146 00147 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 13:20:42 by 1.7.2