1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- 2 * 3 * Copyright (C) 2013 Richard Hughes <richard@hughsie.com> 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 #if !defined (__DTP94_H_INSIDE__) && !defined (DTP94_COMPILATION) 23 #error "Only <dtp94.h> can be included directly." 24 #endif 25 26 #ifndef __DTP94_ENUM_H 27 #define __DTP94_ENUM_H 28 29 #include <glib-object.h> 30 31 G_BEGIN_DECLS 32 33 #define DTP94_VENDOR_ID 0x0765 34 #define DTP94_PRODUCT_ID 0xd094 35 36 /* return values from the commands */ 37 #define DTP94_RC_OK 0x00 38 #define DTP94_RC_BAD_COMMAND 0x01 39 #define DTP94_RC_PRM_RANGE 0x02 40 #define DTP94_RC_MEMORY_OVERFLOW 0x04 41 #define DTP94_RC_INVALID_BAUD_RATE 0x05 42 #define DTP94_RC_TIMEOUT 0x07 43 #define DTP94_RC_SYNTAX_ERROR 0x08 44 #define DTP94_RC_NO_DATA_AVAILABLE 0x0b 45 #define DTP94_RC_MISSING_PARAMETER 0x0c 46 #define DTP94_RC_CALIBRATION_DENIED 0x0d 47 #define DTP94_RC_NEEDS_OFFSET_CAL 0x16 48 #define DTP94_RC_NEEDS_RATIO_CAL 0x17 49 #define DTP94_RC_NEEDS_LUMINANCE_CAL 0x18 50 #define DTP94_RC_NEEDS_WHITE_POINT_CAL 0x19 51 #define DTP94_RC_NEEDS_BLACK_POINT_CAL 0x2a 52 #define DTP94_RC_INVALID_READING 0x20 53 #define DTP94_RC_BAD_COMP_TABLE 0x25 54 #define DTP94_RC_TOO_MUCH_LIGHT 0x28 55 #define DTP94_RC_NOT_ENOUGH_LIGHT 0x29 56 #define DTP94_RC_BAD_SERIAL_NUMBER 0x40 57 #define DTP94_RC_NO_MODULATION 0x50 58 #define DTP94_RC_EEPROM_FAILURE 0x70 59 #define DTP94_RC_FLASH_WRITE_FAILURE 0x71 60 #define DTP94_RC_INST_INTERNAL_ERROR 0x7f 61 #define DTP94_RC_UNKNOWN 0xff 62 63 guint8 dtp94_rc_parse (const guint8 *data, 64 gsize length); 65 const gchar *dtp94_rc_to_string (guint8 value); 66 67 G_END_DECLS 68 69 #endif /* __DTP94_ENUM_H */ 70 71