STM32746G-Discovery board drivers V1.0.0

Dependents:   DISCO-F746NG_LCDTS_CC3000_NTP DISCO-F746NG_ROPE_WIFI F746_SpectralAnalysis_NoPhoto ecte433 ... more

Committer:
bcostm
Date:
Thu Nov 10 09:57:11 2016 +0100
Revision:
6:e1d9da7fe856
Child:
10:1050c589b2ad
Update all files present in STM32CubeF7 V1.5.1. Keep original folders structure.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 6:e1d9da7fe856 1 /**
bcostm 6:e1d9da7fe856 2 ******************************************************************************
bcostm 6:e1d9da7fe856 3 * @file ov9655.h
bcostm 6:e1d9da7fe856 4 * @author MCD Application Team
bcostm 6:e1d9da7fe856 5 * @version V1.0.0
bcostm 6:e1d9da7fe856 6 * @date 25-June-2015
bcostm 6:e1d9da7fe856 7 * @brief This file contains all the functions prototypes for the ov9655.c
bcostm 6:e1d9da7fe856 8 * driver.
bcostm 6:e1d9da7fe856 9 ******************************************************************************
bcostm 6:e1d9da7fe856 10 * @attention
bcostm 6:e1d9da7fe856 11 *
bcostm 6:e1d9da7fe856 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
bcostm 6:e1d9da7fe856 13 *
bcostm 6:e1d9da7fe856 14 * Redistribution and use in source and binary forms, with or without modification,
bcostm 6:e1d9da7fe856 15 * are permitted provided that the following conditions are met:
bcostm 6:e1d9da7fe856 16 * 1. Redistributions of source code must retain the above copyright notice,
bcostm 6:e1d9da7fe856 17 * this list of conditions and the following disclaimer.
bcostm 6:e1d9da7fe856 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
bcostm 6:e1d9da7fe856 19 * this list of conditions and the following disclaimer in the documentation
bcostm 6:e1d9da7fe856 20 * and/or other materials provided with the distribution.
bcostm 6:e1d9da7fe856 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bcostm 6:e1d9da7fe856 22 * may be used to endorse or promote products derived from this software
bcostm 6:e1d9da7fe856 23 * without specific prior written permission.
bcostm 6:e1d9da7fe856 24 *
bcostm 6:e1d9da7fe856 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bcostm 6:e1d9da7fe856 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bcostm 6:e1d9da7fe856 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bcostm 6:e1d9da7fe856 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bcostm 6:e1d9da7fe856 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bcostm 6:e1d9da7fe856 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bcostm 6:e1d9da7fe856 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bcostm 6:e1d9da7fe856 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bcostm 6:e1d9da7fe856 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bcostm 6:e1d9da7fe856 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bcostm 6:e1d9da7fe856 35 *
bcostm 6:e1d9da7fe856 36 ******************************************************************************
bcostm 6:e1d9da7fe856 37 */
bcostm 6:e1d9da7fe856 38
bcostm 6:e1d9da7fe856 39 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 6:e1d9da7fe856 40 #ifndef __OV9655_H
bcostm 6:e1d9da7fe856 41 #define __OV9655_H
bcostm 6:e1d9da7fe856 42
bcostm 6:e1d9da7fe856 43 #ifdef __cplusplus
bcostm 6:e1d9da7fe856 44 extern "C" {
bcostm 6:e1d9da7fe856 45 #endif
bcostm 6:e1d9da7fe856 46
bcostm 6:e1d9da7fe856 47 /* Includes ------------------------------------------------------------------*/
bcostm 6:e1d9da7fe856 48 #include "../Common/camera.h"
bcostm 6:e1d9da7fe856 49
bcostm 6:e1d9da7fe856 50 /** @addtogroup BSP
bcostm 6:e1d9da7fe856 51 * @{
bcostm 6:e1d9da7fe856 52 */
bcostm 6:e1d9da7fe856 53
bcostm 6:e1d9da7fe856 54 /** @addtogroup Components
bcostm 6:e1d9da7fe856 55 * @{
bcostm 6:e1d9da7fe856 56 */
bcostm 6:e1d9da7fe856 57
bcostm 6:e1d9da7fe856 58 /** @addtogroup ov9655
bcostm 6:e1d9da7fe856 59 * @{
bcostm 6:e1d9da7fe856 60 */
bcostm 6:e1d9da7fe856 61
bcostm 6:e1d9da7fe856 62 /** @defgroup OV9655_Exported_Types
bcostm 6:e1d9da7fe856 63 * @{
bcostm 6:e1d9da7fe856 64 */
bcostm 6:e1d9da7fe856 65
bcostm 6:e1d9da7fe856 66 /**
bcostm 6:e1d9da7fe856 67 * @}
bcostm 6:e1d9da7fe856 68 */
bcostm 6:e1d9da7fe856 69
bcostm 6:e1d9da7fe856 70 /** @defgroup OV9655_Exported_Constants
bcostm 6:e1d9da7fe856 71 * @{
bcostm 6:e1d9da7fe856 72 */
bcostm 6:e1d9da7fe856 73 /**
bcostm 6:e1d9da7fe856 74 * @brief OV9655 ID
bcostm 6:e1d9da7fe856 75 */
bcostm 6:e1d9da7fe856 76 #define OV9655_ID 0x96
bcostm 6:e1d9da7fe856 77 /**
bcostm 6:e1d9da7fe856 78 * @brief OV9655 Registers
bcostm 6:e1d9da7fe856 79 */
bcostm 6:e1d9da7fe856 80
bcostm 6:e1d9da7fe856 81 /* OV9655 Registers definition */
bcostm 6:e1d9da7fe856 82 #define OV9655_SENSOR_PIDH 0x0A
bcostm 6:e1d9da7fe856 83 #define OV9655_SENSOR_PIDL 0x0B
bcostm 6:e1d9da7fe856 84 #define OV9655_SENSOR_COM7 0x12
bcostm 6:e1d9da7fe856 85 #define OV9655_SENSOR_TSLB 0x3A
bcostm 6:e1d9da7fe856 86 #define OV9655_SENSOR_MTX1 0x4F
bcostm 6:e1d9da7fe856 87 #define OV9655_SENSOR_MTX2 0x50
bcostm 6:e1d9da7fe856 88 #define OV9655_SENSOR_MTX3 0x51
bcostm 6:e1d9da7fe856 89 #define OV9655_SENSOR_MTX4 0x52
bcostm 6:e1d9da7fe856 90 #define OV9655_SENSOR_MTX5 0x53
bcostm 6:e1d9da7fe856 91 #define OV9655_SENSOR_MTX6 0x54
bcostm 6:e1d9da7fe856 92 #define OV9655_SENSOR_BRTN 0x55
bcostm 6:e1d9da7fe856 93 #define OV9655_SENSOR_CNST1 0x56
bcostm 6:e1d9da7fe856 94 #define OV9655_SENSOR_CNST2 0x57
bcostm 6:e1d9da7fe856 95
bcostm 6:e1d9da7fe856 96 /**
bcostm 6:e1d9da7fe856 97 * @brief OV9655 Features Parameters
bcostm 6:e1d9da7fe856 98 */
bcostm 6:e1d9da7fe856 99 #define OV9655_BRIGHTNESS_LEVEL0 0xB0 /* Brightness level -2 */
bcostm 6:e1d9da7fe856 100 #define OV9655_BRIGHTNESS_LEVEL1 0x98 /* Brightness level -1 */
bcostm 6:e1d9da7fe856 101 #define OV9655_BRIGHTNESS_LEVEL2 0x00 /* Brightness level 0 */
bcostm 6:e1d9da7fe856 102 #define OV9655_BRIGHTNESS_LEVEL3 0x18 /* Brightness level +1 */
bcostm 6:e1d9da7fe856 103 #define OV9655_BRIGHTNESS_LEVEL4 0x30 /* Brightness level +2 */
bcostm 6:e1d9da7fe856 104
bcostm 6:e1d9da7fe856 105 #define OV9655_BLACK_WHITE_BW 0xCC000000000000 /* Black and white effect */
bcostm 6:e1d9da7fe856 106 #define OV9655_BLACK_WHITE_NEGATIVE 0xEC808000008080 /* Negative effect */
bcostm 6:e1d9da7fe856 107 #define OV9655_BLACK_WHITE_BW_NEGATIVE 0xEC000000000000 /* BW and Negative effect */
bcostm 6:e1d9da7fe856 108 #define OV9655_BLACK_WHITE_NORMAL 0xCC808000008080 /* Normal effect */
bcostm 6:e1d9da7fe856 109
bcostm 6:e1d9da7fe856 110 #define OV9655_CONTRAST_LEVEL0 0x30 /* Contrast level -2 */
bcostm 6:e1d9da7fe856 111 #define OV9655_CONTRAST_LEVEL1 0x38 /* Contrast level -1 */
bcostm 6:e1d9da7fe856 112 #define OV9655_CONTRAST_LEVEL2 0x40 /* Contrast level 0 */
bcostm 6:e1d9da7fe856 113 #define OV9655_CONTRAST_LEVEL3 0x50 /* Contrast level +1 */
bcostm 6:e1d9da7fe856 114 #define OV9655_CONTRAST_LEVEL4 0x60 /* Contrast level +2 */
bcostm 6:e1d9da7fe856 115
bcostm 6:e1d9da7fe856 116 #define OV9655_COLOR_EFFECT_NONE 0xCC808000008080 /* No color effect */
bcostm 6:e1d9da7fe856 117 #define OV9655_COLOR_EFFECT_ANTIQUE 0xCC000020F00000 /* Antique effect */
bcostm 6:e1d9da7fe856 118 #define OV9655_COLOR_EFFECT_BLUE 0xCC000000000060 /* Blue effect */
bcostm 6:e1d9da7fe856 119 #define OV9655_COLOR_EFFECT_GREEN 0xCC000000008000 /* Green effect */
bcostm 6:e1d9da7fe856 120 #define OV9655_COLOR_EFFECT_RED 0xCC600000000000 /* Red effect */
bcostm 6:e1d9da7fe856 121 /**
bcostm 6:e1d9da7fe856 122 * @}
bcostm 6:e1d9da7fe856 123 */
bcostm 6:e1d9da7fe856 124
bcostm 6:e1d9da7fe856 125 /** @defgroup OV9655_Exported_Functions
bcostm 6:e1d9da7fe856 126 * @{
bcostm 6:e1d9da7fe856 127 */
bcostm 6:e1d9da7fe856 128 void ov9655_Init(uint16_t DeviceAddr, uint32_t resolution);
bcostm 6:e1d9da7fe856 129 void ov9655_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value);
bcostm 6:e1d9da7fe856 130 uint16_t ov9655_ReadID(uint16_t DeviceAddr);
bcostm 6:e1d9da7fe856 131
bcostm 6:e1d9da7fe856 132 void CAMERA_IO_Init(void);
bcostm 6:e1d9da7fe856 133 void CAMERA_IO_Write(uint8_t addr, uint8_t reg, uint8_t value);
bcostm 6:e1d9da7fe856 134 uint8_t CAMERA_IO_Read(uint8_t addr, uint8_t reg);
bcostm 6:e1d9da7fe856 135 void CAMERA_Delay(uint32_t delay);
bcostm 6:e1d9da7fe856 136
bcostm 6:e1d9da7fe856 137 /* CAMERA driver structure */
bcostm 6:e1d9da7fe856 138 extern CAMERA_DrvTypeDef ov9655_drv;
bcostm 6:e1d9da7fe856 139 /**
bcostm 6:e1d9da7fe856 140 * @}
bcostm 6:e1d9da7fe856 141 */
bcostm 6:e1d9da7fe856 142 #ifdef __cplusplus
bcostm 6:e1d9da7fe856 143 }
bcostm 6:e1d9da7fe856 144 #endif
bcostm 6:e1d9da7fe856 145
bcostm 6:e1d9da7fe856 146 #endif /* __OV9655_H */
bcostm 6:e1d9da7fe856 147 /**
bcostm 6:e1d9da7fe856 148 * @}
bcostm 6:e1d9da7fe856 149 */
bcostm 6:e1d9da7fe856 150
bcostm 6:e1d9da7fe856 151 /**
bcostm 6:e1d9da7fe856 152 * @}
bcostm 6:e1d9da7fe856 153 */
bcostm 6:e1d9da7fe856 154
bcostm 6:e1d9da7fe856 155 /**
bcostm 6:e1d9da7fe856 156 * @}
bcostm 6:e1d9da7fe856 157 */
bcostm 6:e1d9da7fe856 158
bcostm 6:e1d9da7fe856 159 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/