1 /*
2  * 1394-Based Digital Camera Control Library
3  *
4  * Camera standard offsets
5  *
6  * Written by Damien Douxchamps <ddouxchamps@users.sf.net>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22 
23 
24 #ifndef __DC1394_OFFSETS_H_
25 #define __DC1394_OFFSETS_H_
26 
27 /* See the 1394-Based Digital Camera Spec. for definitions of these */
28 
29 /* Base ROM offsets */
30 
31 #define ROM_BUS_INFO_BLOCK             0x400U
32 #define ROM_ROOT_DIRECTORY             0x414U
33 #ifndef CSR_CONFIG_ROM_END
34 #define CSR_CONFIG_ROM_END             0x800U
35 #endif
36 
37 /* Absolute feature */
38 
39 #define REG_CAMERA_FEATURE_ABS_HI_BASE      0x700U
40 #define REG_CAMERA_FEATURE_ABS_LO_BASE      0x780U
41 
42 #define REG_CAMERA_ABS_MIN                  0x000U
43 #define REG_CAMERA_ABS_MAX                  0x004U
44 #define REG_CAMERA_ABS_VALUE                0x008U
45 
46 /* Command registers offsets */
47 
48 #define REG_CAMERA_INITIALIZE               0x000U
49 #define REG_CAMERA_V_FORMAT_INQ             0x100U
50 #define REG_CAMERA_V_MODE_INQ_BASE          0x180U
51 #define REG_CAMERA_V_RATE_INQ_BASE          0x200U
52 #define REG_CAMERA_V_REV_INQ_BASE           0x2C0U
53 #define REG_CAMERA_V_CSR_INQ_BASE           0x2E0U
54 #define REG_CAMERA_BASIC_FUNC_INQ           0x400U
55 #define REG_CAMERA_FEATURE_HI_INQ           0x404U
56 #define REG_CAMERA_FEATURE_LO_INQ           0x408U
57 #define REG_CAMERA_OPT_FUNC_INQ             0x40CU
58 #define REG_CAMERA_ADV_FEATURE_INQ          0x480U
59 #define REG_CAMERA_PIO_CONTROL_CSR_INQ      0x484U
60 #define REG_CAMERA_SIO_CONTROL_CSR_INQ      0x488U
61 #define REG_CAMERA_STROBE_CONTROL_CSR_INQ   0x48CU
62 #define REG_CAMERA_FEATURE_HI_BASE_INQ      0x500U
63 #define REG_CAMERA_FEATURE_LO_BASE_INQ      0x580U
64 #define REG_CAMERA_FRAME_RATE               0x600U
65 #define REG_CAMERA_VIDEO_MODE               0x604U
66 #define REG_CAMERA_VIDEO_FORMAT             0x608U
67 #define REG_CAMERA_ISO_DATA                 0x60CU
68 #define REG_CAMERA_POWER                    0x610U
69 #define REG_CAMERA_ISO_EN                   0x614U
70 #define REG_CAMERA_MEMORY_SAVE              0x618U
71 #define REG_CAMERA_ONE_SHOT                 0x61CU
72 #define REG_CAMERA_MEM_SAVE_CH              0x620U
73 #define REG_CAMERA_CUR_MEM_CH               0x624U
74 #define REG_CAMERA_SOFT_TRIGGER             0x62CU
75 #define REG_CAMERA_DATA_DEPTH               0x630U
76 #define REG_CAMERA_FEATURE_ERR_HI_INQ       0x640h
77 #define REG_CAMERA_FEATURE_ERR_LO_INQ       0x644h
78 
79 #define REG_CAMERA_FEATURE_HI_BASE          0x800U
80 #define REG_CAMERA_FEATURE_LO_BASE          0x880U
81 
82 #define REG_CAMERA_BRIGHTNESS               0x800U
83 #define REG_CAMERA_EXPOSURE                 0x804U
84 #define REG_CAMERA_SHARPNESS                0x808U
85 #define REG_CAMERA_WHITE_BALANCE            0x80CU
86 #define REG_CAMERA_HUE                      0x810U
87 #define REG_CAMERA_SATURATION               0x814U
88 #define REG_CAMERA_GAMMA                    0x818U
89 #define REG_CAMERA_SHUTTER                  0x81CU
90 #define REG_CAMERA_GAIN                     0x820U
91 #define REG_CAMERA_IRIS                     0x824U
92 #define REG_CAMERA_FOCUS                    0x828U
93 #define REG_CAMERA_TEMPERATURE              0x82CU
94 #define REG_CAMERA_TRIGGER_MODE             0x830U
95 #define REG_CAMERA_TRIGGER_DELAY            0x834U
96 #define REG_CAMERA_WHITE_SHADING            0x838U
97 #define REG_CAMERA_FRAME_RATE_FEATURE       0x83CU
98 #define REG_CAMERA_ZOOM                     0x880U
99 #define REG_CAMERA_PAN                      0x884U
100 #define REG_CAMERA_TILT                     0x888U
101 #define REG_CAMERA_OPTICAL_FILTER           0x88CU
102 #define REG_CAMERA_CAPTURE_SIZE             0x8C0U
103 #define REG_CAMERA_CAPTURE_QUALITY          0x8C4U
104 
105 /* Format_7 offsets */
106 
107 #define REG_CAMERA_FORMAT7_MAX_IMAGE_SIZE_INQ            0x000U
108 #define REG_CAMERA_FORMAT7_UNIT_SIZE_INQ                 0x004U
109 #define REG_CAMERA_FORMAT7_IMAGE_POSITION                0x008U
110 #define REG_CAMERA_FORMAT7_IMAGE_SIZE                    0x00CU
111 #define REG_CAMERA_FORMAT7_COLOR_CODING_ID               0x010U
112 #define REG_CAMERA_FORMAT7_COLOR_CODING_INQ              0x014U
113 #define REG_CAMERA_FORMAT7_PIXEL_NUMBER_INQ              0x034U
114 #define REG_CAMERA_FORMAT7_TOTAL_BYTES_HI_INQ            0x038U
115 #define REG_CAMERA_FORMAT7_TOTAL_BYTES_LO_INQ            0x03CU
116 #define REG_CAMERA_FORMAT7_PACKET_PARA_INQ               0x040U
117 #define REG_CAMERA_FORMAT7_BYTE_PER_PACKET               0x044U
118 #define REG_CAMERA_FORMAT7_PACKET_PER_FRAME_INQ          0x048U
119 #define REG_CAMERA_FORMAT7_UNIT_POSITION_INQ             0x04CU
120 #define REG_CAMERA_FORMAT7_FRAME_INTERVAL_INQ            0x050U
121 #define REG_CAMERA_FORMAT7_DATA_DEPTH_INQ                0x054U
122 #define REG_CAMERA_FORMAT7_COLOR_FILTER_ID               0x058U
123 #define REG_CAMERA_FORMAT7_VALUE_SETTING                 0x07CU
124 
125 /* PIO offsets */
126 
127 #define REG_CAMERA_PIO_IN                                0x000U
128 #define REG_CAMERA_PIO_OUT                               0x004U
129 
130 #endif /* __DC1394_OFFSETS_H__ */
131