1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
/* library.h
*
* Copyright (C) 2001,2002 Hubert Figuiere <hfiguiere@teaser.fr>
* Copyright (C) 2000,2001,2002 Scott Fritzinger
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
/*
Kodak DC 240/280/3400/5000 driver.
*/
#ifndef CAMLIBS_KODAK_DC240_LIBRARY_H
#define CAMLIBS_KODAK_DC240_LIBRARY_H
#define DC240_ACTION_PREVIEW (uint8_t)0x93
#define DC240_ACTION_IMAGE (uint8_t)0x9A
#define DC240_ACTION_DELETE (uint8_t)0x9D
#include "gphoto2-endian.h"
const char *dc240_convert_type_to_camera (uint16_t type);
const char *dc240_get_battery_status_str (uint8_t status);
const char *dc240_get_ac_status_str (uint8_t status);
const char *dc240_get_memcard_status_str(uint8_t status);
/* Define the status table for DC240 and DC280. */
typedef struct {
uint8_t cameraType; /* 1 */
uint8_t fwVersInt; /* 2 */
uint8_t fwVersDec; /* 3 */
uint8_t romVers32Int; /* 4 */
uint8_t romVers32Dec; /* 5 */
uint8_t romVers8Int; /* 6 */
uint8_t romVers8Dec; /* 7 */
uint8_t battStatus; /* 8 */
uint8_t acAdapter; /* 9 */
uint8_t strobeStatus; /* 10 */
uint8_t memCardStatus; /* 11 */
uint8_t videoFormat; /* 12 */
uint8_t quickViewMode; /* 13 DC280 */
uint16_t numPict; /* 14-15 BigEndian */
char volumeID[11]; /* 16-26 */
uint8_t powerSave; /* 27 DC280 */
char cameraID[32]; /* 28-59 */
uint16_t remPictLow; /* 60-61 BE */
uint16_t remPictMed; /* 62-63 BE */
uint16_t remPictHigh; /* 64-65 BE */
uint16_t totalPictTaken; /* 66-67 BE */
uint16_t totalStrobeFired; /* 68-69 BE */
uint8_t langType; /* 70 DC280 */
uint8_t beep; /* 71 */
uint8_t fileType; /* 78 */
uint8_t pictSize; /* 79 */
uint8_t imgQuality; /* 80 */
uint8_t ipChainDisable; /* 81 */ /* ????? what does that mean reserved on DC280 */
uint8_t imageIncomplete; /* 82 */
uint8_t timerMode; /* 83 */
uint16_t year; /* 88-89 BE */
uint8_t month; /* 90 */
uint8_t day; /* 91 */
uint8_t hour; /* 92 */
uint8_t minute; /* 93 */
uint8_t second; /* 94 */
uint8_t tenmSec; /* 95 */
uint8_t strobeMode; /* 97 */
uint16_t exposureComp; /* 98-99 BE see note */
uint8_t aeMode; /* 100 */
uint8_t focusMode; /* 101 */
uint8_t afMode; /* 102 */
uint8_t awbMode; /* 103 */
uint32_t zoomMag; /* 104-107 BE see doc */
uint8_t exposureMode; /* 129 */
uint8_t sharpControl; /* 131 */
uint32_t expTime; /* 132-135 BE */
uint16_t fValue; /* 136-137 BE */
uint8_t imageEffect; /* 138 */
uint8_t dateTimeStamp; /* 139 */
char borderFileName [11]; /* 140-151 */
uint8_t exposureLock; /* 152 */
uint8_t isoMode; /* 153 DC280 */
} DC240StatusTable;
int dc240_open (Camera *camera);
int dc240_close (Camera *camera, GPContext *context);
int dc240_set_speed (Camera *camera, int speed);
int dc240_get_status (Camera *camera, DC240StatusTable *table,
GPContext *context);
int dc240_get_directory_list (Camera *camera, CameraList *list, const char *folder,
unsigned char attrib, GPContext *context);
int dc240_file_action (Camera *camera, int action, CameraFile *file,
const char *folder, const char *filename,
GPContext *context);
int dc240_capture (Camera *camera, CameraFilePath *path,
GPContext *context);
int dc240_packet_set_size (Camera *camera, short int size);
#endif /* !defined(CAMLIBS_KODAK_DC240_LIBRARY_H) */
|