Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mt9f002.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Freek van Tienen <freek.v.tienen@gmail.com>
3  *
4  * This file is part of paparazzi
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
27 #ifndef MT9F002H
28 #define MT9F002H
29 
30 #include "std.h"
31 #include "mcu_periph/i2c.h"
32 
33 /* Interface types for the MT9F002 connection */
38 };
39 
40 /* Main configuration structure */
41 struct mt9f002_t {
53  float vt_pix_clk;
54  float op_pix_clk;
57 
58  float target_fps;
59  float real_fps;
61  float real_exposure;
62 
63  float gain_green1;
64  float gain_blue;
65  float gain_red;
66  float gain_green2;
67 
70  float output_scaler;
75 
78 };
79 
80 void mt9f002_init(struct mt9f002_t *mt);
81 
82 #endif /* MT9F002_H */
unsigned short uint16_t
Definition: types.h:16
uint16_t output_height
Output height.
Definition: mt9f002.h:69
uint16_t op_sys_clk_div
Fixed PLL config from calculator tool.
Definition: mt9f002.h:49
uint8_t rowSpeed_2_0
Fixed PLL config from calculator tool.
Definition: mt9f002.h:51
uint16_t vt_pix_clk_div
Fixed PLL config from calculator tool.
Definition: mt9f002.h:44
uint16_t pll_multiplier
Fixed PLL config from calculator tool.
Definition: mt9f002.h:47
uint16_t scaled_width
Width after corrected scaling.
Definition: mt9f002.h:71
float gain_blue
Gain for the Blue pixels [1.5 -> 63.50].
Definition: mt9f002.h:64
uint16_t offset_x
Offset from left in pixels.
Definition: mt9f002.h:73
HiSPi type connection.
Definition: mt9f002.h:36
uint16_t vt_sys_clk_div
Fixed PLL config from calculator tool.
Definition: mt9f002.h:45
void mt9f002_init(struct mt9f002_t *mt)
Initialisation of the Aptina MT9F002 CMOS sensor (front camera)
Definition: mt9f002.c:788
float output_scaler
Output scale.
Definition: mt9f002.h:70
uint8_t shift_vt_pix_clk_div
Fixed PLL config from calculator tool.
Definition: mt9f002.h:50
uint8_t row_speed_10_8
Fixed PLL config from calculator tool.
Definition: mt9f002.h:52
enum mt9f002_interface interface
Interface used to connect.
Definition: mt9f002.h:42
uint16_t line_length
Calculated line length of blanking.
Definition: mt9f002.h:55
float real_fps
Real calculated FPS.
Definition: mt9f002.h:59
float gain_green1
Gain for the GreenR pixels [1.5 -> 63.50].
Definition: mt9f002.h:63
uint16_t output_width
Output width.
Definition: mt9f002.h:68
float vt_pix_clk
Calculated based on PLL.
Definition: mt9f002.h:53
mt9f002_interface
Definition: mt9f002.h:34
float target_fps
FPS wanted.
Definition: mt9f002.h:58
float gain_red
Gain for the Red pixels [1.5 -> 63.50].
Definition: mt9f002.h:65
I2C transaction structure.
Definition: i2c.h:93
struct i2c_periph * i2c_periph
I2C peripheral used to communicate over.
Definition: mt9f002.h:76
float gain_green2
Gain for the GreenB pixels [1.5 -> 63.50].
Definition: mt9f002.h:66
uint16_t offset_y
Offset from top in pixels.
Definition: mt9f002.h:74
float real_exposure
Real exposure time in ms.
Definition: mt9f002.h:61
I2C peripheral structure.
Definition: i2c.h:138
struct i2c_transaction i2c_trans
I2C transaction for comminication with CMOS chip.
Definition: mt9f002.h:77
unsigned char uint8_t
Definition: types.h:14
uint16_t op_pix_clk_div
Fixed PLL config from calculator tool.
Definition: mt9f002.h:48
float op_pix_clk
Calculated based on PLL.
Definition: mt9f002.h:54
uint16_t pre_pll_clk_div
Fixed PLL config from calculator tool.
Definition: mt9f002.h:46
Parallel type connection.
Definition: mt9f002.h:37
uint16_t scaled_height
Height after corrected scaling.
Definition: mt9f002.h:72
uint16_t frame_length
Calculated frame length of blanking.
Definition: mt9f002.h:56
float input_clk_freq
Input clock frequency.
Definition: mt9f002.h:43
MIPI type connection.
Definition: mt9f002.h:35
float target_exposure
Target exposure time in ms.
Definition: mt9f002.h:60
Architecture independent I2C (Inter-Integrated Circuit Bus) API.