Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
mt9v117.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 MT9V117_H
28 #define MT9V117_H
29 
30 #include "std.h"
31 #include "mcu_periph/i2c.h"
32 // Camera parameters are defined in sections
33 #include "generated/airframe.h"
34 
35 #ifndef MT9V117_TARGET_FPS
36 #define MT9V117_TARGET_FPS 0
37 #endif
38 
39 // parameters for undistortion, defaults are rough estimates
40 #ifndef MT9V117_FOCAL_X
41 #define MT9V117_FOCAL_X 307.f
42 #endif
43 #ifndef MT9V117_FOCAL_Y
44 #define MT9V117_FOCAL_Y 307.f
45 #endif
46 #ifndef MT9V117_CENTER_X
47 #define MT9V117_CENTER_X 120.f
48 #endif
49 #ifndef MT9V117_CENTER_Y
50 #define MT9V117_CENTER_Y 120.f
51 #endif
52 #ifndef MT9V117_DHANE_K
53 #define MT9V117_DHANE_K 1.f
54 #endif
55 #ifndef MT9V117_TARGET_LUMA
56 #define MT9V117_TARGET_LUMA 18000
57 #endif
58 
59 struct mt9v117_t {
61  struct i2c_transaction i2c_trans;
62 };
63 
64 extern struct mt9v117_t mt9v117;
65 
66 void mt9v117_init(struct mt9v117_t *mt);
67 
68 #endif /* MT9V117_H */
I2C transaction structure.
Definition: i2c.h:93
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
struct i2c_transaction i2c_trans
I2C transaction for comminication with CMOS chip.
Definition: mt9v117.h:61
void mt9v117_init(struct mt9v117_t *mt)
Initialisation of the Aptina MT9V117 CMOS sensor (1/6 inch VGA, bottom camera)
Definition: mt9v117.c:380
struct i2c_periph * i2c_periph
I2C peripheral used to communicate over.
Definition: mt9v117.h:60
struct mt9v117_t mt9v117
Definition: mt9v117.c:80