kodak70xx: Printer has four banks.
This commit is contained in:
parent
eeeef86e0a
commit
361c19579b
|
@ -79,19 +79,25 @@ struct kodak605_status {
|
||||||
uint16_t b1_remain;
|
uint16_t b1_remain;
|
||||||
uint16_t b1_complete;
|
uint16_t b1_complete;
|
||||||
uint16_t b1_total;
|
uint16_t b1_total;
|
||||||
/*@45*/ uint8_t b1_sts; /* See BANK_STATUS_* */
|
uint8_t b1_sts; /* See BANK_STATUS_* */
|
||||||
uint8_t b2_id; /* jobid */
|
/*@46*/ uint8_t b2_id; /* jobid */
|
||||||
uint16_t b2_remain;
|
uint16_t b2_remain;
|
||||||
uint16_t b2_complete;
|
uint16_t b2_complete;
|
||||||
uint16_t b2_total;
|
uint16_t b2_total;
|
||||||
/*@53*/ uint8_t b2_sts; /* see BANK_STATUS_* */
|
uint8_t b2_sts; /* see BANK_STATUS_* */
|
||||||
/*@54*/ uint8_t id; /* current job id ( 00/01/02 seen ) */
|
/*@54*/ uint8_t b3_id; /* jobid */
|
||||||
/*@55*/ uint16_t remain; /* in current job */
|
uint16_t b3_remain;
|
||||||
/*@57*/ uint16_t complete; /* in current job */
|
uint16_t b3_complete;
|
||||||
/*@59*/ uint16_t total; /* in current job */
|
uint16_t b3_total;
|
||||||
/*@61*/ uint8_t null_2[9]; /* 00 00 00 00 00 00 00 00 00 */
|
uint8_t b3_sts; /* see BANK_STATUS_* */
|
||||||
/*@70*/ uint8_t unk_12[6]; /* 01 00 00 00 00 00 (605) 01 01 01 01 00 00 (EK7000) */
|
/*@62*/ uint8_t b4_id; /* jobid */
|
||||||
/*@76*/ uint8_t unk_13[1]; // EK7000-series only?
|
uint16_t b4_remain;
|
||||||
|
uint16_t b4_complete;
|
||||||
|
uint16_t b4_total;
|
||||||
|
uint8_t b4_sts; /* see BANK_STATUS_* */
|
||||||
|
/*@70*/ uint8_t banks[4]; /* ?? EK605 has 01/00/00/00, EK7000 has 01/01/01/01 */
|
||||||
|
/*@74*/ uint8_t null_2[2]; /* 00 00 */
|
||||||
|
/*@76*/ uint8_t null_3[1]; /* EK7000 only */
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
#define CMDBUF_LEN 4
|
#define CMDBUF_LEN 4
|
||||||
|
@ -459,7 +465,9 @@ static int kodak605_main_loop(void *vctx, const void *vjob) {
|
||||||
/* Make sure we're not colliding with an existing
|
/* Make sure we're not colliding with an existing
|
||||||
jobid */
|
jobid */
|
||||||
while (ctx->jobid == sts.b1_id ||
|
while (ctx->jobid == sts.b1_id ||
|
||||||
ctx->jobid == sts.b2_id) {
|
ctx->jobid == sts.b2_id ||
|
||||||
|
ctx->jobid == sts.b3_id ||
|
||||||
|
ctx->jobid == sts.b4_id) {
|
||||||
ctx->jobid++;
|
ctx->jobid++;
|
||||||
ctx->jobid &= 0x7f;
|
ctx->jobid &= 0x7f;
|
||||||
if (!ctx->jobid)
|
if (!ctx->jobid)
|
||||||
|
@ -468,7 +476,9 @@ static int kodak605_main_loop(void *vctx, const void *vjob) {
|
||||||
|
|
||||||
/* Wait for a free buffer */
|
/* Wait for a free buffer */
|
||||||
if (sts.b1_sts == BANK_STATUS_FREE ||
|
if (sts.b1_sts == BANK_STATUS_FREE ||
|
||||||
sts.b2_sts == BANK_STATUS_FREE) {
|
sts.b2_sts == BANK_STATUS_FREE ||
|
||||||
|
sts.b3_sts == BANK_STATUS_FREE ||
|
||||||
|
sts.b4_sts == BANK_STATUS_FREE) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,6 +563,10 @@ retry_print:
|
||||||
break;
|
break;
|
||||||
if (sts.b2_id == ctx->jobid && sts.b2_complete == sts.b2_total)
|
if (sts.b2_id == ctx->jobid && sts.b2_complete == sts.b2_total)
|
||||||
break;
|
break;
|
||||||
|
if (sts.b3_id == ctx->jobid && sts.b3_complete == sts.b3_total)
|
||||||
|
break;
|
||||||
|
if (sts.b4_id == ctx->jobid && sts.b4_complete == sts.b4_total)
|
||||||
|
break;
|
||||||
|
|
||||||
if (sts.hdr.status == STATUS_READY)
|
if (sts.hdr.status == STATUS_READY)
|
||||||
break;
|
break;
|
||||||
|
@ -576,12 +590,22 @@ static void kodak605_dump_status(struct kodak605_ctx *ctx, struct kodak605_statu
|
||||||
sts->hdr.printer_major, sts->hdr.printer_minor,
|
sts->hdr.printer_major, sts->hdr.printer_minor,
|
||||||
error_codes(sts->hdr.printer_major, sts->hdr.printer_minor));
|
error_codes(sts->hdr.printer_major, sts->hdr.printer_minor));
|
||||||
|
|
||||||
INFO("Bank 1: %s Job %03u @ %03u/%03u\n",
|
if (sts->banks[0])
|
||||||
sinfonia_bank_statuses(sts->b1_sts), sts->b1_id,
|
INFO("Bank 1: %s Job %03u @ %03u/%03u\n",
|
||||||
le16_to_cpu(sts->b1_complete), le16_to_cpu(sts->b1_total));
|
sinfonia_bank_statuses(sts->b1_sts), sts->b1_id,
|
||||||
INFO("Bank 2: %s Job %03u @ %03u/%03u\n",
|
le16_to_cpu(sts->b1_complete), le16_to_cpu(sts->b1_total));
|
||||||
sinfonia_bank_statuses(sts->b2_sts), sts->b2_id,
|
if (sts->banks[1])
|
||||||
le16_to_cpu(sts->b2_complete), le16_to_cpu(sts->b2_total));
|
INFO("Bank 2: %s Job %03u @ %03u/%03u\n",
|
||||||
|
sinfonia_bank_statuses(sts->b2_sts), sts->b2_id,
|
||||||
|
le16_to_cpu(sts->b2_complete), le16_to_cpu(sts->b2_total));
|
||||||
|
if (sts->banks[2])
|
||||||
|
INFO("Bank 3: %s Job %03u @ %03u/%03u\n",
|
||||||
|
sinfonia_bank_statuses(sts->b3_sts), sts->b3_id,
|
||||||
|
le16_to_cpu(sts->b3_complete), le16_to_cpu(sts->b3_total));
|
||||||
|
if (sts->banks[3])
|
||||||
|
INFO("Bank 4: %s Job %03u @ %03u/%03u\n",
|
||||||
|
sinfonia_bank_statuses(sts->b4_sts), sts->b4_id,
|
||||||
|
le16_to_cpu(sts->b4_complete), le16_to_cpu(sts->b4_total));
|
||||||
|
|
||||||
INFO("Lifetime prints : %u\n", le32_to_cpu(sts->ctr_life));
|
INFO("Lifetime prints : %u\n", le32_to_cpu(sts->ctr_life));
|
||||||
INFO("Cutter actuations : %u\n", le32_to_cpu(sts->ctr_cut));
|
INFO("Cutter actuations : %u\n", le32_to_cpu(sts->ctr_cut));
|
||||||
|
@ -737,7 +761,7 @@ static const char *kodak605_prefixes[] = {
|
||||||
/* Exported */
|
/* Exported */
|
||||||
struct dyesub_backend kodak605_backend = {
|
struct dyesub_backend kodak605_backend = {
|
||||||
.name = "Kodak 605/70xx",
|
.name = "Kodak 605/70xx",
|
||||||
.version = "0.45" " (lib " LIBSINFONIA_VER ")",
|
.version = "0.46" " (lib " LIBSINFONIA_VER ")",
|
||||||
.uri_prefixes = kodak605_prefixes,
|
.uri_prefixes = kodak605_prefixes,
|
||||||
.cmdline_usage = kodak605_cmdline,
|
.cmdline_usage = kodak605_cmdline,
|
||||||
.cmdline_arg = kodak605_cmdline_arg,
|
.cmdline_arg = kodak605_cmdline_arg,
|
||||||
|
|
Loading…
Reference in New Issue