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.
Dependents: DISCO_L4R9I-LCD-demo
ov9655.h
00001 /** 00002 ****************************************************************************** 00003 * @file ov9655.h 00004 * @author MCD Application Team 00005 * @brief This file contains all the functions prototypes for the ov9655.c 00006 * driver. 00007 ****************************************************************************** 00008 * @attention 00009 * 00010 * <h2><center>© Copyright (c) 2015 STMicroelectronics. 00011 * All rights reserved.</center></h2> 00012 * 00013 * This software component is licensed by ST under BSD 3-Clause license, 00014 * the "License"; You may not use this file except in compliance with the 00015 * License. You may obtain a copy of the License at: 00016 * opensource.org/licenses/BSD-3-Clause 00017 * 00018 ****************************************************************************** 00019 */ 00020 00021 /* Define to prevent recursive inclusion -------------------------------------*/ 00022 #ifndef __OV9655_H 00023 #define __OV9655_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 /* Includes ------------------------------------------------------------------*/ 00030 #include "../Common/camera.h" 00031 00032 /** @addtogroup BSP 00033 * @{ 00034 */ 00035 00036 /** @addtogroup Components 00037 * @{ 00038 */ 00039 00040 /** @addtogroup ov9655 00041 * @{ 00042 */ 00043 00044 /** @defgroup OV9655_Exported_Types 00045 * @{ 00046 */ 00047 00048 /** 00049 * @} 00050 */ 00051 00052 /** @defgroup OV9655_Exported_Constants 00053 * @{ 00054 */ 00055 /** 00056 * @brief OV9655 ID 00057 */ 00058 #define OV9655_ID 0x96 00059 /** 00060 * @brief OV9655 Registers 00061 */ 00062 00063 /* OV9655 Registers definition */ 00064 #define OV9655_SENSOR_PIDH 0x0A 00065 #define OV9655_SENSOR_PIDL 0x0B 00066 #define OV9655_SENSOR_COM7 0x12 00067 #define OV9655_SENSOR_TSLB 0x3A 00068 #define OV9655_SENSOR_MTX1 0x4F 00069 #define OV9655_SENSOR_MTX2 0x50 00070 #define OV9655_SENSOR_MTX3 0x51 00071 #define OV9655_SENSOR_MTX4 0x52 00072 #define OV9655_SENSOR_MTX5 0x53 00073 #define OV9655_SENSOR_MTX6 0x54 00074 #define OV9655_SENSOR_BRTN 0x55 00075 #define OV9655_SENSOR_CNST1 0x56 00076 #define OV9655_SENSOR_CNST2 0x57 00077 00078 /** 00079 * @brief OV9655 Features Parameters 00080 */ 00081 #define OV9655_BRIGHTNESS_LEVEL0 0xB0 /* Brightness level -2 */ 00082 #define OV9655_BRIGHTNESS_LEVEL1 0x98 /* Brightness level -1 */ 00083 #define OV9655_BRIGHTNESS_LEVEL2 0x00 /* Brightness level 0 */ 00084 #define OV9655_BRIGHTNESS_LEVEL3 0x18 /* Brightness level +1 */ 00085 #define OV9655_BRIGHTNESS_LEVEL4 0x30 /* Brightness level +2 */ 00086 00087 #define OV9655_BLACK_WHITE_BW 0xCC000000000000 /* Black and white effect */ 00088 #define OV9655_BLACK_WHITE_NEGATIVE 0xEC808000008080 /* Negative effect */ 00089 #define OV9655_BLACK_WHITE_BW_NEGATIVE 0xEC000000000000 /* BW and Negative effect */ 00090 #define OV9655_BLACK_WHITE_NORMAL 0xCC808000008080 /* Normal effect */ 00091 00092 #define OV9655_CONTRAST_LEVEL0 0x30 /* Contrast level -2 */ 00093 #define OV9655_CONTRAST_LEVEL1 0x38 /* Contrast level -1 */ 00094 #define OV9655_CONTRAST_LEVEL2 0x40 /* Contrast level 0 */ 00095 #define OV9655_CONTRAST_LEVEL3 0x50 /* Contrast level +1 */ 00096 #define OV9655_CONTRAST_LEVEL4 0x60 /* Contrast level +2 */ 00097 00098 #define OV9655_COLOR_EFFECT_NONE 0xCC808000008080 /* No color effect */ 00099 #define OV9655_COLOR_EFFECT_ANTIQUE 0xCC000020F00000 /* Antique effect */ 00100 #define OV9655_COLOR_EFFECT_BLUE 0xCC000000000060 /* Blue effect */ 00101 #define OV9655_COLOR_EFFECT_GREEN 0xCC000000008000 /* Green effect */ 00102 #define OV9655_COLOR_EFFECT_RED 0xCC600000000000 /* Red effect */ 00103 /** 00104 * @} 00105 */ 00106 00107 /** @defgroup OV9655_Exported_Functions 00108 * @{ 00109 */ 00110 void ov9655_Init(uint16_t DeviceAddr, uint32_t resolution); 00111 void ov9655_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value); 00112 uint16_t ov9655_ReadID(uint16_t DeviceAddr); 00113 00114 void CAMERA_IO_Init(void); 00115 void CAMERA_IO_Write(uint8_t addr, uint8_t reg, uint8_t value); 00116 uint8_t CAMERA_IO_Read(uint8_t addr, uint8_t reg); 00117 void CAMERA_Delay(uint32_t delay); 00118 00119 /* CAMERA driver structure */ 00120 extern CAMERA_DrvTypeDef ov9655_drv; 00121 /** 00122 * @} 00123 */ 00124 #ifdef __cplusplus 00125 } 00126 #endif 00127 00128 #endif /* __OV9655_H */ 00129 /** 00130 * @} 00131 */ 00132 00133 /** 00134 * @} 00135 */ 00136 00137 /** 00138 * @} 00139 */ 00140 00141 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Jul 13 2022 19:15:17 by
