summaryrefslogtreecommitdiffstats
path: root/backend_shinkos6245.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend_shinkos6245.c')
-rw-r--r--backend_shinkos6245.c51
1 files changed, 7 insertions, 44 deletions
diff --git a/backend_shinkos6245.c b/backend_shinkos6245.c
index 1a1c267..f14b3b8 100644
--- a/backend_shinkos6245.c
+++ b/backend_shinkos6245.c
@@ -153,11 +153,6 @@ struct s6245_settime_cmd {
uint8_t year;
} __attribute__((packed));
-struct s6245_errorlog_cmd {
- struct sinfonia_cmd_hdr hdr;
- uint16_t index; /* 0 is latest */
-} __attribute__((packed));
-
static const char *s6245_error_codes(uint8_t major, uint8_t minor)
{
switch(major) {
@@ -592,38 +587,6 @@ static const char *ek8810_error_codes(uint8_t major, uint8_t minor)
}
}
-struct s6245_status_resp {
- struct sinfonia_status_hdr hdr;
- uint32_t count_lifetime;
- uint32_t count_maint;
- uint32_t count_paper;
- uint32_t count_cutter;
- uint32_t count_head;
- uint32_t count_ribbon_left;
- uint32_t reserved;
-
- uint8_t bank1_printid;
- uint16_t bank1_remaining;
- uint16_t bank1_finished;
- uint16_t bank1_specified;
- uint8_t bank1_status;
-
- uint8_t bank2_printid;
- uint16_t bank2_remaining;
- uint16_t bank2_finished;
- uint16_t bank2_specified;
- uint8_t bank2_status;
-
- uint8_t reserved2[16];
- uint8_t tonecurve_status;
- uint8_t reserved3[6];
-} __attribute__((packed));
-
-struct s6245_geteeprom_resp {
- struct sinfonia_status_hdr hdr;
- uint8_t data[256];
-} __attribute__((packed));
-
#define RIBBON_NONE 0x00
#define RIBBON_8x10 0x11
#define RIBBON_8x12 0x12
@@ -712,7 +675,7 @@ struct shinkos6245_ctx {
static int get_status(struct shinkos6245_ctx *ctx)
{
struct sinfonia_cmd_hdr cmd;
- struct s6245_status_resp resp;
+ struct sinfonia_status_resp resp;
struct sinfonia_getextcounter_resp resp2;
int ret, num = 0;
@@ -739,7 +702,7 @@ static int get_status(struct shinkos6245_ctx *ctx)
}
/* Sanity checking */
- if (le16_to_cpu(resp.hdr.payload_len) != (sizeof(struct s6245_status_resp) - sizeof(struct sinfonia_status_hdr)))
+ if (le16_to_cpu(resp.hdr.payload_len) != (sizeof(struct sinfonia_status_resp) - sizeof(struct sinfonia_status_hdr)))
return CUPS_BACKEND_OK;
INFO(" Print Counts:\n");
@@ -793,7 +756,7 @@ static int get_status(struct shinkos6245_ctx *ctx)
static int get_errorlog(struct shinkos6245_ctx *ctx)
{
- struct s6245_errorlog_cmd cmd;
+ struct sinfonia_errorlog2_cmd cmd;
struct s6245_errorlog_resp resp;
int num = 0;
int i = 0;
@@ -1124,7 +1087,7 @@ static int shinkos6245_main_loop(void *vctx, const void *vjob) {
struct sinfonia_cmd_hdr *cmd = (struct sinfonia_cmd_hdr *) cmdbuf;;
struct s6245_print_cmd *print = (struct s6245_print_cmd *) cmdbuf;
- struct s6245_status_resp sts, sts2;
+ struct sinfonia_status_resp sts, sts2;
struct sinfonia_status_hdr resp;
struct sinfonia_printjob *job = (struct sinfonia_printjob*) vjob;
@@ -1394,7 +1357,7 @@ static int shinkos6245_query_markers(void *vctx, struct marker **markers, int *c
{
struct shinkos6245_ctx *ctx = vctx;
struct sinfonia_cmd_hdr cmd;
- struct s6245_status_resp status;
+ struct sinfonia_status_resp status;
int num;
/* Query Status */
@@ -1420,7 +1383,7 @@ static int shinkos6245_query_stats(void *vctx, struct printerstats *stats)
{
struct shinkos6245_ctx *ctx = vctx;
struct sinfonia_cmd_hdr cmd;
- struct s6245_status_resp status;
+ struct sinfonia_status_resp status;
int num;
if (shinkos6245_query_markers(ctx, NULL, NULL))
@@ -1516,7 +1479,7 @@ static const char *shinkos6245_prefixes[] = {
struct dyesub_backend shinkos6245_backend = {
.name = "Sinfonia CHC-S6245 / Kodak 8810",
- .version = "0.33" " (lib " LIBSINFONIA_VER ")",
+ .version = "0.34" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = shinkos6245_prefixes,
.cmdline_usage = shinkos6245_cmdline,
.cmdline_arg = shinkos6245_cmdline_arg,