-/* $OpenBSD: ss.c,v 1.9 1997/02/27 06:20:23 tholo Exp $ */
+/* $OpenBSD: ss.c,v 1.10 1997/03/06 12:44:41 kstailey Exp $ */
/* $NetBSD: ss.c,v 1.10 1996/05/05 19:52:55 christos Exp $ */
/*
void ssstart __P((void *));
void ssminphys __P((struct buf *));
+static int ss_set_window __P((struct ss_softc *, struct scan_io *));
+
struct scsi_device ss_switch = {
NULL,
ssstart,
error = (ss->special->get_params)(ss);
if (error)
return (error);
- } else {
- /* XXX add code for SCSI2 scanner, if any */
- return (EOPNOTSUPP);
}
bcopy(&ss->sio, addr, sizeof(struct scan_io));
break;
if (error)
return (error);
} else {
- /* XXX add code for SCSI2 scanner, if any */
+#ifdef NOTYET
+ /* add routine to validate paramters */
+ ss_set_window(ss, sio);
+#else
return (EOPNOTSUPP);
+#endif
}
break;
case SCIOCRESTART:
}
return (error);
}
+
+#ifdef NOTYET
+static int
+ss_set_window(sc, sio)
+ struct ss_softc *;
+ struct scan_io *;
+{
+ struct scsi_set_window window_cmd;
+ struct scsi_window_header window_header;
+ struct scsi_window_data window_data;
+
+ bzero(&window_cmd, sizeof(window_cmd));
+ window_cmd.opcode = SET_WINDOW;
+ _lto3l(sizeof(window_data), window_cmd.length);
+
+ bzero(&window_header, sizeof(window_header));
+ _lto2l(, window_header.len);
+
+ bzero(&window_data, sizeof(window_data));
+ _lto2l(sio->sio.scan_x_resolution, window_data.x_res);
+ _lto2l(sio->sio.scan_y_resolution, window_data.y_res);
+ _lto2l(sio->, window_data.x_org);
+ _lto2l(sio->, window_data.y_org);
+}
+#endif
-/* $OpenBSD: ss_mustek.c,v 1.5 1996/05/10 12:31:40 deraadt Exp $ */
+/* $OpenBSD: ss_mustek.c,v 1.6 1997/03/06 12:44:42 kstailey Exp $ */
/* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */
/*
#define MUSTEK_RETRIES 4
-int mustek_get_params __P((struct ss_softc *));
int mustek_set_params __P((struct ss_softc *, struct scan_io *));
int mustek_trigger_scanner __P((struct ss_softc *));
void mustek_minphys __P((struct ss_softc *, struct buf *));
struct ss_special mustek_special = {
mustek_set_params,
mustek_trigger_scanner,
- mustek_get_params,
+ NULL,
mustek_minphys,
mustek_read,
mustek_rewind_scanner,
mustek_compute_sizes(ss);
}
-int
-mustek_get_params (ss)
- struct ss_softc *ss;
-{
-
- return (0);
-}
-
/*
* check the parameters if the mustek is capable of fulfilling it
* but don't send the command to the scanner in case the user wants
-/* $OpenBSD: ss_scanjet.c,v 1.14 1996/12/08 14:25:50 niklas Exp $ */
+/* $OpenBSD: ss_scanjet.c,v 1.15 1997/03/06 12:44:42 kstailey Exp $ */
/* $NetBSD: ss_scanjet.c,v 1.6 1996/05/18 22:58:01 christos Exp $ */
/*
#define SCANJET_RETRIES 4
-int scanjet_get_params __P((struct ss_softc *));
int scanjet_set_params __P((struct ss_softc *, struct scan_io *));
int scanjet_trigger_scanner __P((struct ss_softc *));
int scanjet_read __P((struct ss_softc *, struct buf *));
struct ss_special scanjet_special = {
scanjet_set_params,
scanjet_trigger_scanner,
- scanjet_get_params,
+ NULL,
NULL, /* no special minphys */
scanjet_read, /* scsi 6-byte read */
NULL, /* no "rewind" code (yet?) */
printf("\n");
}
-int
-scanjet_get_params(ss)
- struct ss_softc *ss;
-{
-
- return (0);
-}
-
/*
* check the parameters if the scanjet is capable of fulfilling it
* but don't send the command to the scanner in case the user wants