new parameter mf->generation

- new multifunctionals are (generation == 2)
merge-requests/1/head
Rolf Bensch 2013-02-11 19:25:44 +01:00
rodzic e7804700f6
commit bfa5f45e94
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -123,6 +123,8 @@ typedef struct iclass_t
unsigned buf_len, blk_len;
unsigned last_block;
uint8_t generation; /* New multifunctionals are (generation == 2) */
} iclass_t;
@ -459,6 +461,10 @@ iclass_open (pixma_t * s)
mf->cb.cmd_header_len = 10;
mf->cb.cmd_len_field_ofs = 7;
/* set generation = 2 for new multifunctionals */
mf->generation = (s->cfg->pid >= MF8030_PID) ? 2 : 1;
PDBG (pixma_dbg (3, "*iclass_open***** This is a generation %d scanner. *****\n", mf->generation));
PDBG (pixma_dbg (3, "Trying to clear the interrupt buffer...\n"));
if (handle_interrupt (s, 200) == 0)
{