Debian Codegraph @

src/sensors/dtp94/dtp94-enum.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2013 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU General Public License Version 2
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #ifndef __DTP94_ENUM_H
23 #define __DTP94_ENUM_H
24
25 #include <glib-object.h>
26
27 G_BEGIN_DECLS
28
29 #define DTP94_VENDOR_ID 0x0765
30 #define DTP94_PRODUCT_ID 0xd094
31
32 /* return values from the commands */
33 #define DTP94_RC_OK 0x00
34 #define DTP94_RC_BAD_COMMAND 0x01
35 #define DTP94_RC_PRM_RANGE 0x02
36 #define DTP94_RC_MEMORY_OVERFLOW 0x04
37 #define DTP94_RC_INVALID_BAUD_RATE 0x05
38 #define DTP94_RC_TIMEOUT 0x07
39 #define DTP94_RC_SYNTAX_ERROR 0x08
40 #define DTP94_RC_NO_DATA_AVAILABLE 0x0b
41 #define DTP94_RC_MISSING_PARAMETER 0x0c
42 #define DTP94_RC_CALIBRATION_DENIED 0x0d
43 #define DTP94_RC_NEEDS_OFFSET_CAL 0x16
44 #define DTP94_RC_NEEDS_RATIO_CAL 0x17
45 #define DTP94_RC_NEEDS_LUMINANCE_CAL 0x18
46 #define DTP94_RC_NEEDS_WHITE_POINT_CAL 0x19
47 #define DTP94_RC_NEEDS_BLACK_POINT_CAL 0x2a
48 #define DTP94_RC_INVALID_READING 0x20
49 #define DTP94_RC_BAD_COMP_TABLE 0x25
50 #define DTP94_RC_TOO_MUCH_LIGHT 0x28
51 #define DTP94_RC_NOT_ENOUGH_LIGHT 0x29
52 #define DTP94_RC_BAD_SERIAL_NUMBER 0x40
53 #define DTP94_RC_NO_MODULATION 0x50
54 #define DTP94_RC_EEPROM_FAILURE 0x70
55 #define DTP94_RC_FLASH_WRITE_FAILURE 0x71
56 #define DTP94_RC_INST_INTERNAL_ERROR 0x7f
57 #define DTP94_RC_UNKNOWN 0xff
58
59 guint8 dtp94_rc_parse (const guint8 *data,
60 gsize length);
61 const gchar *dtp94_rc_to_string (guint8 value);
62
63 G_END_DECLS
64
65 #endif /* __DTP94_ENUM_H */
66