STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
ov9655.h
Go to the documentation of this file.
1 
39 /* Define to prevent recursive inclusion -------------------------------------*/
40 #ifndef __OV9655_H
41 #define __OV9655_H
42 
43 #ifdef __cplusplus
44  extern "C" {
45 #endif
46 
47 /* Includes ------------------------------------------------------------------*/
48 #include "../Common/camera.h"
49 
76 #define OV9655_ID 0x96
77 
81 /* OV9655 Registers definition */
82 #define OV9655_SENSOR_PIDH 0x0A
83 #define OV9655_SENSOR_PIDL 0x0B
84 #define OV9655_SENSOR_COM7 0x12
85 #define OV9655_SENSOR_TSLB 0x3A
86 #define OV9655_SENSOR_MTX1 0x4F
87 #define OV9655_SENSOR_MTX2 0x50
88 #define OV9655_SENSOR_MTX3 0x51
89 #define OV9655_SENSOR_MTX4 0x52
90 #define OV9655_SENSOR_MTX5 0x53
91 #define OV9655_SENSOR_MTX6 0x54
92 #define OV9655_SENSOR_BRTN 0x55
93 #define OV9655_SENSOR_CNST1 0x56
94 #define OV9655_SENSOR_CNST2 0x57
95 
99 #define OV9655_BRIGHTNESS_LEVEL0 0xB0 /* Brightness level -2 */
100 #define OV9655_BRIGHTNESS_LEVEL1 0x98 /* Brightness level -1 */
101 #define OV9655_BRIGHTNESS_LEVEL2 0x00 /* Brightness level 0 */
102 #define OV9655_BRIGHTNESS_LEVEL3 0x18 /* Brightness level +1 */
103 #define OV9655_BRIGHTNESS_LEVEL4 0x30 /* Brightness level +2 */
104 
105 #define OV9655_BLACK_WHITE_BW 0xCC000000000000 /* Black and white effect */
106 #define OV9655_BLACK_WHITE_NEGATIVE 0xEC808000008080 /* Negative effect */
107 #define OV9655_BLACK_WHITE_BW_NEGATIVE 0xEC000000000000 /* BW and Negative effect */
108 #define OV9655_BLACK_WHITE_NORMAL 0xCC808000008080 /* Normal effect */
109 
110 #define OV9655_CONTRAST_LEVEL0 0x30 /* Contrast level -2 */
111 #define OV9655_CONTRAST_LEVEL1 0x38 /* Contrast level -1 */
112 #define OV9655_CONTRAST_LEVEL2 0x40 /* Contrast level 0 */
113 #define OV9655_CONTRAST_LEVEL3 0x50 /* Contrast level +1 */
114 #define OV9655_CONTRAST_LEVEL4 0x60 /* Contrast level +2 */
115 
116 #define OV9655_COLOR_EFFECT_NONE 0xCC808000008080 /* No color effect */
117 #define OV9655_COLOR_EFFECT_ANTIQUE 0xCC000020F00000 /* Antique effect */
118 #define OV9655_COLOR_EFFECT_BLUE 0xCC000000000060 /* Blue effect */
119 #define OV9655_COLOR_EFFECT_GREEN 0xCC000000008000 /* Green effect */
120 #define OV9655_COLOR_EFFECT_RED 0xCC600000000000 /* Red effect */
121 
128 void ov9655_Init(uint16_t DeviceAddr, uint32_t resolution);
129 void ov9655_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value);
130 uint16_t ov9655_ReadID(uint16_t DeviceAddr);
131 
132 void CAMERA_IO_Init(void);
133 void CAMERA_IO_Write(uint8_t addr, uint8_t reg, uint8_t value);
134 uint8_t CAMERA_IO_Read(uint8_t addr, uint8_t reg);
135 void CAMERA_Delay(uint32_t delay);
136 
137 /* CAMERA driver structure */
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* __OV9655_H */
147 
159 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void CAMERA_IO_Write(uint8_t addr, uint8_t reg, uint8_t value)
CAMERA_DrvTypeDef ov9655_drv
Definition: ov9655.c:91
void CAMERA_Delay(uint32_t delay)
void ov9655_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value)
Configures the OV9655 camera feature.
Definition: ov9655.c:635
uint8_t CAMERA_IO_Read(uint8_t addr, uint8_t reg)
uint16_t ov9655_ReadID(uint16_t DeviceAddr)
Read the OV9655 Camera identity.
Definition: ov9655.c:684
void ov9655_Init(uint16_t DeviceAddr, uint32_t resolution)
Initializes the OV9655 CAMERA component.
Definition: ov9655.c:574
void CAMERA_IO_Init(void)