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
mt9v117_regs.h
Go to the documentation of this file.
1 #ifndef MT9V117_REGS_H
2 #define MT9V117_REGS_H
3 
4 #define MT9V117_ADDRESS 0xBA
5 
6 /* Registers */
7 #define MT9V117_CHIP_ID 0x0000
8 #define MT9V117_CHIP_ID_RESP 0x2282
9 #define MT9V117_RESET_MISC_CTRL 0x001A
10 #define MT9V117_RESET_SOC_I2C (1 << 0)
11 #define MT9V117_PAD_SLEW 0x0030
12 #define MT9V117_COMMAND 0x0040
13 #define MT9V117_COMMAND_OK (1 << 15)
14 #define MT9V117_COMMAND_WAIT_FOR_EVENT (1 << 3)
15 #define MT9V117_COMMAND_REFRESH (1 << 2)
16 #define MT9V117_COMMAND_SET_STATE (1 << 1)
17 #define MT9V117_COMMAND_APPLY_PATCH (1 << 0)
18 #define MT9V117_ACCESS_CTL_STAT 0x0982
19 #define MT9V117_PHYSICAL_ADDRESS_ACCESS 0x098A
20 #define MT9V117_LOGICAL_ADDRESS_ACCESS 0x098E
21 #define MT9V117_AE_TRACK_JUMP_DIVISOR 0xA812
22 #define MT9V117_CAM_AET_SKIP_FRAMES 0xC868
23 
24 /* Variables */
25 #define MT9V117_AE_RULE_VAR 9
26 #define MT9V117_AE_RULE_ALGO_OFFSET 4
27 #define MT9V117_AE_RULE_ALGO_AVERAGE 0
28 #define MT9V117_AE_RULE_ALGO_WEIGHTED 1
29 #define MT9V117_AE_TRACK_VAR 10
30 #define MT9V117_AWB_VAR 11
31 #define MT9V117_AWB_PIXEL_THRESHOLD_COUNT_OFFSET 64
32 #define MT9V117_LOW_LIGHT_VAR 15
33 #define MT9V117_CAM_CTRL_VAR 18
34 #define MT9V117_CAM_SENSOR_CFG_Y_ADDR_START_OFFSET 0
35 #define MT9V117_CAM_SENSOR_CFG_X_ADDR_START_OFFSET 2
36 #define MT9V117_CAM_SENSOR_CFG_Y_ADDR_END_OFFSET 4
37 #define MT9V117_CAM_SENSOR_CFG_X_ADDR_END_OFFSET 6
38 #define MT9V117_CAM_SENSOR_CFG_FRAME_LENGTH_LINES_OFFSET 14
39 #define MT9V117_CAM_SENSOR_CFG_CPIPE_LAST_ROW_OFFSET 20
40 #define MT9V117_CAM_SENSOR_CFG_FDPERIOD_60HZ 22
41 #define MT9V117_CAM_SENSOR_CFG_FDPERIOD_50HZ 24
42 #define MT9V117_CAM_SENSOR_CFG_MAX_FDZONE_60_OFFSET 26
43 #define MT9V117_CAM_SENSOR_CFG_MAX_FDZONE_50_OFFSET 28
44 #define MT9V117_CAM_SENSOR_CFG_TARGET_FDZONE_60_OFFSET 30
45 #define MT9V117_CAM_SENSOR_CFG_TARGET_FDZONE_50_OFFSET 32
46 #define MT9V117_CAM_SENSOR_CONTROL_READ_MODE_OFFSET 40
47 #define MT9V117_CAM_SENSOR_CONTROL_Y_SKIP_EN (1 << 2)
48 #define MT9V117_CAM_SENSOR_CONTROL_VERT_FLIP_EN (1 << 1)
49 #define MT9V117_CAM_SENSOR_CONTROL_HORZ_MIRROR_EN (1 << 0)
50 #define MT9V117_CAM_FLICKER_PERIOD_OFFSET 62
51 #define MT9V117_CAM_FLICKER_PERIOD_60HZ 0
52 #define MT9V117_CAM_FLICKER_PERIOD_50HZ 1
53 #define MT9V117_CAM_CROP_WINDOW_XOFFSET_OFFSET 72
54 #define MT9V117_CAM_CROP_WINDOW_YOFFSET_OFFSET 74
55 #define MT9V117_CAM_CROP_WINDOW_WIDTH_OFFSET 76
56 #define MT9V117_CAM_CROP_WINDOW_HEIGHT_OFFSET 78
57 #define MT9V117_CAM_CROP_MODE_OFFSET 80
58 #define MT9V117_CAM_OUTPUT_WIDTH_OFFSET 84
59 #define MT9V117_CAM_OUTPUT_HEIGHT_OFFSET 86
60 #define MT9V117_CAM_OUTPUT_FORMAT_OFFSET 88
61 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_565 (0 << 12)
62 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_555 (1 << 12)
63 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_444X (2 << 12)
64 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_X444 (3 << 12)
65 #define MT9V117_CAM_OUTPUT_FORMAT_BAYER_10 (0 << 10)
66 #define MT9V117_CAM_OUTPUT_FORMAT_YUV (0 << 8)
67 #define MT9V117_CAM_OUTPUT_FORMAT_RGB (1 << 8)
68 #define MT9V117_CAM_OUTPUT_FORMAT_BAYER (2 << 8)
69 #define MT9V117_CAM_OUTPUT_FORMAT_BT656_ENABLE (1 << 3)
70 #define MT9V117_CAM_OUTPUT_FORMAT_MONO_ENABLE (1 << 2)
71 #define MT9V117_CAM_OUTPUT_FORMAT_SWAP_BYTES (1 << 1)
72 #define MT9V117_CAM_OUTPUT_FORMAT_SWAP_RED_BLUE (1 << 0)
73 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_XSTART_OFFSET 236
74 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_YSTART_OFFSET 238
75 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_XEND_OFFSET 240
76 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_YEND_OFFSET 242
77 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_XSTART_OFFSET 244
78 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_YSTART_OFFSET 246
79 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_XEND_OFFSET 248
80 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_YEND_OFFSET 250
81 #define MT9V117_CAM_LL_START_GAIN_METRIC_OFFSET 278
82 #define MT9V117_CAM_LL_STOP_GAIN_METRIC_OFFSET 280
83 #define MT9V117_SYSMGR_VAR 23
84 #define MT9V117_SYSMGR_NEXT_STATE_OFFSET 0
85 #define MT9V117_SYS_STATE_ENTER_CONFIG_CHANGE 0x28
86 #define MT9V117_SYS_STATE_STREAMING 0x31
87 #define MT9V117_SYS_STATE_START_STREAMING 0x34
88 #define MT9V117_SYS_STATE_ENTER_SUSPEND 0x40
89 #define MT9V117_SYS_STATE_SUSPENDED 0x41
90 #define MT9V117_SYS_STATE_ENTER_STANDBY 0x50
91 #define MT9V117_SYS_STATE_STANDBY 0x52
92 #define MT9V117_SYS_STATE_LEAVE_STANDBY 0x54
93 #define MT9V117_PATCHLDR_VAR 24
94 #define MT9V117_PATCHLDR_LOADER_ADDRESS_OFFSET 0
95 #define MT9V117_PATCHLDR_PATCH_ID_OFFSET 2
96 #define MT9V117_PATCHLDR_FIRMWARE_ID_OFFSET 4
97 
98 #endif /* MT9V117_REGS_H */