diff --git a/backend_kodak605.c b/backend_kodak605.c index 7fb4033..1efe133 100644 --- a/backend_kodak605.c +++ b/backend_kodak605.c @@ -677,6 +677,7 @@ static void kodak605_cmdline(void) DEBUG("\t\t[ -R ] # Reset printer to factory defaults\n"); DEBUG("\t\t[ -s ] # Query status\n"); DEBUG("\t\t[ -X jobid ] # Cancel job\n"); +// DEBUG("\t\t[ -Z ] # Dump all parameters\n"); } static int kodak605_cmdline_arg(void *vctx, int argc, char **argv) @@ -687,7 +688,7 @@ static int kodak605_cmdline_arg(void *vctx, int argc, char **argv) if (!ctx) return -1; - while ((i = getopt(argc, argv, GETOPT_LIST_GLOBAL "b:c:C:eFil:L:mrRsX:")) >= 0) { + while ((i = getopt(argc, argv, GETOPT_LIST_GLOBAL "b:c:C:eFil:L:mrRsX:Z")) >= 0) { switch(i) { GETOPT_PROCESS_GLOBAL case 'b': @@ -735,10 +736,13 @@ static int kodak605_cmdline_arg(void *vctx, int argc, char **argv) if (!j) kodak605_dump_status(ctx, &sts); break; + } case 'X': j = sinfonia_canceljob(&ctx->dev, atoi(optarg)); break; - } + case 'Z': + j = sinfonia_dumpallparams(&ctx->dev); + break; default: break; /* Ignore completely */ } diff --git a/backend_shinkos6145.c b/backend_shinkos6145.c index 0162eac..f526d90 100644 --- a/backend_shinkos6145.c +++ b/backend_shinkos6145.c @@ -879,6 +879,7 @@ static void shinkos6145_cmdline(void) DEBUG("\t\t[ -R ] # Reset printer to factory defaults\n"); DEBUG("\t\t[ -s ] # Query status\n"); DEBUG("\t\t[ -X jobid ] # Abort a printjob\n"); +// DEBUG("\t\t[ -Z ] # Dump all parameters\n"); } int shinkos6145_cmdline_arg(void *vctx, int argc, char **argv) @@ -889,7 +890,7 @@ int shinkos6145_cmdline_arg(void *vctx, int argc, char **argv) if (!ctx) return -1; - while ((i = getopt(argc, argv, GETOPT_LIST_GLOBAL "c:C:eFik:l:L:mr:Q:q:rR:sX:")) >= 0) { + while ((i = getopt(argc, argv, GETOPT_LIST_GLOBAL "c:C:eFik:l:L:mr:Q:q:rR:sX:Z")) >= 0) { switch(i) { GETOPT_PROCESS_GLOBAL case 'c': @@ -954,6 +955,9 @@ int shinkos6145_cmdline_arg(void *vctx, int argc, char **argv) case 'X': j = sinfonia_canceljob(&ctx->dev, atoi(optarg)); break; + case 'Z': + j = sinfonia_dumpallparams(&ctx->dev); + break; default: break; /* Ignore completely */ } diff --git a/backend_shinkos6245.c b/backend_shinkos6245.c index 56e95d6..ec59686 100644 --- a/backend_shinkos6245.c +++ b/backend_shinkos6245.c @@ -799,6 +799,7 @@ static void shinkos6245_cmdline(void) DEBUG("\t\t[ -R ] # Reset printer to factory defaults\n"); DEBUG("\t\t[ -s ] # Query status\n"); DEBUG("\t\t[ -X jobid ] # Abort a printjob\n"); +// DEBUG("\t\t[ -Z ] # Dump all parameters\n"); } int shinkos6245_cmdline_arg(void *vctx, int argc, char **argv) @@ -809,7 +810,7 @@ int shinkos6245_cmdline_arg(void *vctx, int argc, char **argv) if (!ctx) return -1; - while ((i = getopt(argc, argv, GETOPT_LIST_GLOBAL "b:c:C:eFik:l:L:mrR:sX:")) >= 0) { + while ((i = getopt(argc, argv, GETOPT_LIST_GLOBAL "b:c:C:eFik:l:L:mrR:sX:Z")) >= 0) { switch(i) { GETOPT_PROCESS_GLOBAL case 'b': @@ -882,6 +883,9 @@ int shinkos6245_cmdline_arg(void *vctx, int argc, char **argv) case 'X': j = sinfonia_canceljob(&ctx->dev, atoi(optarg)); break; + case 'Z': + j = sinfonia_dumpallparams(&ctx->dev); + break; default: break; /* Ignore completely */ } diff --git a/backend_sinfonia.c b/backend_sinfonia.c index 8488cf9..b92c12f 100644 --- a/backend_sinfonia.c +++ b/backend_sinfonia.c @@ -435,6 +435,20 @@ int sinfonia_getparam(struct sinfonia_usbdev *usbh, int target, uint32_t *param) return ret; } +int sinfonia_dumpallparams(struct sinfonia_usbdev *usbh) +{ + int i, ret; + uint32_t param = 0; + + for (i = 0 ; i < 256 ; i++) { + ret = sinfonia_getparam(usbh, i, ¶m); + if (ret) + continue; + DEBUG("%02x: %08x\n", i, param); + } + return CUPS_BACKEND_OK; +} + int sinfonia_setparam(struct sinfonia_usbdev *usbh, int target, uint32_t param) { struct sinfonia_setparam_cmd cmd; diff --git a/backend_sinfonia.h b/backend_sinfonia.h index 5dc6c7a..41c42bb 100644 --- a/backend_sinfonia.h +++ b/backend_sinfonia.h @@ -94,6 +94,7 @@ int sinfonia_settonecurve(struct sinfonia_usbdev *usbh, int target, char *fname) int sinfonia_button_set(struct sinfonia_usbdev *dev, int enable); int sinfonia_query_serno(struct libusb_device_handle *dev, uint8_t endp_up, uint8_t endp_down, char *buf, int buf_len); +int sinfonia_dumpallparams(struct sinfonia_usbdev *usbh); #define BANK_STATUS_FREE 0x00 #define BANK_STATUS_XFER 0x01