Paparazzi UAS  v5.15_devel-230-gc96ce27
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 #define MT9V117_AE_LUMA 0x0069
24 
25 /* Variables */
26 #define MT9V117_AE_RULE_VAR 9
27 #define MT9V117_AE_RULE_ALGO_OFFSET 4
28 #define MT9V117_AE_RULE_ALGO_AVERAGE 0
29 #define MT9V117_AE_RULE_ALGO_WEIGHTED 1
30 #define MT9V117_AE_TRACK_VAR 10
31 #define MT9V117_AWB_VAR 11
32 #define MT9V117_AWB_PIXEL_THRESHOLD_COUNT_OFFSET 64
33 #define MT9V117_LOW_LIGHT_VAR 15
34 #define MT9V117_CAM_CTRL_VAR 18
35 #define MT9V117_CAM_SENSOR_CFG_Y_ADDR_START_OFFSET 0
36 #define MT9V117_CAM_SENSOR_CFG_X_ADDR_START_OFFSET 2
37 #define MT9V117_CAM_SENSOR_CFG_Y_ADDR_END_OFFSET 4
38 #define MT9V117_CAM_SENSOR_CFG_X_ADDR_END_OFFSET 6
39 #define MT9V117_CAM_SENSOR_CFG_FRAME_LENGTH_LINES_OFFSET 14
40 #define MT9V117_CAM_SENSOR_CFG_CPIPE_LAST_ROW_OFFSET 20
41 #define MT9V117_CAM_SENSOR_CFG_FDPERIOD_60HZ 22
42 #define MT9V117_CAM_SENSOR_CFG_FDPERIOD_50HZ 24
43 #define MT9V117_CAM_SENSOR_CFG_MAX_FDZONE_60_OFFSET 26
44 #define MT9V117_CAM_SENSOR_CFG_MAX_FDZONE_50_OFFSET 28
45 #define MT9V117_CAM_SENSOR_CFG_TARGET_FDZONE_60_OFFSET 30
46 #define MT9V117_CAM_SENSOR_CFG_TARGET_FDZONE_50_OFFSET 32
47 #define MT9V117_CAM_SENSOR_CONTROL_READ_MODE_OFFSET 40
48 #define MT9V117_CAM_SENSOR_CONTROL_Y_SKIP_EN (1 << 2)
49 #define MT9V117_CAM_SENSOR_CONTROL_VERT_FLIP_EN (1 << 1)
50 #define MT9V117_CAM_SENSOR_CONTROL_HORZ_MIRROR_EN (1 << 0)
51 #define MT9V117_CAM_FLICKER_PERIOD_OFFSET 62
52 #define MT9V117_CAM_FLICKER_PERIOD_60HZ 0
53 #define MT9V117_CAM_FLICKER_PERIOD_50HZ 1
54 #define MT9V117_CAM_CROP_WINDOW_XOFFSET_OFFSET 72
55 #define MT9V117_CAM_CROP_WINDOW_YOFFSET_OFFSET 74
56 #define MT9V117_CAM_CROP_WINDOW_WIDTH_OFFSET 76
57 #define MT9V117_CAM_CROP_WINDOW_HEIGHT_OFFSET 78
58 #define MT9V117_CAM_CROP_MODE_OFFSET 80
59 #define MT9V117_CAM_OUTPUT_WIDTH_OFFSET 84
60 #define MT9V117_CAM_OUTPUT_HEIGHT_OFFSET 86
61 #define MT9V117_CAM_OUTPUT_FORMAT_OFFSET 88
62 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_565 (0 << 12)
63 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_555 (1 << 12)
64 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_444X (2 << 12)
65 #define MT9V117_CAM_OUTPUT_FORMAT_RGB_X444 (3 << 12)
66 #define MT9V117_CAM_OUTPUT_FORMAT_BAYER_10 (0 << 10)
67 #define MT9V117_CAM_OUTPUT_FORMAT_YUV (0 << 8)
68 #define MT9V117_CAM_OUTPUT_FORMAT_RGB (1 << 8)
69 #define MT9V117_CAM_OUTPUT_FORMAT_BAYER (2 << 8)
70 #define MT9V117_CAM_OUTPUT_FORMAT_BT656_ENABLE (1 << 3)
71 #define MT9V117_CAM_OUTPUT_FORMAT_MONO_ENABLE (1 << 2)
72 #define MT9V117_CAM_OUTPUT_FORMAT_SWAP_BYTES (1 << 1)
73 #define MT9V117_CAM_OUTPUT_FORMAT_SWAP_RED_BLUE (1 << 0)
74 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_XSTART_OFFSET 236
75 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_YSTART_OFFSET 238
76 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_XEND_OFFSET 240
77 #define MT9V117_CAM_STAT_AWB_HG_WINDOW_YEND_OFFSET 242
78 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_XSTART_OFFSET 244
79 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_YSTART_OFFSET 246
80 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_XEND_OFFSET 248
81 #define MT9V117_CAM_STAT_AE_INITIAL_WINDOW_YEND_OFFSET 250
82 #define MT9V117_CAM_LL_START_GAIN_METRIC_OFFSET 278
83 #define MT9V117_CAM_LL_STOP_GAIN_METRIC_OFFSET 280
84 #define MT9V117_SYSMGR_VAR 23
85 #define MT9V117_SYSMGR_NEXT_STATE_OFFSET 0
86 #define MT9V117_SYS_STATE_ENTER_CONFIG_CHANGE 0x28
87 #define MT9V117_SYS_STATE_STREAMING 0x31
88 #define MT9V117_SYS_STATE_START_STREAMING 0x34
89 #define MT9V117_SYS_STATE_ENTER_SUSPEND 0x40
90 #define MT9V117_SYS_STATE_SUSPENDED 0x41
91 #define MT9V117_SYS_STATE_ENTER_STANDBY 0x50
92 #define MT9V117_SYS_STATE_STANDBY 0x52
93 #define MT9V117_SYS_STATE_LEAVE_STANDBY 0x54
94 #define MT9V117_PATCHLDR_VAR 24
95 #define MT9V117_PATCHLDR_LOADER_ADDRESS_OFFSET 0
96 #define MT9V117_PATCHLDR_PATCH_ID_OFFSET 2
97 #define MT9V117_PATCHLDR_FIRMWARE_ID_OFFSET 4
98 
99 #endif /* MT9V117_REGS_H */