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
203
204
205
206
207
|
OV5693_IOCTL_SET_MODE: set sensor mode
usage:
struct ov5693_mode {
int res_x;
int res_y;
int fps;
__u32 frame_length;
__u32 coarse_time;
__u32 coarse_time_short;
__u16 gain;
__u8 hdr_en;
};
struct ov5693_mode mode;
ioctl(fd, OV5693_IOCTL_SET_MODE , &mode);
inputs:
parameters of the mode to set
outputs: none
error return:
EINVAL - out of range input data
OV5693_IOCTL_GET_STATUS: get module status
usage:
u8 status;
ioctl(fd, OV5693_IOCTL_GET_STATUS , &status);
inputs:
outputs: always returns 0
error return:
OV5693_IOCTL_SET_GROUP_HOLD: set group parameters
usage:
struct ov5693_ae {
__u32 frame_length;
__u8 frame_length_enable;
__u32 coarse_time;
__u32 coarse_time_short;
__u8 coarse_time_enable;
__s32 gain;
__u8 gain_enable;
};
struct ov5693_ae ar;
ioctl(fd, OV5693_IOCTL_SET_GROUP_HOLD , &ae);
inputs:
outputs: always returns 0
error return:
OV5693_IOCTL_SET_FRAME_LENGTH: set sensor frame length
usage:
u32 len;
ioctl(fd, OV5693_IOCTL_SET_FRAME_LENGTH , len);
inputs:
sensor frame length
outputs: none
error return:
OV5693_IOCTL_SET_COARSE_TIME: set coarse time
usage:
u32 param;
ioctl(fd, OV5693_IOCTL_SET_COARSE_TIME , param);
inputs:
coarse time
outputs: none
error return:
OV5693_IOCTL_SET_HDR_COARSE_TIME: set hdr coarse time
usage:
struct ov5693_hdr {
__u32 coarse_time_long;
__u32 coarse_time_short;
};
struct ov5693_hdr param;
ioctl(fd, OV5693_IOCTL_SET_HDR_COARSE_TIME , ¶m);
inputs:
coarse time
outputs: none
error return:
OV5693_IOCTL_SET_GAIN: set gain value
usage:
u32 gain;
ioctl(fd, OV5693_IOCTL_SET_GAIN , gain);
inputs:
value of the gain to set
outputs: none
error return:
OV5693_IOCTL_GET_FUSEID: get fuse id
usage:
struct nvc_fuseid {
__u32 size;
__u8 data[16];
};
struct nvc_fuseid fuseid;
ioctl(fd, OV5693_IOCTL_GET_FUSEID , &fuseid);
inputs: none
outputs: fuse id
error return:
OV5693_IOCTL_READ_OTP_BANK: read otp bank data
usage:
struct ov5693_otp_bank {
__u32 id;
__u8 buf[16];
};
struct ov5693_otp_bank data;
ioctl(fd, OV5693_IOCTL_READ_OTP_BANK , &data);
inputs: none
outputs: otp bank data
error return:
OV5693_IOCTL_SET_CAL_DATA: write calibration data
usage:
struct ov5693_cal_data {
int loaded;
int rg_ratio;
int bg_ratio;
int rg_ratio_typical;
int bg_ratio_typical;
__u8 lenc[62];
};
struct ov5693_cal_data data;
ioctl(fd, OV5693_IOCTL_SET_CAL_DATA , &data);
inputs: calibration data
outputs: none
error return:
OV5693_IOCTL_GET_CAL_DATA: read calibration data
usage:
struct ov5693_cal_data {
int loaded;
int rg_ratio;
int bg_ratio;
int rg_ratio_typical;
int bg_ratio_typical;
__u8 lenc[62];
};
struct ov5693_cal_data data;
ioctl(fd, OV5693_IOCTL_GET_CAL_DATA , &data);
inputs: none
outputs: calibration data
error return:
|