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
ov9655.h
00001 /** 00002 ****************************************************************************** 00003 * @file ov9655.h 00004 * @author MCD Application Team 00005 * @version V1.0.0 00006 * @date 25-June-2015 00007 * @brief This file contains all the functions prototypes for the ov9655.c 00008 * 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 __OV9655_H 00041 #define __OV9655_H 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 /* Includes ------------------------------------------------------------------*/ 00048 #include "camera.h" 00049 00050 /** @addtogroup BSP 00051 * @{ 00052 */ 00053 00054 /** @addtogroup Components 00055 * @{ 00056 */ 00057 00058 /** @addtogroup ov9655 00059 * @{ 00060 */ 00061 00062 /** @defgroup OV9655_Exported_Types 00063 * @{ 00064 */ 00065 00066 /** 00067 * @} 00068 */ 00069 00070 /** @defgroup OV9655_Exported_Constants 00071 * @{ 00072 */ 00073 /** 00074 * @brief OV9655 ID 00075 */ 00076 #define OV9655_ID 0x96 00077 /** 00078 * @brief OV9655 Registers 00079 */ 00080 00081 /* OV9655 Registers definition */ 00082 #define OV9655_SENSOR_PIDH 0x0A 00083 #define OV9655_SENSOR_PIDL 0x0B 00084 #define OV9655_SENSOR_COM7 0x12 00085 #define OV9655_SENSOR_TSLB 0x3A 00086 #define OV9655_SENSOR_MTX1 0x4F 00087 #define OV9655_SENSOR_MTX2 0x50 00088 #define OV9655_SENSOR_MTX3 0x51 00089 #define OV9655_SENSOR_MTX4 0x52 00090 #define OV9655_SENSOR_MTX5 0x53 00091 #define OV9655_SENSOR_MTX6 0x54 00092 #define OV9655_SENSOR_BRTN 0x55 00093 #define OV9655_SENSOR_CNST1 0x56 00094 #define OV9655_SENSOR_CNST2 0x57 00095 00096 /** 00097 * @brief OV9655 Features Parameters 00098 */ 00099 #define OV9655_BRIGHTNESS_LEVEL0 0xB0 /* Brightness level -2 */ 00100 #define OV9655_BRIGHTNESS_LEVEL1 0x98 /* Brightness level -1 */ 00101 #define OV9655_BRIGHTNESS_LEVEL2 0x00 /* Brightness level 0 */ 00102 #define OV9655_BRIGHTNESS_LEVEL3 0x18 /* Brightness level +1 */ 00103 #define OV9655_BRIGHTNESS_LEVEL4 0x30 /* Brightness level +2 */ 00104 00105 #define OV9655_BLACK_WHITE_BW 0xCC000000000000 /* Black and white effect */ 00106 #define OV9655_BLACK_WHITE_NEGATIVE 0xEC808000008080 /* Negative effect */ 00107 #define OV9655_BLACK_WHITE_BW_NEGATIVE 0xEC000000000000 /* BW and Negative effect */ 00108 #define OV9655_BLACK_WHITE_NORMAL 0xCC808000008080 /* Normal effect */ 00109 00110 #define OV9655_CONTRAST_LEVEL0 0x30 /* Contrast level -2 */ 00111 #define OV9655_CONTRAST_LEVEL1 0x38 /* Contrast level -1 */ 00112 #define OV9655_CONTRAST_LEVEL2 0x40 /* Contrast level 0 */ 00113 #define OV9655_CONTRAST_LEVEL3 0x50 /* Contrast level +1 */ 00114 #define OV9655_CONTRAST_LEVEL4 0x60 /* Contrast level +2 */ 00115 00116 #define OV9655_COLOR_EFFECT_NONE 0xCC808000008080 /* No color effect */ 00117 #define OV9655_COLOR_EFFECT_ANTIQUE 0xCC000020F00000 /* Antique effect */ 00118 #define OV9655_COLOR_EFFECT_BLUE 0xCC000000000060 /* Blue effect */ 00119 #define OV9655_COLOR_EFFECT_GREEN 0xCC000000008000 /* Green effect */ 00120 #define OV9655_COLOR_EFFECT_RED 0xCC600000000000 /* Red effect */ 00121 /** 00122 * @} 00123 */ 00124 00125 /** @defgroup OV9655_Exported_Functions 00126 * @{ 00127 */ 00128 void ov9655_Init(uint16_t DeviceAddr, uint32_t resolution); 00129 void ov9655_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value); 00130 uint16_t ov9655_ReadID(uint16_t DeviceAddr); 00131 00132 void CAMERA_IO_Init(void); 00133 void CAMERA_IO_Write(uint8_t addr, uint8_t reg, uint8_t value); 00134 uint8_t CAMERA_IO_Read(uint8_t addr, uint8_t reg); 00135 void CAMERA_Delay(uint32_t delay); 00136 00137 /* CAMERA driver structure */ 00138 extern CAMERA_DrvTypeDef ov9655_drv; 00139 /** 00140 * @} 00141 */ 00142 #ifdef __cplusplus 00143 } 00144 #endif 00145 00146 #endif /* __OV9655_H */ 00147 /** 00148 * @} 00149 */ 00150 00151 /** 00152 * @} 00153 */ 00154 00155 /** 00156 * @} 00157 */ 00158 00159 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Jul 13 2022 13:25:21 by
1.7.2
