sinfonia: Document mechanism used for updating firmware
....Nothing uses this yet. Should be interesting.
This commit is contained in:
parent
340d8f690f
commit
e4b678ea08
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Shinko/Sinfonia Common Code
|
||||
*
|
||||
* (c) 2019-2023 Solomon Peachy <pizza@shaftnet.org>
|
||||
* (c) 2019-2024 Solomon Peachy <pizza@shaftnet.org>
|
||||
*
|
||||
* The latest version of this program can be found at:
|
||||
*
|
||||
|
@ -322,6 +322,7 @@ int sinfonia_panorama_splitjob(struct sinfonia_printjob *injob,
|
|||
newjobs[i]->databuf = panels[i];
|
||||
newjobs[i]->jp.rows = panel_rows[i];
|
||||
// XXX what else?
|
||||
// fill in contents here instead?
|
||||
}
|
||||
|
||||
dyesub_pano_split_rgb8(injob->databuf, cols, inrows,
|
||||
|
@ -657,15 +658,16 @@ int sinfonia_getfwinfo(struct sinfonia_usbdev *usbh)
|
|||
if (le16_to_cpu(resp.hdr.payload_len) != (sizeof(struct sinfonia_fwinfo_resp) - sizeof(struct sinfonia_status_hdr)))
|
||||
continue;
|
||||
|
||||
INFO(" %s\t ver %02x.%02x\n", sinfonia_fwinfo_targets(i),
|
||||
resp.major, resp.minor);
|
||||
#if 0
|
||||
INFO(" name: '%s'\n", resp.name);
|
||||
INFO(" type: '%s'\n", resp.type);
|
||||
INFO(" date: '%s'\n", resp.date);
|
||||
INFO(" version: %02x.%02x (CRC %04x)\n", resp.major, resp.minor,
|
||||
le16_to_cpu(resp.checksum));
|
||||
#endif
|
||||
if (dyesub_debug) {
|
||||
INFO(" name: '%s'\n", resp.name);
|
||||
INFO(" type: '%s'\n", resp.type);
|
||||
INFO(" date: '%s'\n", resp.date);
|
||||
INFO(" version: %02x.%02x (CRC %04x)\n", resp.major, resp.minor,
|
||||
le16_to_cpu(resp.checksum));
|
||||
} else {
|
||||
INFO(" %s\t ver %02x.%02x\n", sinfonia_fwinfo_targets(i),
|
||||
resp.major, resp.minor);
|
||||
}
|
||||
}
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
@ -850,7 +852,7 @@ int sinfonia_settonecurve(struct sinfonia_usbdev *usbh, int target, char *fname)
|
|||
|
||||
/* Set up command */
|
||||
cmd.target = target;
|
||||
cmd.curve_id = TONE_CURVE_ID;
|
||||
cmd.target2 = UPDATE_TARGET2_TONE;
|
||||
cmd.reserved[0] = cmd.reserved[1] = cmd.reserved[2] = 0;
|
||||
cmd.reset = 0;
|
||||
cmd.size = cpu_to_le32(TONE_CURVE_SIZE * sizeof(uint16_t));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Shinko/Sinfonia Common Code
|
||||
*
|
||||
* (c) 2019-2023 Solomon Peachy <pizza@shaftnet.org>
|
||||
* (c) 2019-2024 Solomon Peachy <pizza@shaftnet.org>
|
||||
*
|
||||
* The latest version of this program can be found at:
|
||||
*
|
||||
|
@ -253,8 +253,18 @@ const char *sinfonia_paramname(struct sinfonia_usbdev *usbh, int id);
|
|||
|
||||
const char *sinfonia_bank_statuses(uint8_t v);
|
||||
|
||||
#define UPDATE_TARGET2_FIRMWARE 0x00
|
||||
#define UPDATE_TARGET2_TONE 0x01
|
||||
|
||||
#define UPDATE_TARGET_FIRMWARE_DSP 0x00
|
||||
#define UPDATE_TARGET_FIRMWARE_MAIN 0x01
|
||||
#define UPDATE_TARGET_FIRMWARE_TABLE 0x02
|
||||
|
||||
#define UPDATE_TARGET_TONE_USER 0x03
|
||||
#define UPDATE_TARGET_TONE_CURRENT 0x04
|
||||
|
||||
#define UPDATE_TARGET2_LAM 0x00 // ???
|
||||
|
||||
#define UPDATE_TARGET_LAM_USER 0x10
|
||||
#define UPDATE_TARGET_LAM_DEF 0x11
|
||||
#define UPDATE_TARGET_LAM_CUR 0x12
|
||||
|
@ -501,9 +511,9 @@ struct sinfonia_readtone_resp {
|
|||
|
||||
struct sinfonia_update_cmd {
|
||||
struct sinfonia_cmd_hdr hdr;
|
||||
uint8_t target; // UPDATE_TARGET_TONE_*
|
||||
uint8_t curve_id; // 00 for lamination, 01 for tone?
|
||||
uint8_t reset; // ??
|
||||
uint8_t target; // UPDATE_TARGET_*
|
||||
uint8_t target2; // UPDATE_TARGET2_*
|
||||
uint8_t reset; // 1 to reset printer afterwards
|
||||
uint8_t reserved[3];
|
||||
uint32_t size; // TONE_CURVE_SIZE or lamination data that is rows*cols bytes
|
||||
} __attribute__((packed));
|
||||
|
@ -592,6 +602,14 @@ struct sinfonia_settime_cmd {
|
|||
uint8_t year;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct sinfonia_usbfwdl_cmd {
|
||||
struct sinfonia_cmd_hdr hdr;
|
||||
uint8_t reset;
|
||||
uint16_t unka; /* LE, 0x4000 on EK70xx? */
|
||||
uint16_t len; /* LE, Always seems to be 0xc000 */
|
||||
uint8_t payload[];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct kodak701x_backprint {
|
||||
struct sinfonia_cmd_hdr hdr;
|
||||
uint8_t unk_0; // unknown. maybe the line number?
|
||||
|
|
Loading…
Reference in a new issue