2015-07-26 23:05:21 -04:00
|
|
|
/*
|
2024-01-05 12:09:41 -05:00
|
|
|
* Shinko/Sinfonia CHC-S6145 CUPS backend
|
2015-07-26 23:05:21 -04:00
|
|
|
*
|
2024-01-07 21:09:08 -05:00
|
|
|
* (c) 2015-2024 Solomon Peachy <pizza@shaftnet.org>
|
2015-07-26 23:05:21 -04:00
|
|
|
*
|
2015-08-29 14:47:25 -04:00
|
|
|
* Low-level documentation was provided by Sinfonia. Thank you!
|
2015-07-26 23:05:21 -04:00
|
|
|
*
|
|
|
|
* The latest version of this program can be found at:
|
|
|
|
*
|
2024-05-29 20:34:43 -04:00
|
|
|
* https://git.shaftnet.org/gitea/slp/selphy_print.git
|
2015-07-26 23:05:21 -04:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
|
|
* Software Foundation; either version 3 of the License, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2020-01-17 16:50:56 -05:00
|
|
|
* along with this program; if not, see <https://www.gnu.org/licenses/>.
|
2015-07-26 23:05:21 -04:00
|
|
|
*
|
2015-08-29 14:47:25 -04:00
|
|
|
* An additional permission is granted, under the GPLv3 section 7, to combine
|
|
|
|
* and/or redistribute this program with the proprietary libS6145ImageProcess
|
2020-08-01 22:20:42 -04:00
|
|
|
* and S2245IP libraries, providing you have *written permission* from Sinfonia
|
|
|
|
* Technology Co. LTD to use and/or redistribute that library.
|
2015-08-29 14:47:25 -04:00
|
|
|
*
|
2016-01-04 23:03:50 -05:00
|
|
|
* You must still adhere to all other terms of the license to this program
|
2020-08-01 22:20:42 -04:00
|
|
|
* (ie GPLv3) and the license of the libS6145ImageProcess/S2245IP libraries.
|
2017-07-10 20:15:56 -04:00
|
|
|
*
|
2017-11-17 13:34:26 -05:00
|
|
|
* SPDX-License-Identifier: GPL-3.0+ with special exception
|
|
|
|
*
|
2016-01-30 00:01:07 -05:00
|
|
|
*/
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2019-09-28 11:05:42 -04:00
|
|
|
#define BACKEND shinkos6145_backend
|
|
|
|
|
|
|
|
#include "backend_common.h"
|
|
|
|
#include "backend_sinfonia.h"
|
|
|
|
|
2015-07-26 23:05:21 -04:00
|
|
|
#include <time.h>
|
2020-08-01 22:20:42 -04:00
|
|
|
#include <stdbool.h>
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2020-01-26 00:24:33 -05:00
|
|
|
#ifndef WITH_DYNAMIC
|
2016-01-31 18:17:25 -05:00
|
|
|
#warning "No dynamic loading support!"
|
|
|
|
#endif
|
2016-01-14 15:00:18 -05:00
|
|
|
|
2024-08-29 10:37:03 -04:00
|
|
|
#define NATIVE_KA6900
|
|
|
|
|
2016-01-14 15:00:18 -05:00
|
|
|
/* Image processing library function prototypes */
|
2020-08-11 13:18:49 -04:00
|
|
|
typedef void (*dump_announceFN)(FILE *fp);
|
|
|
|
|
2016-01-14 15:00:18 -05:00
|
|
|
typedef int (*ImageProcessingFN)(unsigned char *, unsigned short *, void *);
|
2023-11-01 21:17:43 -04:00
|
|
|
typedef int (*ImageAvrCalcFN)(const unsigned char *, unsigned short, unsigned short, unsigned char *);
|
2016-01-14 15:00:18 -05:00
|
|
|
|
2020-08-01 22:20:42 -04:00
|
|
|
#define LIB6145_NAME "libS6145ImageProcess" DLL_SUFFIX // Official library
|
|
|
|
#define LIB6145_NAME_RE "libS6145ImageReProcess" DLL_SUFFIX // Reimplemented library
|
|
|
|
|
|
|
|
#define S6145_CORRDATA_HEADDOTS_OFFSET 8834
|
|
|
|
#define S6145_CORRDATA_WIDTH_OFFSET 12432
|
|
|
|
#define S6145_CORRDATA_HEIGHT_OFFSET 12434
|
|
|
|
#define S6145_CORRDATA_EXTRA_LEN 4
|
|
|
|
|
2020-08-08 17:01:12 -04:00
|
|
|
#define S2245_CORRDATA_HEADER_MODE_OFFSET (64+7)
|
2020-08-01 22:20:42 -04:00
|
|
|
|
|
|
|
typedef bool (*ip_imageProcFN)(uint16_t *destData, uint8_t *srcInRgb,
|
|
|
|
uint16_t width, uint16_t height, void *srcIpp);
|
|
|
|
typedef bool (*ip_checkIppFN)(uint16_t width, uint16_t height, void *srcIpp);
|
|
|
|
typedef bool (*ip_getMemorySizeFN)(uint32_t *szMemory,
|
|
|
|
uint16_t width, uint16_t height,
|
|
|
|
void *srcIpp);
|
|
|
|
|
|
|
|
#define LIB2245_NAME "libS2245ImageProcess" DLL_SUFFIX // Official library
|
|
|
|
#define LIB2245_NAME_RE "libS2245ImageReProcess" DLL_SUFFIX // Reimplemented library
|
2015-07-26 23:05:21 -04:00
|
|
|
|
|
|
|
enum {
|
|
|
|
S_IDLE = 0,
|
|
|
|
S_PRINTER_READY_CMD,
|
|
|
|
S_PRINTER_SENT_DATA,
|
|
|
|
S_FINISHED,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Structs for printer */
|
|
|
|
struct s6145_print_cmd {
|
2019-05-12 23:41:04 -04:00
|
|
|
struct sinfonia_cmd_hdr hdr;
|
2015-07-26 23:05:21 -04:00
|
|
|
uint8_t id;
|
|
|
|
uint16_t count;
|
|
|
|
uint16_t columns;
|
|
|
|
uint16_t rows;
|
2015-12-17 21:50:47 -05:00
|
|
|
uint8_t media; /* reserved in docs, but brava21 uses this */
|
2015-07-26 23:05:21 -04:00
|
|
|
uint8_t combo_wait;
|
2015-12-17 21:50:47 -05:00
|
|
|
uint8_t reserved[6];
|
|
|
|
uint8_t unk_1; /* Brava 21 sets this to 1 */
|
2015-07-26 23:05:21 -04:00
|
|
|
uint8_t method;
|
2017-07-10 20:15:56 -04:00
|
|
|
uint8_t image_avg;
|
2015-07-26 23:05:21 -04:00
|
|
|
} __attribute__((packed));
|
|
|
|
|
2020-07-28 20:40:43 -04:00
|
|
|
|
|
|
|
struct s6245_errorlog_resp {
|
|
|
|
struct sinfonia_status_hdr hdr;
|
|
|
|
uint16_t error_count; // @10
|
|
|
|
uint8_t reserved_12; // @12
|
|
|
|
uint8_t error_major; // @13
|
|
|
|
uint8_t error_minor; // @14
|
|
|
|
uint8_t reserved_15; // @15
|
|
|
|
uint16_t ribbon_remain; // @16 /* 4x6 */
|
|
|
|
uint8_t reserved_18[2];// @18
|
|
|
|
uint16_t boot_fw_ver; // @20
|
|
|
|
uint16_t main_fw_ver; // @22
|
|
|
|
uint16_t dsp_fw_ver; // @24
|
|
|
|
uint16_t tables_ver; // @26
|
|
|
|
uint32_t print_counter; // @28
|
|
|
|
uint8_t unkb[42]; // @32
|
|
|
|
|
|
|
|
/* on 6245 series, these additional fields:
|
|
|
|
uint8_t ribbon_takeup_diameter;
|
|
|
|
uint8_t ribbon_supply_diameter;
|
|
|
|
uint8_t time_sec;
|
|
|
|
uint8_t time_min;
|
|
|
|
uint8_t time_hour;
|
|
|
|
uint8_t time_day;
|
|
|
|
uint8_t time_month;
|
|
|
|
uint8_t time_year;
|
|
|
|
uint8_t printer_thermistor;
|
|
|
|
uint8_t head_thermistor;
|
|
|
|
uint8_t printer_humidity;
|
|
|
|
uint8_t status;
|
|
|
|
uint16_t image_cols;
|
|
|
|
uint16_t image_rows;
|
|
|
|
*/
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
STATIC_ASSERT(sizeof(struct s6245_errorlog_resp) == 74);
|
|
|
|
|
2019-09-21 23:03:05 -04:00
|
|
|
static const struct sinfonia_param s6145_params[] =
|
|
|
|
{
|
|
|
|
{ PARAM_OC_PRINT, "Overcoat Mode" },
|
|
|
|
{ PARAM_PAPER_PRESV, "Paper Preserve Mode" },
|
|
|
|
{ PARAM_DRIVER_MODE, "Driver Mode/Wizard" },
|
|
|
|
{ PARAM_PAPER_MODE, "Paper Load Mode" },
|
|
|
|
{ PARAM_SLEEP_TIME, "Sleep Time" },
|
|
|
|
{ PARAM_REGION_CODE, "Region Code" },
|
|
|
|
};
|
|
|
|
#define s6145_params_num (sizeof(s6145_params) / sizeof(struct sinfonia_param))
|
|
|
|
|
2020-07-28 20:40:43 -04:00
|
|
|
static const struct sinfonia_param s2245_params[] =
|
|
|
|
{
|
|
|
|
{ PARAM_DRIVER_MODE, "Driver Mode/Wizard" },
|
|
|
|
{ PARAM_PAPER_MODE, "Paper Load Mode" },
|
|
|
|
};
|
|
|
|
#define s2245_params_num (sizeof(s2245_params) / sizeof(struct sinfonia_param))
|
2016-01-03 21:57:39 -05:00
|
|
|
|
2024-08-21 16:51:29 -04:00
|
|
|
static const struct sinfonia_param ek6900_params[] =
|
|
|
|
{
|
|
|
|
{ PARAM_DRIVER_MODE, "Driver Mode/Wizard" },
|
|
|
|
{ PARAM_PAPER_MODE, "Paper Load Mode" },
|
|
|
|
};
|
|
|
|
#define ek6900_params_num (sizeof(ek6900_params) / sizeof(struct sinfonia_param))
|
|
|
|
|
2020-08-08 17:01:12 -04:00
|
|
|
// CHC-S6145
|
2015-11-17 21:47:11 -05:00
|
|
|
#define PARAM_OC_PRINT_OFF 0x00000001
|
|
|
|
#define PARAM_OC_PRINT_GLOSS 0x00000002
|
|
|
|
#define PARAM_OC_PRINT_MATTE 0x00000003
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2020-08-08 17:01:12 -04:00
|
|
|
// CHC-S6145-5A
|
|
|
|
#define PARAM_PRINTM_OC_OFF 0x00000001
|
|
|
|
#define PARAM_PRINTM_OC_GLOSS 0x00000002
|
|
|
|
#define PARAM_PRINTM_OC_MATTE 0x00000012
|
|
|
|
#define PARAM_PRINTM_STD 0x00000000
|
|
|
|
#define PARAM_PRINTM_FINE 0x00000004
|
|
|
|
#define PARAM_PRINTM_FAST 0x00000008
|
|
|
|
|
2021-05-15 12:38:37 -04:00
|
|
|
// S6145
|
2015-07-26 23:05:21 -04:00
|
|
|
#define PARAM_PAPER_PRESV_OFF 0x00000000
|
|
|
|
#define PARAM_PAPER_PRESV_ON 0x00000001
|
|
|
|
|
2020-07-28 20:40:43 -04:00
|
|
|
static const char *s6145_error_codes(uint8_t major, uint8_t minor)
|
2015-07-26 23:05:21 -04:00
|
|
|
{
|
|
|
|
switch(major) {
|
|
|
|
case 0x01: /* "Controller Error" */
|
|
|
|
switch(minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Controller: EEPROM Write Timeout";
|
|
|
|
case 0x0A:
|
|
|
|
return "Controller: Invalid Print Parameter Table";
|
|
|
|
case 0x0C:
|
|
|
|
return "Controller: Print Parameter Table Mismatch";
|
|
|
|
case 0x0F:
|
|
|
|
return "Controller: Main FW Checksum";
|
|
|
|
case 0x10:
|
|
|
|
return "Controller: Flash Write Failed";
|
|
|
|
case 0x13:
|
|
|
|
return "Controller: Print Parameter Table Checksum";
|
|
|
|
case 0x14:
|
|
|
|
return "Controller: Print Parameter Table Write Failed";
|
|
|
|
case 0x15:
|
|
|
|
return "Controller: User Tone Curve Write Failed";
|
|
|
|
case 0x16:
|
|
|
|
return "Controller: MSP Communication";
|
|
|
|
case 0x17:
|
|
|
|
return "Controller: THV Autotuning";
|
|
|
|
case 0x18:
|
|
|
|
return "Controller: THV Value Out of Range";
|
|
|
|
case 0x19:
|
|
|
|
return "Controller: Thermal Head";
|
|
|
|
case 0x1A:
|
|
|
|
return "Controller: Wake from Power Save Failed";
|
|
|
|
default:
|
|
|
|
return "Controller: Unknown";
|
|
|
|
}
|
|
|
|
case 0x02: /* "Mechanical Error" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Mechanical: Pinch Head Home";
|
|
|
|
case 0x02:
|
|
|
|
return "Mechanical: Pinch Head (position 1)";
|
|
|
|
case 0x03:
|
|
|
|
return "Mechanical: Pinch Head (position 2)";
|
|
|
|
case 0x04:
|
|
|
|
return "Mechanical: Pinch Head (position 3)";
|
|
|
|
case 0x0B:
|
|
|
|
return "Mechanical: Cutter (Right)";
|
|
|
|
case 0x0C:
|
|
|
|
return "Mechanical: Cutter (Left)";
|
|
|
|
default:
|
|
|
|
return "Mechanical: Unknown";
|
|
|
|
}
|
|
|
|
case 0x03: /* "Sensor Error" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Sensor: Head Up";
|
|
|
|
case 0x02:
|
|
|
|
return "Sensor: Head Down";
|
|
|
|
case 0x0B:
|
|
|
|
return "Sensor: Cutter Left";
|
|
|
|
case 0x0C:
|
|
|
|
return "Sensor: Cutter Right";
|
|
|
|
case 0x0D:
|
|
|
|
return "Sensor: Cutter Left+Right";
|
|
|
|
case 0x15:
|
|
|
|
return "Sensor: Head Up Unstable";
|
|
|
|
case 0x16:
|
|
|
|
return "Sensor: Head Down Unstable";
|
|
|
|
case 0x17:
|
|
|
|
return "Sensor: Cutter Left Unstable";
|
|
|
|
case 0x18:
|
|
|
|
return "Sensor: Cutter Right Unstable";
|
|
|
|
case 0x19:
|
|
|
|
return "Sensor: Cover Open Unstable";
|
|
|
|
case 0x1E:
|
|
|
|
return "Sensor: Ribbon Mark (Cyan)";
|
|
|
|
case 0x1F:
|
|
|
|
return "Sensor: Ribbon Mark (OC)";
|
|
|
|
default:
|
|
|
|
return "Sensor: Unknown";
|
|
|
|
}
|
|
|
|
case 0x04: /* "Temperature Sensor Error" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Temp Sensor: Thermal Head Low";
|
|
|
|
case 0x02:
|
|
|
|
return "Temp Sensor: Thermal Head High";
|
|
|
|
case 0x05:
|
|
|
|
return "Temp Sensor: Environment Low";
|
|
|
|
case 0x06:
|
|
|
|
return "Temp Sensor: Environment High";
|
|
|
|
case 0x07:
|
|
|
|
return "Temp Sensor: Preheat";
|
|
|
|
case 0x08:
|
|
|
|
return "Temp Sensor: Thermal Protect";
|
|
|
|
default:
|
|
|
|
return "Temp Sensor: Unknown";
|
|
|
|
}
|
|
|
|
case 0x5: /* "Paper Jam" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Paper Jam: Loading Paper Top On";
|
|
|
|
case 0x02:
|
|
|
|
return "Paper Jam: Loading Print Position On";
|
|
|
|
case 0x03:
|
|
|
|
return "Paper Jam: Loading Print Position Off";
|
|
|
|
case 0x04:
|
|
|
|
return "Paper Jam: Loading Paper Top Off";
|
|
|
|
case 0x05:
|
|
|
|
return "Paper Jam: Loading Cut Print Position Off";
|
|
|
|
case 0x0C:
|
|
|
|
return "Paper Jam: Initializing Print Position Off";
|
|
|
|
case 0x0D:
|
|
|
|
return "Paper Jam: Initializing Print Position On";
|
|
|
|
case 0x15:
|
|
|
|
return "Paper Jam: Printing Print Position Off";
|
|
|
|
case 0x16:
|
|
|
|
return "Paper Jam: Printing Paper Top On";
|
|
|
|
case 0x17:
|
|
|
|
return "Paper Jam: Printing Paper Top Off";
|
|
|
|
case 0x1F:
|
|
|
|
return "Paper Jam: Precut Print Position Off";
|
|
|
|
case 0x20:
|
|
|
|
return "Paper Jam: Precut Print Position On";
|
2017-07-10 20:15:56 -04:00
|
|
|
|
2015-07-26 23:05:21 -04:00
|
|
|
case 0x29:
|
|
|
|
return "Paper Jam: Printing Paper Top On";
|
|
|
|
case 0x2A:
|
|
|
|
return "Paper Jam: Printing Pre-Yellow Print Position Off";
|
|
|
|
case 0x2B:
|
|
|
|
return "Paper Jam: Printing Yellow Print Position Off";
|
|
|
|
case 0x2C:
|
|
|
|
return "Paper Jam: Printing Yellow Print Position On";
|
|
|
|
case 0x2D:
|
|
|
|
return "Paper Jam: Printing Pre-Magenta Print Position Off";
|
|
|
|
case 0x2E:
|
|
|
|
return "Paper Jam: Printing Magenta Print Position On";
|
|
|
|
case 0x2F:
|
|
|
|
return "Paper Jam: Printing Magenta Print Position Off";
|
|
|
|
case 0x30:
|
|
|
|
return "Paper Jam: Printing Pre-Cyan Print Position Off";
|
|
|
|
case 0x31:
|
|
|
|
return "Paper Jam: Printing Cyan Print Position On";
|
|
|
|
case 0x32:
|
|
|
|
return "Paper Jam: Printing Cyan Print Position Off";
|
|
|
|
case 0x33:
|
|
|
|
return "Paper Jam: Printing Pre-OC Print Position Off";
|
|
|
|
case 0x34:
|
|
|
|
return "Paper Jam: Printing OC Print Position On";
|
|
|
|
case 0x35:
|
|
|
|
return "Paper Jam: Printing OC Print Position Off";
|
|
|
|
case 0x36:
|
|
|
|
return "Paper Jam: Cut Print Position Off";
|
|
|
|
case 0x37:
|
|
|
|
return "Paper Jam: Home Position Off";
|
|
|
|
case 0x38:
|
|
|
|
return "Paper Jam: Paper Top Off";
|
|
|
|
case 0x39:
|
|
|
|
return "Paper Jam: Print Position On";
|
|
|
|
|
|
|
|
case 0x51:
|
|
|
|
return "Paper Jam: Paper Empty On, Top On, Position On";
|
|
|
|
case 0x52:
|
|
|
|
return "Paper Jam: Paper Empty On, Top On, Position Off";
|
|
|
|
case 0x54:
|
2015-11-17 19:28:09 -05:00
|
|
|
return "Paper Jam: Paper Empty On, Top Off, Position Off";
|
2015-07-26 23:05:21 -04:00
|
|
|
case 0x60:
|
|
|
|
return "Paper Jam: Cutter Right";
|
|
|
|
case 0x61:
|
|
|
|
return "Paper Jam: Cutter Left";
|
|
|
|
|
|
|
|
default:
|
|
|
|
return "Paper Jam: Unknown";
|
|
|
|
}
|
|
|
|
case 0x06: /* User Error */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Drawer Unit Open";
|
|
|
|
case 0x02:
|
|
|
|
return "Incorrect Ribbon";
|
|
|
|
case 0x04:
|
|
|
|
return "Ribbon Empty";
|
|
|
|
case 0x08:
|
|
|
|
return "No Paper";
|
|
|
|
case 0x0C:
|
|
|
|
return "Paper End";
|
|
|
|
default:
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-28 20:40:43 -04:00
|
|
|
static const char *s2245_error_codes(uint8_t major, uint8_t minor)
|
|
|
|
{
|
|
|
|
switch(major) {
|
|
|
|
case 0x01: /* "Controller Error" */
|
|
|
|
switch(minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Controller: EEPROM Write Timeout";
|
|
|
|
case 0x0A:
|
|
|
|
return "Controller: Invalid Print Parameter Table";
|
|
|
|
case 0x0C:
|
|
|
|
return "Controller: Print Parameter Table Mismatch";
|
|
|
|
case 0x0F:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Controller: Main FW Data Error";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x10:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Controller: Main FW Write Failed";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x13:
|
|
|
|
return "Controller: Print Parameter Table Checksum";
|
|
|
|
case 0x14:
|
|
|
|
return "Controller: Print Parameter Table Write Failed";
|
|
|
|
case 0x15:
|
|
|
|
return "Controller: User Tone Curve Write Failed";
|
|
|
|
case 0x16:
|
|
|
|
return "Controller: MSP Communication";
|
|
|
|
case 0x19:
|
|
|
|
return "Controller: Thermal Head";
|
|
|
|
default:
|
|
|
|
return "Controller: Unknown";
|
|
|
|
}
|
|
|
|
case 0x02: /* "Mechanical Error" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Mechanical: Pinch Head Home";
|
|
|
|
case 0x02:
|
|
|
|
return "Mechanical: Pinch Head (position 1)";
|
|
|
|
case 0x03:
|
|
|
|
return "Mechanical: Pinch Head (position 2)";
|
|
|
|
case 0x04:
|
|
|
|
return "Mechanical: Pinch Head (position 3)";
|
2020-07-29 19:36:10 -04:00
|
|
|
case 0x05:
|
|
|
|
return "Mechanical: Pinch Head (position 4)";
|
|
|
|
case 0x14:
|
|
|
|
return "Mechanical: Cutter (Left-Right)";
|
|
|
|
case 0x15:
|
|
|
|
return "Mechanical: Cutter (Right-Left)";
|
2020-07-28 20:40:43 -04:00
|
|
|
default:
|
|
|
|
return "Mechanical: Unknown";
|
|
|
|
}
|
|
|
|
case 0x03: /* "Sensor Error" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Sensor: Cutter Left+Right";
|
2020-07-29 19:36:10 -04:00
|
|
|
case 0x02:
|
|
|
|
return "Sensor: Cutter Left drove";
|
|
|
|
case 0x03:
|
|
|
|
return "Sensor: Cutter Right drove";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x1E:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Sensor: Left Front Lock";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x1F:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Sensor: Right Front Lock";
|
|
|
|
case 0x20:
|
|
|
|
return "Sensor: Cutter Left";
|
|
|
|
case 0x21:
|
|
|
|
return "Sensor: Cutter Right";
|
|
|
|
case 0x22:
|
|
|
|
return "Sensor: Left Head/Pinch";
|
|
|
|
case 0x23:
|
|
|
|
return "Sensor: Right Head/Pinch";
|
|
|
|
case 0x24:
|
|
|
|
return "Sensor: Head/Pinch Encoder";
|
|
|
|
case 0x25:
|
|
|
|
return "Sensor: Supply Ribbon Encoder";
|
2020-07-28 20:40:43 -04:00
|
|
|
default:
|
|
|
|
return "Sensor: Unknown";
|
|
|
|
}
|
|
|
|
case 0x04: /* "Temperature Sensor Error" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
|
|
|
return "Temp Sensor: Thermal Head Low";
|
|
|
|
case 0x02:
|
|
|
|
return "Temp Sensor: Thermal Head High";
|
|
|
|
case 0x05:
|
|
|
|
return "Temp Sensor: Environment Low";
|
|
|
|
case 0x06:
|
|
|
|
return "Temp Sensor: Environment High";
|
|
|
|
case 0x07:
|
|
|
|
return "Temp Sensor: Preheat";
|
|
|
|
case 0x08:
|
|
|
|
return "Temp Sensor: Thermal Protect";
|
|
|
|
default:
|
|
|
|
return "Temp Sensor: Unknown";
|
|
|
|
}
|
|
|
|
case 0x5: /* "Paper Jam" */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Paper Jam: Paper Not Detected";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x02:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Paper Jam: Pinch Roller Fail";
|
|
|
|
case 0x10:
|
|
|
|
return "Paper Jam: Print Position Sensor on";
|
|
|
|
case 0x11:
|
|
|
|
return "Paper Jam: Print Position Sensor off";
|
|
|
|
case 0x12:
|
|
|
|
return "Paper Jam: Paper End Sensor on";
|
|
|
|
case 0x13:
|
|
|
|
return "Paper Jam: Paper Cut";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x30:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Paper Jam: Print Position Sensor early";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x31:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Paper Jam: Print Position Sensor on";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x32:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Paper Jam: Print Position Sensor off";
|
|
|
|
case 0x40:
|
|
|
|
return "Paper Jam: Cutter Left-Right";
|
|
|
|
case 0x41:
|
|
|
|
return "Paper Jam: Cutter Right-Left";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x51:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Paper Jam: Paper End On, Position Off";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x52:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Paper Jam: Paper End Off, Position On";
|
|
|
|
case 0x53:
|
|
|
|
return "Paper Jam: Paper End On, Position On";
|
2020-07-28 20:40:43 -04:00
|
|
|
default:
|
|
|
|
return "Paper Jam: Unknown";
|
|
|
|
}
|
|
|
|
case 0x06: /* User Error */
|
|
|
|
switch (minor) {
|
|
|
|
case 0x01:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Cover Open";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x02:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Cover Not Closed";
|
|
|
|
case 0x03:
|
2020-07-28 20:40:43 -04:00
|
|
|
return "Incorrect Ribbon";
|
|
|
|
case 0x04:
|
2020-07-29 19:36:10 -04:00
|
|
|
return "Ribbon End";
|
2020-07-28 20:40:43 -04:00
|
|
|
case 0x07:
|
|
|
|
return "No Paper";
|
2020-07-29 19:36:10 -04:00
|
|
|
case 0x08:
|
2020-07-28 20:40:43 -04:00
|
|
|
return "Paper End";
|
2020-07-29 19:36:10 -04:00
|
|
|
case 0x0D:
|
|
|
|
return "No Ribbon";
|
|
|
|
case 0x0E:
|
|
|
|
return "Ribbon Rewind Failure";
|
|
|
|
case 0x0F:
|
|
|
|
return "Ribbon Sense Failure";
|
|
|
|
case 0x20:
|
|
|
|
return "THV Tuning";
|
|
|
|
case 0x21:
|
|
|
|
return "THV Not Tuned";
|
2020-07-28 20:40:43 -04:00
|
|
|
default:
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
}
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2015-08-16 18:23:43 -04:00
|
|
|
#define RIBBON_NONE 0x00
|
|
|
|
#define RIBBON_4x6 0x01
|
|
|
|
#define RIBBON_3_5x5 0x02
|
|
|
|
#define RIBBON_5x7 0x03
|
|
|
|
#define RIBBON_6x8 0x04
|
|
|
|
#define RIBBON_6x9 0x05
|
|
|
|
|
2020-08-08 16:36:23 -04:00
|
|
|
#define RIBBON_89x60mm 0x01
|
|
|
|
|
|
|
|
static int ribbon_sizes (uint8_t v, uint8_t is_card, uint8_t is_2245) {
|
|
|
|
if (is_card) {
|
|
|
|
return 450;
|
|
|
|
}
|
|
|
|
|
2016-08-19 17:40:12 -04:00
|
|
|
switch (v) {
|
|
|
|
case RIBBON_4x6:
|
2020-08-08 16:36:23 -04:00
|
|
|
if (is_2245)
|
|
|
|
return 900;
|
|
|
|
else
|
|
|
|
return 300;
|
2016-08-19 17:40:12 -04:00
|
|
|
case RIBBON_3_5x5:
|
|
|
|
return 340;
|
|
|
|
case RIBBON_5x7:
|
|
|
|
return 170;
|
|
|
|
case RIBBON_6x8:
|
2020-08-08 16:36:23 -04:00
|
|
|
if (is_2245)
|
|
|
|
return 450;
|
|
|
|
else
|
|
|
|
return 150;
|
2016-08-19 17:40:12 -04:00
|
|
|
case RIBBON_6x9:
|
|
|
|
return 130; // XXX guessed
|
|
|
|
default:
|
2020-08-08 16:36:23 -04:00
|
|
|
if (is_2245)
|
|
|
|
return 450;
|
|
|
|
else
|
|
|
|
return 300;
|
2016-08-19 17:40:12 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-08 16:36:23 -04:00
|
|
|
static const char *print_ribbons (uint8_t v, uint8_t is_card) {
|
|
|
|
if (is_card) {
|
|
|
|
if (v == RIBBON_89x60mm)
|
|
|
|
return "89x60mm";
|
|
|
|
else if (v == RIBBON_NONE)
|
|
|
|
return "None";
|
|
|
|
else
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
|
2015-08-16 18:23:43 -04:00
|
|
|
switch (v) {
|
|
|
|
case RIBBON_NONE:
|
|
|
|
return "None";
|
|
|
|
case RIBBON_4x6:
|
|
|
|
return "4x6";
|
|
|
|
case RIBBON_3_5x5:
|
|
|
|
return "3.5x5";
|
|
|
|
case RIBBON_5x7:
|
|
|
|
return "5x7";
|
|
|
|
case RIBBON_6x8:
|
|
|
|
return "6x8";
|
|
|
|
case RIBBON_6x9:
|
|
|
|
return "6x9";
|
|
|
|
default:
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-26 23:05:21 -04:00
|
|
|
struct s6145_imagecorr_resp {
|
2019-05-12 23:41:04 -04:00
|
|
|
struct sinfonia_status_hdr hdr;
|
2015-07-26 23:05:21 -04:00
|
|
|
uint16_t total_size;
|
2015-07-27 21:22:25 -04:00
|
|
|
} __attribute__((packed));
|
|
|
|
|
2020-07-28 20:40:43 -04:00
|
|
|
struct s2245_imagecorr_req {
|
|
|
|
struct sinfonia_cmd_hdr hdr;
|
|
|
|
uint8_t options;
|
|
|
|
uint8_t flags;
|
2024-08-27 13:23:19 -04:00
|
|
|
uint16_t rows; // EK6900 only, otherwise 0
|
|
|
|
uint8_t unk[4]; // EK6900 has 01 00 38 00, otherwise 00 00 00 00
|
2024-08-25 16:17:44 -04:00
|
|
|
uint8_t null[4];
|
2020-07-28 20:40:43 -04:00
|
|
|
} __attribute__((packed));
|
|
|
|
|
2020-07-29 19:36:10 -04:00
|
|
|
#define S2245_IMAGECORR_FLAG_CONTOUR_ENH 0x01
|
2024-08-27 13:23:19 -04:00
|
|
|
#define EK6900_IMAGECORR_FLAG_UNKNOWN 0x02
|
2020-07-29 19:36:10 -04:00
|
|
|
|
2020-07-28 20:40:43 -04:00
|
|
|
struct s2245_imagecorr_resp {
|
|
|
|
struct sinfonia_status_hdr hdr;
|
|
|
|
uint32_t total_size;
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
2015-07-27 21:22:25 -04:00
|
|
|
struct s6145_imagecorr_data {
|
2015-07-26 23:05:21 -04:00
|
|
|
uint8_t remain_pkt;
|
2024-08-25 16:17:44 -04:00
|
|
|
uint8_t return_size; /* 0x10 (6145, 2245), 0xc0 (6900) */
|
|
|
|
uint8_t data[256];
|
2015-07-26 23:05:21 -04:00
|
|
|
} __attribute__((packed));
|
|
|
|
|
2018-04-27 15:40:09 -04:00
|
|
|
/* Private data structure */
|
|
|
|
struct shinkos6145_ctx {
|
2019-05-24 23:49:51 -04:00
|
|
|
struct sinfonia_usbdev dev;
|
2018-04-27 15:40:09 -04:00
|
|
|
|
|
|
|
uint8_t jobid;
|
|
|
|
|
2020-01-30 22:08:55 -05:00
|
|
|
uint8_t image_avg[3]; /* YMC */
|
2018-04-27 15:40:09 -04:00
|
|
|
|
2019-12-13 19:54:50 -05:00
|
|
|
char serial[32];
|
|
|
|
char fwver[32];
|
|
|
|
|
2020-08-08 16:36:23 -04:00
|
|
|
int is_card; /* card printer model */
|
2021-06-24 21:40:07 -04:00
|
|
|
int is_2245; /* 2245 or its variants */
|
2020-08-08 16:36:23 -04:00
|
|
|
|
2018-04-27 15:40:09 -04:00
|
|
|
struct marker marker;
|
|
|
|
|
2019-09-08 21:33:30 -04:00
|
|
|
struct sinfonia_6x45_mediainfo_resp media;
|
2018-04-27 15:40:09 -04:00
|
|
|
|
|
|
|
uint8_t *eeprom;
|
|
|
|
size_t eepromlen;
|
|
|
|
|
|
|
|
void *dl_handle;
|
2020-08-01 22:20:42 -04:00
|
|
|
|
2020-08-11 13:18:49 -04:00
|
|
|
dump_announceFN DumpAnnounce;
|
2018-04-27 15:40:09 -04:00
|
|
|
ImageProcessingFN ImageProcessing;
|
|
|
|
ImageAvrCalcFN ImageAvrCalc;
|
|
|
|
|
2020-08-01 22:20:42 -04:00
|
|
|
ip_imageProcFN ip_imageProc;
|
|
|
|
ip_checkIppFN ip_checkIpp;
|
|
|
|
ip_getMemorySizeFN ip_getMemorySize;
|
|
|
|
|
|
|
|
void *corrdata; /* Correction table */
|
2020-01-26 00:30:06 -05:00
|
|
|
uint16_t corrdatalen;
|
2018-04-27 15:40:09 -04:00
|
|
|
};
|
|
|
|
|
2020-07-29 19:36:10 -04:00
|
|
|
static const char *s2245_drivermodes(uint8_t val);
|
|
|
|
static int shinkos2245_get_imagecorr(struct shinkos6145_ctx *ctx, uint8_t options);
|
2024-08-29 10:37:03 -04:00
|
|
|
#ifdef NATIVE_KA6900
|
2024-08-25 16:17:44 -04:00
|
|
|
static int kodak6900_get_imagecorr(struct shinkos6145_ctx *ctx, uint8_t options, uint16_t rows);
|
2024-08-29 10:37:03 -04:00
|
|
|
#endif
|
2018-04-27 15:40:09 -04:00
|
|
|
static int shinkos6145_get_imagecorr(struct shinkos6145_ctx *ctx);
|
|
|
|
static int shinkos6145_get_eeprom(struct shinkos6145_ctx *ctx);
|
2015-07-26 23:05:21 -04:00
|
|
|
|
|
|
|
static int get_status(struct shinkos6145_ctx *ctx)
|
|
|
|
{
|
2019-05-12 23:41:04 -04:00
|
|
|
struct sinfonia_cmd_hdr cmd;
|
2020-07-28 20:40:43 -04:00
|
|
|
struct sinfonia_status_resp resp;
|
2019-05-13 10:41:28 -04:00
|
|
|
struct sinfonia_getextcounter_resp resp2;
|
2015-07-26 23:05:21 -04:00
|
|
|
int ret, num = 0;
|
2015-11-17 19:28:09 -05:00
|
|
|
uint32_t val;
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2019-05-13 10:41:28 -04:00
|
|
|
cmd.cmd = cpu_to_le16(SINFONIA_CMD_GETSTATUS);
|
2015-07-26 23:05:21 -04:00
|
|
|
cmd.len = cpu_to_le16(0);
|
|
|
|
|
2019-05-24 23:49:51 -04:00
|
|
|
if ((ret = sinfonia_docmd(&ctx->dev,
|
|
|
|
(uint8_t*)&cmd, sizeof(cmd),
|
|
|
|
(uint8_t*)&resp, sizeof(resp), &num)) < 0) {
|
2015-07-26 23:05:21 -04:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-05-13 10:41:28 -04:00
|
|
|
INFO("Printer Status: 0x%02x (%s)\n", resp.hdr.status,
|
|
|
|
sinfonia_status_str(resp.hdr.status));
|
|
|
|
if (resp.hdr.status == ERROR_PRINTER) {
|
|
|
|
if(resp.hdr.error == ERROR_NONE)
|
|
|
|
resp.hdr.error = resp.hdr.status;
|
2015-07-26 23:05:21 -04:00
|
|
|
INFO(" Error 0x%02x (%s) 0x%02x/0x%02x (%s)\n",
|
2019-05-13 10:41:28 -04:00
|
|
|
resp.hdr.error,
|
|
|
|
sinfonia_error_str(resp.hdr.error),
|
|
|
|
resp.hdr.printer_major,
|
2020-07-28 20:40:43 -04:00
|
|
|
resp.hdr.printer_minor, ctx->dev.error_codes(resp.hdr.printer_major, resp.hdr.printer_minor));
|
2015-07-26 23:05:21 -04:00
|
|
|
}
|
2020-07-28 20:40:43 -04:00
|
|
|
if (le16_to_cpu(resp.hdr.payload_len) != (sizeof(struct sinfonia_status_resp) - sizeof(struct sinfonia_status_hdr)))
|
2015-08-16 18:23:43 -04:00
|
|
|
return -1;
|
2015-07-26 23:05:21 -04:00
|
|
|
|
|
|
|
INFO(" Print Counts:\n");
|
2019-05-13 10:41:28 -04:00
|
|
|
INFO("\tSince Paper Changed:\t%08u\n", le32_to_cpu(resp.count_paper));
|
|
|
|
INFO("\tLifetime:\t\t%08u\n", le32_to_cpu(resp.count_lifetime));
|
|
|
|
INFO("\tMaintenance:\t\t%08u\n", le32_to_cpu(resp.count_maint));
|
|
|
|
INFO("\tPrint Head:\t\t%08u\n", le32_to_cpu(resp.count_head));
|
|
|
|
INFO(" Cutter Actuations:\t%08u\n", le32_to_cpu(resp.count_cutter));
|
|
|
|
INFO(" Ribbon Remaining:\t%08u\n", le32_to_cpu(resp.count_ribbon_left));
|
2015-07-26 23:05:21 -04:00
|
|
|
INFO("Bank 1: 0x%02x (%s) Job %03u @ %03u/%03u (%03u remaining)\n",
|
2019-05-13 10:41:28 -04:00
|
|
|
resp.bank1_status, sinfonia_bank_statuses(resp.bank1_status),
|
|
|
|
resp.bank1_printid,
|
|
|
|
le16_to_cpu(resp.bank1_finished),
|
|
|
|
le16_to_cpu(resp.bank1_specified),
|
|
|
|
le16_to_cpu(resp.bank1_remaining));
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2016-08-21 10:23:00 -04:00
|
|
|
INFO("Bank 2: 0x%02x (%s) Job %03u @ %03u/%03u (%03u remaining)\n",
|
2019-05-13 10:41:28 -04:00
|
|
|
resp.bank2_status, sinfonia_bank_statuses(resp.bank1_status),
|
|
|
|
resp.bank2_printid,
|
|
|
|
le16_to_cpu(resp.bank2_finished),
|
|
|
|
le16_to_cpu(resp.bank2_specified),
|
|
|
|
le16_to_cpu(resp.bank2_remaining));
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2019-05-13 10:41:28 -04:00
|
|
|
INFO("Tonecurve Status: 0x%02x (%s)\n", resp.tonecurve_status, sinfonia_tonecurve_statuses(resp.tonecurve_status));
|
2015-07-26 23:05:21 -04:00
|
|
|
|
|
|
|
/* Query Extended counters */
|
2019-05-13 10:41:28 -04:00
|
|
|
cmd.cmd = cpu_to_le16(SINFONIA_CMD_EXTCOUNTER);
|
2015-07-26 23:05:21 -04:00
|
|
|
cmd.len = cpu_to_le16(0);
|
|
|
|
|
2019-05-24 23:49:51 -04:00
|
|
|
if ((ret = sinfonia_docmd(&ctx->dev,
|
|
|
|
(uint8_t*)&cmd, sizeof(cmd),
|
|
|
|
(uint8_t*)&resp2, sizeof(resp2),
|
2019-09-21 23:03:05 -04:00
|
|
|
&num))) {
|
2015-07-26 23:05:21 -04:00
|
|
|
return ret;
|
|
|
|
}
|
2019-05-13 10:41:28 -04:00
|
|
|
if (le16_to_cpu(resp2.hdr.payload_len) != (sizeof(struct sinfonia_getextcounter_resp) - sizeof(struct sinfonia_status_hdr)))
|
2015-08-16 18:23:43 -04:00
|
|
|
return -1;
|
2015-07-26 23:05:21 -04:00
|
|
|
|
2019-05-13 10:41:28 -04:00
|
|
|
INFO("Lifetime Distance: %08u inches\n", le32_to_cpu(resp2.lifetime_distance));
|
|
|
|
INFO("Maintenance Distance: %08u inches\n", le32_to_cpu(resp2.maint_distance));
|
|
|
|
INFO("Head Distance: %08u inches\n", le32_to_cpu(resp2.head_distance));
|
2017-07-10 20:15:56 -04:00
|
|
|
|
2015-11-17 19:28:09 -05:00
|
|
|
/* Query various params */
|
2020-08-11 20:27:26 -04:00
|
|
|
if (ctx->dev.conn->type == P_SHINKO_S6145D) {
|
2019-05-24 23:49:51 -04:00
|
|
|
if ((ret = sinfonia_getparam(&ctx->dev, PARAM_REGION_CODE, &val))) {
|
2016-01-17 17:08:05 -05:00
|
|
|
ERROR("Failed to execute command\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
INFO("Region Code: %#x\n", val);
|
|
|
|
|
|
|
|
}
|
2021-06-24 21:40:07 -04:00
|
|
|
if (!ctx->is_2245) {
|
2020-07-28 20:40:43 -04:00
|
|
|
if ((ret = sinfonia_getparam(&ctx->dev, PARAM_PAPER_PRESV, &val))) {
|
|
|
|
ERROR("Failed to execute command\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
INFO("Paper Preserve mode: %s\n", (val ? "On" : "Off"));
|
2015-11-17 19:28:09 -05:00
|
|
|
}
|
2019-05-24 23:49:51 -04:00
|
|
|
if ((ret = sinfonia_getparam(&ctx->dev, PARAM_DRIVER_MODE, &val))) {
|
2015-11-17 19:28:09 -05:00
|
|
|
ERROR("Failed to execute command\n");
|
|
|
|
return ret;
|
|
|
|
}
|
2021-06-24 21:40:07 -04:00
|
|
|
if (ctx->is_2245) {
|
2020-07-29 19:36:10 -04:00
|
|
|
INFO("Driver mode: %s\n", s2245_drivermodes(val));
|
|
|
|
} else {
|
|
|
|
INFO("Driver mode: %s\n", (val ? "On" : "Off"));
|
|
|
|
}
|
2015-11-17 19:28:09 -05:00
|
|
|
|
2019-05-24 23:49:51 -04:00
|
|
|
if ((ret = sinfonia_getparam(&ctx->dev, PARAM_PAPER_MODE, &val))) {
|
2015-11-17 19:28:09 -05:00
|
|
|
ERROR("Failed to execute command\n");
|
|
|
|
return ret;
|
|
|
|
}
|
2015-11-17 19:35:17 -05:00
|
|
|
INFO("Paper load mode: %s\n", (val ? "Cut" : "No Cut"));
|
2015-11-17 19:28:09 -05:00
|
|
|
|
2021-06-24 21:40:07 -04:00
|
|
|
if (!ctx->is_2245) {
|
2020-07-28 20:40:43 -04:00
|
|
|
if ((ret = sinfonia_getparam(&ctx->dev, PARAM_SLEEP_TIME, &val))) {
|
|
|
|
ERROR("Failed to execute command\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
if (val == 0)
|
|
|
|
val = 5;
|
|
|
|
else if (val == 1)
|
|
|
|
val = 15;
|
|
|
|
else if (val == 2)
|
|
|
|
val = 30;
|
|
|
|
else if (val == 3)
|
|
|
|
val = 60;
|
|
|
|
else if (val == 4)
|
|
|
|
val = 120;
|
|
|
|
else
|
|
|
|
val = 240; // default?
|
|
|
|
|
|
|
|
INFO("Sleep delay: %u minutes\n", val);
|
2015-11-17 19:28:09 -05:00
|
|
|
}
|
2017-07-10 20:15:56 -04:00
|
|
|
|
2019-09-21 23:03:05 -04:00
|
|
|
return CUPS_BACKEND_OK;
|
2015-07-26 23:05:21 -04:00
|
|
|
}
|
|
|
|
|
2020-08-08 16:36:23 -04:00
|
|
|
static void dump_mediainfo(struct sinfonia_6x45_mediainfo_resp *resp, int is_card)
|
2015-07-26 23:05:21 -04:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2020-08-08 16:36:23 -04:00
|
|
|
INFO("Loaded Media Type: %s\n", print_ribbons(resp->ribbon_code, is_card));
|
2016-08-21 10:23:00 -04:00
|
|
|
|