Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BSP_DISCO_F746NG by
stm32746g_discovery_camera.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32746g_discovery_camera.h 00004 * @author MCD Application Team 00005 * @version V1.0.0 00006 * @date 25-June-2015 00007 * @brief This file contains the common defines and functions prototypes for 00008 * the stm32746g_discovery_camera.c driver. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT(c) 2015 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 __STM32746G_DISCOVERY_CAMERA_H 00041 #define __STM32746G_DISCOVERY_CAMERA_H 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 /* Includes ------------------------------------------------------------------*/ 00048 /* Include Camera component Driver */ 00049 #include "ov9655.h" 00050 #include "stm32746g_discovery.h" 00051 00052 /** @addtogroup BSP 00053 * @{ 00054 */ 00055 00056 /** @addtogroup STM32746G_DISCOVERY 00057 * @{ 00058 */ 00059 00060 /** @addtogroup STM32746G_DISCOVERY_CAMERA 00061 * @{ 00062 */ 00063 00064 /** @defgroup STM32746G_DISCOVERY_CAMERA_Exported_Types STM32746G_DISCOVERY_CAMERA Exported Types 00065 * @{ 00066 */ 00067 00068 /** 00069 * @brief Camera State structures definition 00070 */ 00071 typedef enum 00072 { 00073 CAMERA_OK = 0x00, 00074 CAMERA_ERROR = 0x01, 00075 CAMERA_TIMEOUT = 0x02, 00076 CAMERA_NOT_DETECTED = 0x03, 00077 CAMERA_NOT_SUPPORTED = 0x04 00078 00079 } Camera_StatusTypeDef; 00080 00081 #define RESOLUTION_R160x120 CAMERA_R160x120 /* QQVGA Resolution */ 00082 #define RESOLUTION_R320x240 CAMERA_R320x240 /* QVGA Resolution */ 00083 #define RESOLUTION_R480x272 CAMERA_R480x272 /* 480x272 Resolution */ 00084 #define RESOLUTION_R640x480 CAMERA_R640x480 /* VGA Resolution */ 00085 /** 00086 * @} 00087 */ 00088 00089 /** @defgroup STM32746G_DISCOVERY_CAMERA_Exported_Constants STM32746G_DISCOVERY_CAMERA Exported Constants 00090 * @{ 00091 */ 00092 /** 00093 * @} 00094 */ 00095 00096 /** @addtogroup STM32746G_DISCOVERY_CAMERA_Exported_Functions 00097 * @{ 00098 */ 00099 uint8_t BSP_CAMERA_Init(uint32_t Resolution); 00100 uint8_t BSP_CAMERA_DeInit(void); 00101 void BSP_CAMERA_ContinuousStart(uint8_t *buff); 00102 void BSP_CAMERA_SnapshotStart(uint8_t *buff); 00103 void BSP_CAMERA_Suspend(void); 00104 void BSP_CAMERA_Resume(void); 00105 uint8_t BSP_CAMERA_Stop(void); 00106 void BSP_CAMERA_PwrUp(void); 00107 void BSP_CAMERA_PwrDown(void); 00108 void BSP_CAMERA_LineEventCallback(void); 00109 void BSP_CAMERA_VsyncEventCallback(void); 00110 void BSP_CAMERA_FrameEventCallback(void); 00111 void BSP_CAMERA_ErrorCallback(void); 00112 00113 /* Camera features functions prototype */ 00114 void BSP_CAMERA_ContrastBrightnessConfig(uint32_t contrast_level, uint32_t brightness_level); 00115 void BSP_CAMERA_BlackWhiteConfig(uint32_t Mode); 00116 void BSP_CAMERA_ColorEffectConfig(uint32_t Effect); 00117 00118 /* To be called in DCMI_IRQHandler function */ 00119 void BSP_CAMERA_IRQHandler(void); 00120 /* To be called in DMA2_Stream1_IRQHandler function */ 00121 void BSP_CAMERA_DMA_IRQHandler(void); 00122 00123 /* These functions can be modified in case the current settings (e.g. DMA stream) 00124 need to be changed for specific application needs */ 00125 void BSP_CAMERA_MspInit(DCMI_HandleTypeDef *hdcmi, void *Params); 00126 void BSP_CAMERA_MspDeInit(DCMI_HandleTypeDef *hdcmi, void *Params); 00127 00128 00129 /** 00130 * @} 00131 */ 00132 00133 /** 00134 * @} 00135 */ 00136 00137 /** 00138 * @} 00139 */ 00140 00141 /** 00142 * @} 00143 */ 00144 00145 #ifdef __cplusplus 00146 } 00147 #endif 00148 00149 #endif /* __STM32746G_DISCOVERY_CAMERA_H */ 00150 00151 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Jul 13 2022 13:25:21 by
1.7.2
