Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Initialization of the video specific parts of the Bebop. More...
#include "video.h"
#include "std.h"
#include "mt9f002.h"
#include <stdio.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <mcu_periph/i2c.h>
#include <linux/i2c-dev.h>
#include <linux/types.h>
#include "boards/bebop.h"
Go to the source code of this file.
Functions | |
static bool_t | write_reg (int fd, char *addr_val, uint8_t cnt) |
static bool_t | _write (int fd, char *data, uint8_t cnt) |
void | mt9v117_init (void) |
Initialisation of the Aptina MT9V117 CMOS sensor (1/6 inch VGA, bottom camera) More... | |
void | mt9f002_open (void) |
void | mt9f002_close (void) |
void | mt9f002_set_address (uint8_t address) |
void | mt9f002_write_reg8 (uint16_t reg, uint8_t value) |
void | mt9f002_write_reg16 (uint16_t reg, uint16_t value) |
uint8_t | mt9f002_read_reg8 (uint16_t reg) |
uint16_t | mt9f002_read_reg16 (uint16_t reg) |
void | mt9f002_init (void) |
Initialisation of the Aptina MT9F002 CMOS sensor (1/2.3 inch 14Mp, front camera) More... | |
Variables | |
struct video_config_t | bottom_camera |
struct video_config_t | front_camera |
int | mt9f002_i2c_port |
Initialization of the video specific parts of the Bebop.
Definition in file video.c.
|
static |
Definition at line 85 of file video.c.
References TRUE.
Referenced by mt9v117_init().
void mt9f002_close | ( | void | ) |
Definition at line 292 of file video.c.
References mt9f002_i2c_port.
Referenced by mt9f002_read_reg16(), mt9f002_read_reg8(), mt9f002_write_reg16(), and mt9f002_write_reg8().
void mt9f002_init | ( | void | ) |
Initialisation of the Aptina MT9F002 CMOS sensor (1/2.3 inch 14Mp, front camera)
Definition at line 384 of file video.c.
References MT9F002_ANALOG_GAIN_CODE_BLUE, MT9F002_ANALOG_GAIN_CODE_GLOBAL, MT9F002_ANALOG_GAIN_CODE_GREENB, MT9F002_ANALOG_GAIN_CODE_GREENR, MT9F002_ANALOG_GAIN_CODE_RED, MT9F002_BLUE_GAIN, MT9F002_CALIB_BLUE, MT9F002_CALIB_BLUE_ASC1, MT9F002_CALIB_GREEN1, MT9F002_CALIB_GREEN1_ASC1, MT9F002_CALIB_GREEN2, MT9F002_CALIB_GREEN2_ASC1, MT9F002_CALIB_RED, MT9F002_CALIB_RED_ASC1, MT9F002_DAC_ID_FBIAS, MT9F002_FRAME_LENGTH_LINES, MT9F002_GLOBAL_GAIN, MT9F002_GREEN1_GAIN, MT9F002_GREEN2_GAIN, MT9F002_HISPI_TIMING, MT9F002_LINE_LENGTH_PCK, MT9F002_MIPI_TIMING_2, MT9F002_MODE_SELECT, MT9F002_OP_PIX_CLK_DIV, MT9F002_P_BL_P0Q0, MT9F002_P_BL_P0Q1, MT9F002_P_BL_P0Q2, MT9F002_P_BL_P0Q3, MT9F002_P_BL_P0Q4, MT9F002_P_BL_P1Q0, MT9F002_P_BL_P1Q1, MT9F002_P_BL_P1Q2, MT9F002_P_BL_P1Q3, MT9F002_P_BL_P1Q4, MT9F002_P_BL_P2Q0, MT9F002_P_BL_P2Q1, MT9F002_P_BL_P2Q2, MT9F002_P_BL_P2Q3, MT9F002_P_BL_P2Q4, MT9F002_P_BL_P3Q0, MT9F002_P_BL_P3Q1, MT9F002_P_BL_P3Q2, MT9F002_P_BL_P3Q3, MT9F002_P_BL_P3Q4, MT9F002_P_BL_P4Q0, MT9F002_P_BL_P4Q1, MT9F002_P_BL_P4Q2, MT9F002_P_BL_P4Q3, MT9F002_P_BL_P4Q4, MT9F002_P_BL_Q5, MT9F002_P_GB_P0Q0, MT9F002_P_GB_P0Q1, MT9F002_P_GB_P0Q2, MT9F002_P_GB_P0Q3, MT9F002_P_GB_P0Q4, MT9F002_P_GB_P1Q0, MT9F002_P_GB_P1Q1, MT9F002_P_GB_P1Q2, MT9F002_P_GB_P1Q3, MT9F002_P_GB_P1Q4, MT9F002_P_GB_P2Q0, MT9F002_P_GB_P2Q1, MT9F002_P_GB_P2Q2, MT9F002_P_GB_P2Q3, MT9F002_P_GB_P2Q4, MT9F002_P_GB_P3Q0, MT9F002_P_GB_P3Q1, MT9F002_P_GB_P3Q2, MT9F002_P_GB_P3Q3, MT9F002_P_GB_P3Q4, MT9F002_P_GB_P4Q0, MT9F002_P_GB_P4Q1, MT9F002_P_GB_P4Q2, MT9F002_P_GB_P4Q3, MT9F002_P_GB_P4Q4, MT9F002_P_GB_Q5, MT9F002_P_GR_P0Q0, MT9F002_P_GR_P0Q2, MT9F002_P_GR_P0Q3, MT9F002_P_GR_P0Q4, MT9F002_P_GR_P1Q0, MT9F002_P_GR_P1Q1, MT9F002_P_GR_P1Q2, MT9F002_P_GR_P1Q3, MT9F002_P_GR_P1Q4, MT9F002_P_GR_P2Q0, MT9F002_P_GR_P2Q1, MT9F002_P_GR_P2Q2, MT9F002_P_GR_P2Q3, MT9F002_P_GR_P2Q4, MT9F002_P_GR_P3Q0, MT9F002_P_GR_P3Q1, MT9F002_P_GR_P3Q2, MT9F002_P_GR_P3Q3, MT9F002_P_GR_P3Q4, MT9F002_P_GR_P4Q0, MT9F002_P_GR_P4Q1, MT9F002_P_GR_P4Q2, MT9F002_P_GR_P4Q3, MT9F002_P_GR_P4Q4, MT9F002_P_GR_Q5, MT9F002_P_RD_P0Q0, MT9F002_P_RD_P0Q1, MT9F002_P_RD_P0Q2, MT9F002_P_RD_P0Q3, MT9F002_P_RD_P0Q4, MT9F002_P_RD_P1Q0, MT9F002_P_RD_P1Q1, MT9F002_P_RD_P1Q2, MT9F002_P_RD_P1Q3, MT9F002_P_RD_P1Q4, MT9F002_P_RD_P2Q0, MT9F002_P_RD_P2Q1, MT9F002_P_RD_P2Q2, MT9F002_P_RD_P2Q3, MT9F002_P_RD_P2Q4, MT9F002_P_RD_P3Q0, MT9F002_P_RD_P3Q1, MT9F002_P_RD_P3Q2, MT9F002_P_RD_P3Q3, MT9F002_P_RD_P3Q4, MT9F002_P_RD_P4Q0, MT9F002_P_RD_P4Q1, MT9F002_P_RD_P4Q2, MT9F002_P_RD_P4Q3, MT9F002_P_RD_P4Q4, MT9F002_P_RD_Q5, MT9F002_PLL_MULTIPLIER, MT9F002_POLY_ORIGIN_C, MT9F002_POLY_ORIGIN_R, MT9F002_PRE_PLL_CLK_DIV, MT9F002_READ_MODE, MT9F002_RED_GAIN, MT9F002_ROW_SPEED, MT9F002_SCALE_M, MT9F002_SCALING_MODE, MT9F002_VT_PIX_CLK_DIV, mt9f002_write_reg16(), mt9f002_write_reg8(), MT9F002_X_ADDR_END_, MT9F002_X_ADDR_START_, MT9F002_X_ODD_INC, MT9F002_Y_ADDR_END_, MT9F002_Y_ADDR_START_, and MT9F002_Y_ODD_INC.
Referenced by board_init().
void mt9f002_open | ( | void | ) |
Definition at line 283 of file video.c.
References mt9f002_i2c_port.
Referenced by mt9f002_read_reg16(), mt9f002_read_reg8(), mt9f002_write_reg16(), and mt9f002_write_reg8().
Definition at line 363 of file video.c.
References mt9f002_close(), mt9f002_i2c_port, mt9f002_open(), and mt9f002_set_address().
Definition at line 345 of file video.c.
References mt9f002_close(), mt9f002_i2c_port, mt9f002_open(), and mt9f002_set_address().
void mt9f002_set_address | ( | uint8_t | address | ) |
Definition at line 297 of file video.c.
References I2C_SLAVE_FORCE, and mt9f002_i2c_port.
Referenced by mt9f002_read_reg16(), mt9f002_read_reg8(), mt9f002_write_reg16(), and mt9f002_write_reg8().
Definition at line 325 of file video.c.
References mt9f002_close(), mt9f002_i2c_port, mt9f002_open(), and mt9f002_set_address().
Referenced by mt9f002_init().
Definition at line 305 of file video.c.
References mt9f002_close(), mt9f002_i2c_port, mt9f002_open(), mt9f002_set_address(), and value.
Referenced by mt9f002_init().
void mt9v117_init | ( | void | ) |
Initialisation of the Aptina MT9V117 CMOS sensor (1/6 inch VGA, bottom camera)
Definition at line 100 of file video.c.
References _write(), and write_reg().
Referenced by board_init().
|
static |
Definition at line 62 of file video.c.
Referenced by mt9v117_init().
struct video_config_t bottom_camera |
struct video_config_t front_camera |
int mt9f002_i2c_port |
Definition at line 273 of file video.c.
Referenced by mt9f002_close(), mt9f002_open(), mt9f002_read_reg16(), mt9f002_read_reg8(), mt9f002_set_address(), mt9f002_write_reg16(), and mt9f002_write_reg8().