Select one of the symbols to view example projects that use it.
 
Outline
#define __OV5640_H
#include "../Common/camera.h"
#define OV5640_ID
#define OV5640_BRIGHTNESS_LEVEL4P
#define OV5640_BRIGHTNESS_LEVEL3P
#define OV5640_BRIGHTNESS_LEVEL2P
#define OV5640_BRIGHTNESS_LEVEL1P
#define OV5640_BRIGHTNESS_LEVEL0
#define OV5640_BRIGHTNESS_LEVEL1N
#define OV5640_BRIGHTNESS_LEVEL2N
#define OV5640_BRIGHTNESS_LEVEL3N
#define OV5640_BRIGHTNESS_LEVEL4N
#define OV5640_SATURATION_LEVEL4P
#define OV5640_SATURATION_LEVEL3P
#define OV5640_SATURATION_LEVEL2P
#define OV5640_SATURATION_LEVEL1P
#define OV5640_SATURATION_LEVEL0
#define OV5640_SATURATION_LEVEL1N
#define OV5640_SATURATION_LEVEL2N
#define OV5640_SATURATION_LEVEL3N
#define OV5640_SATURATION_LEVEL4N
#define OV5640_CONTRAST_LEVEL4P
#define OV5640_CONTRAST_LEVEL3P
#define OV5640_CONTRAST_LEVEL2P
#define OV5640_CONTRAST_LEVEL1P
#define OV5640_CONTRAST_LEVEL0
#define OV5640_CONTRAST_LEVEL1N
#define OV5640_CONTRAST_LEVEL2N
#define OV5640_CONTRAST_LEVEL3N
#define OV5640_CONTRAST_LEVEL4N
#define OV5640_HUE_150P
#define OV5640_HUE_120P
#define OV5640_HUE_90P
#define OV5640_HUE_60P
#define OV5640_HUE_30P
#define OV5640_HUE_0
#define OV5640_HUE_30N
#define OV5640_HUE_60N
#define OV5640_HUE_90N
#define OV5640_HUE_120N
#define OV5640_HUE_150N
#define OV5640_HUE_180N
#define OV5640_MIRROR
#define OV5640_FLIP
#define OV5640_MIRROR_FLIP
#define OV5640_MIRROR_FLIP_NORMAL
#define OV5640_ZOOM_x8
#define OV5640_ZOOM_x4
#define OV5640_ZOOM_x2
#define OV5640_ZOOM_x1
#define OV5640_COLOR_EFFECT_NONE
#define OV5640_COLOR_EFFECT_BLUE
#define OV5640_COLOR_EFFECT_RED
#define OV5640_COLOR_EFFECT_GREEN
#define OV5640_COLOR_EFFECT_BW
#define OV5640_COLOR_EFFECT_SEPIA
#define OV5640_COLOR_EFFECT_NEGATIVE
#define OV5640_COLOR_EFFECT_BW_NEGATIVE
#define OV5640_COLOR_EFFECT_OVEREXPOSURE
#define OV5640_COLOR_EFFECT_SOLARIZE
#define OV5640_LIGHT_AUTO
#define OV5640_LIGHT_SUNNY
#define OV5640_LIGHT_OFFICE
#define OV5640_LIGHT_HOME
#define OV5640_LIGHT_CLOUDY
#define OV5640_SATURATION_0
#define OV5640_SATURATION_1
#define OV5640_SATURATION_2
#define OV5640_SATURATION_3
#define OV5640_EXPOSURE_LEVEL_0
#define OV5640_EXPOSURE_LEVEL_1
#define OV5640_EXPOSURE_LEVEL_2
#define OV5640_EXPOSURE_LEVEL_3
ov5640_Init(uint16_t, uint32_t);
ov5640_Config(uint16_t, uint32_t, uint32_t, uint32_t);
ov5640_ReadID(uint16_t);
OV5640_SetLightMode(uint16_t, uint8_t);
OV5640_SetEffect(uint16_t, uint32_t);
OV5640_SetBrightness(uint16_t, uint8_t);
OV5640_SetSaturation(uint16_t, uint8_t);
OV5640_SetContrast(uint16_t, uint8_t);
OV5640_SetHueDegree(uint16_t, uint16_t);
OV5640_MirrorFlipConfig(uint16_t, uint8_t);
OV5640_ZoomConfig(uint16_t, uint8_t);
OV5640_GetResolution(uint16_t);
CAMERA_IO_Init();
CAMERA_IO_Write(uint8_t, uint16_t, uint16_t);
CAMERA_IO_Read(uint8_t, uint16_t);
CAMERA_Delay(uint32_t);
ov5640_drv;
Files
loading...
CodeScopeSTM32 Libraries and Samplesov5640ov5640.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file ov5640.h * @author MCD Application Team * @brief This file contains all the functions prototypes for the ov5640.c * driver. ****************************************************************************** * @attention * * Copyright (c) 2019 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __OV5640_H #define __OV5640_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "../Common/camera.h" /** @addtogroup BSP * @{ *//* ... */ /** @addtogroup Components * @{ *//* ... */ /** @addtogroup ov5640 * @{ *//* ... */ /** @defgroup OV5640_Exported_Types * @{ *//* ... */ /** * @} *//* ... */ /** @defgroup OV5640_Exported_Constants * @{ *//* ... */ /** * @brief OV5640 ID *//* ... */ #define OV5640_ID 0x5640 /** * @brief OV5640 Registers *//* ... */ /** * @brief OV5640 Features Parameters *//* ... */ /* Brightness */ #define OV5640_BRIGHTNESS_LEVEL4P 0x00 /* Brightness level +4 */ #define OV5640_BRIGHTNESS_LEVEL3P 0x01 /* Brightness level +3 */ #define OV5640_BRIGHTNESS_LEVEL2P 0x02 /* Brightness level +2 */ #define OV5640_BRIGHTNESS_LEVEL1P 0x04 /* Brightness level +1 */ #define OV5640_BRIGHTNESS_LEVEL0 0x08 /* Brightness level 0 */ #define OV5640_BRIGHTNESS_LEVEL1N 0x10 /* Brightness level -1 */ #define OV5640_BRIGHTNESS_LEVEL2N 0x20 /* Brightness level -2 */ #define OV5640_BRIGHTNESS_LEVEL3N 0x40 /* Brightness level -3 */ #define OV5640_BRIGHTNESS_LEVEL4N 0x80 /* Brightness level -4 */ /* Saturation */ #define OV5640_SATURATION_LEVEL4P 0x00 /* Saturation level +4 */ #define OV5640_SATURATION_LEVEL3P 0x01 /* Saturation level +3 */ #define OV5640_SATURATION_LEVEL2P 0x02 /* Saturation level +2 */ #define OV5640_SATURATION_LEVEL1P 0x04 /* Saturation level +1 */ #define OV5640_SATURATION_LEVEL0 0x08 /* Saturation level 0 */ #define OV5640_SATURATION_LEVEL1N 0x10 /* Saturation level -1 */ #define OV5640_SATURATION_LEVEL2N 0x20 /* Saturation level -2 */ #define OV5640_SATURATION_LEVEL3N 0x40 /* Saturation level -3 */ #define OV5640_SATURATION_LEVEL4N 0x80 /* Saturation level -4 */ /* Contrast */ #define OV5640_CONTRAST_LEVEL4P 0x00 /* Contrast level +4 */ #define OV5640_CONTRAST_LEVEL3P 0x01 /* Contrast level +3 */ #define OV5640_CONTRAST_LEVEL2P 0x02 /* Contrast level +2 */ #define OV5640_CONTRAST_LEVEL1P 0x04 /* Contrast level +1 */ #define OV5640_CONTRAST_LEVEL0 0x08 /* Contrast level 0 */ #define OV5640_CONTRAST_LEVEL1N 0x10 /* Contrast level -1 */ #define OV5640_CONTRAST_LEVEL2N 0x20 /* Contrast level -2 */ #define OV5640_CONTRAST_LEVEL3N 0x40 /* Contrast level -3 */ #define OV5640_CONTRAST_LEVEL4N 0x80 /* Contrast level -4 */ /* Hue Control */ #define OV5640_HUE_150P 0x0001 /* Hue 150+ degree */ #define OV5640_HUE_120P 0x0002 /* Hue 120+ degree */ #define OV5640_HUE_90P 0x0004 /* Hue 90+ degree */ #define OV5640_HUE_60P 0x0008 /* Hue 60+ degree */ #define OV5640_HUE_30P 0x0010 /* Hue 30+ degree */ #define OV5640_HUE_0 0x0020 /* Hue 0 degree */ #define OV5640_HUE_30N 0x0040 /* Hue 30- degree */ #define OV5640_HUE_60N 0x0080 /* Hue 60- degree */ #define OV5640_HUE_90N 0x0100 /* Hue 90- degree */ #define OV5640_HUE_120N 0x0200 /* Hue 120- degree */ #define OV5640_HUE_150N 0x0400 /* Hue 150- degree */ #define OV5640_HUE_180N 0x0800 /* Hue 180- degree */ /* Mirror/Flip */ #define OV5640_MIRROR 0x00 /* Set camera mirror config */ #define OV5640_FLIP 0x01 /* Set camera flip config */ #define OV5640_MIRROR_FLIP 0x02 /* Set camera mirror and flip */ #define OV5640_MIRROR_FLIP_NORMAL 0x04 /* Set camera normal mode */ /* Zoom */ #define OV5640_ZOOM_x8 0x00 #define OV5640_ZOOM_x4 0x11 #define OV5640_ZOOM_x2 0x22 #define OV5640_ZOOM_x1 0x44 /* Special Effect */ #define OV5640_COLOR_EFFECT_NONE 0x00 /* No effect */ #define OV5640_COLOR_EFFECT_BLUE 0x01 /* Blue effect */ #define OV5640_COLOR_EFFECT_RED 0x02 /* Red effect */ #define OV5640_COLOR_EFFECT_GREEN 0x04 /* Green effect */ #define OV5640_COLOR_EFFECT_BW 0x08 /* Black and White effect */ #define OV5640_COLOR_EFFECT_SEPIA 0x10 /* Sepia effect */ #define OV5640_COLOR_EFFECT_NEGATIVE 0x20 /* Negative effect */ #define OV5640_COLOR_EFFECT_BW_NEGATIVE 0x40 /* BW Negative effect */ #define OV5640_COLOR_EFFECT_OVEREXPOSURE 0x80 /* Over exposure effect */ #define OV5640_COLOR_EFFECT_SOLARIZE 0x100 /* Solarized effect */ /* Light Mode */ #define OV5640_LIGHT_AUTO 0x00 /* Light Mode Auto */ #define OV5640_LIGHT_SUNNY 0x01 /* Light Mode Sunny */ #define OV5640_LIGHT_OFFICE 0x02 /* Light Mode Office */ #define OV5640_LIGHT_HOME 0x04 /* Light Mode Home */ #define OV5640_LIGHT_CLOUDY 0x08 /* Light Mode Claudy */ /* Saturation */ #define OV5640_SATURATION_0 0x00 /* Color saturation 0 */ #define OV5640_SATURATION_1 0x01 /* Color saturation 1 */ #define OV5640_SATURATION_2 0x02 /* Color saturation 2 */ #define OV5640_SATURATION_3 0x04 /* Color saturation 3 */ /* Exposure */ #define OV5640_EXPOSURE_LEVEL_0 0x00 /* Exposure Level 0 */ #define OV5640_EXPOSURE_LEVEL_1 0x01 /* Exposure Level 1 */ #define OV5640_EXPOSURE_LEVEL_2 0x02 /* Exposure Level 2 */ #define OV5640_EXPOSURE_LEVEL_3 0x04 /* Exposure Level 3 */ 71 defines /** * @} *//* ... */ /** @defgroup OV5640_Exported_Functions * @{ *//* ... */ void ov5640_Init(uint16_t DeviceAddr, uint32_t resolution); void ov5640_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value); uint16_t ov5640_ReadID(uint16_t DeviceAddr); void OV5640_SetLightMode(uint16_t DeviceAddr, uint8_t LightMode); void OV5640_SetEffect(uint16_t DeviceAddr, uint32_t Effect); void OV5640_SetBrightness(uint16_t DeviceAddr, uint8_t Level); void OV5640_SetSaturation(uint16_t DeviceAddr, uint8_t Level); void OV5640_SetContrast(uint16_t DeviceAddr, uint8_t Level); void OV5640_SetHueDegree(uint16_t DeviceAddr, uint16_t Degree); void OV5640_MirrorFlipConfig(uint16_t DeviceAddr, uint8_t Config); void OV5640_ZoomConfig(uint16_t DeviceAddr, uint8_t Zoom); int32_t OV5640_GetResolution(uint16_t DeviceAddr); void CAMERA_IO_Init(void); void CAMERA_IO_Write(uint8_t addr, uint16_t reg, uint16_t value); uint16_t CAMERA_IO_Read(uint8_t Addr, uint16_t Reg); void CAMERA_Delay(uint32_t delay); /* CAMERA driver structure */ extern CAMERA_DrvTypeDef ov5640_drv; /** * @} *//* ... */ #ifdef __cplusplus }extern "C" { ... } #endif /* ... */ #endif /* __OV5640_H */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */