kopia lustrzana https://gitlab.com/sane-project/website
103 wiersze
3.8 KiB
HTML
103 wiersze
3.8 KiB
HTML
<!-- received="Fri Feb 20 11:38:22 1998 PST" -->
|
||
<!-- sent="Fri, 20 Feb 1998 14:37:58 -0500" -->
|
||
<!-- name="David Skoll" -->
|
||
<!-- email="dskoll@chipworks.com" -->
|
||
<!-- subject="Linux 2.0.33 and Sane 0.70" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="" -->
|
||
<title>sane-devel: Linux 2.0.33 and Sane 0.70</title>
|
||
<h1>Linux 2.0.33 and Sane 0.70</h1>
|
||
<b>David Skoll</b> (<a href="mailto:dskoll@chipworks.com"><i>dskoll@chipworks.com</i></a>)<br>
|
||
<i>Fri, 20 Feb 1998 14:37:58 -0500</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#117">[ date ]</a><a href="index.html#117">[ thread ]</a><a href="subject.html#117">[ subject ]</a><a href="author.html#117">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0118.html">Rogier Wolff: "Re: Umax Astra 6x0S - CCD distance - Do they *really* do this that way"</a>
|
||
<li> <b>Previous message:</b> <a href="0116.html">Miguel Casteleiro: "Mustek Paragon 1200 A3 PRO"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
Hi,<br>
|
||
<p>
|
||
I am attempting to write a SANE driver for the Polaroid DMC, a high-end<br>
|
||
CCD camera for microscopy applications. However, my driver hangs up in<br>
|
||
one spot forcing me to reboot.<br>
|
||
<p>
|
||
I'm running Linux 2.0.33 on an Intel system with SANE 0.70 and an<br>
|
||
Adaptec 2940 SCSI card. The driver correctly causes the camera shutter<br>
|
||
to trigger, but when I try to read the image data, it crashes.<br>
|
||
<p>
|
||
Here's the relevant portion of the driver. If anyone has a DMC and<br>
|
||
would like to help me out, I can send the entire driver code as it<br>
|
||
stands now. I also have the DMC SCSI specs (in Word format -- bleh...)<br>
|
||
<p>
|
||
Regards,<br>
|
||
<p>
|
||
David.<br>
|
||
<p>
|
||
/**********************************************************************<br>
|
||
//%FUNCTION: DMCRead<br>
|
||
//%ARGUMENTS:<br>
|
||
// fd -- file descriptor<br>
|
||
// typecode -- data type code<br>
|
||
// qualifier -- data type qualifier<br>
|
||
// maxlen -- tranfer length<br>
|
||
// buf -- buffer to store data in<br>
|
||
// len -- set to actual length of data<br>
|
||
//%RETURNS:<br>
|
||
// A SANE status code<br>
|
||
//%DESCRIPTION:<br>
|
||
// Reads the particular data selected by typecode and qualifier<br>
|
||
//<br>
|
||
*********************************************************************/<br>
|
||
static SANE_Status<br>
|
||
DMCRead(int fd, unsigned int typecode, unsigned int qualifier,<br>
|
||
SANE_Byte *buf, size_t maxlen, size_t *len)<br>
|
||
{<br>
|
||
u_int8_t readCmd[10];<br>
|
||
SANE_Status status;<br>
|
||
<p>
|
||
/* Adjust byte length to multiple of image row size */<br>
|
||
if (typecode == 0x00 && qualifier == 0x0000) {<br>
|
||
maxlen = (maxlen / 2403) * 2403;<br>
|
||
}<br>
|
||
readCmd[0] = 0x28;<br>
|
||
readCmd[1] = 0;<br>
|
||
readCmd[2] = typecode;<br>
|
||
readCmd[3] = 0;<br>
|
||
readCmd[4] = (qualifier >> 8) & 0xFF;<br>
|
||
readCmd[5] = qualifier & 0xFF;<br>
|
||
readCmd[6] = (maxlen >> 16) & 0xFF;<br>
|
||
readCmd[7] = (maxlen >> 8) & 0xFF;<br>
|
||
readCmd[8] = maxlen & 0xFF;<br>
|
||
readCmd[9] = 0;<br>
|
||
DBG(3, "DMCRead: typecode=%x, qualifier=%x, maxlen=%d\n",<br>
|
||
typecode, qualifier, maxlen);<br>
|
||
<p>
|
||
*len = 0;<br>
|
||
<p>
|
||
/* The next line HANGS! */<br>
|
||
status = sanei_scsi_cmd(fd, readCmd, sizeof(readCmd), buf, len);<br>
|
||
<p>
|
||
DBG(3, "DMCRead: Read %u bytes\n", *len);<br>
|
||
return status;<br>
|
||
}<br>
|
||
<p>
|
||
<p>
|
||
<pre>
|
||
--
|
||
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
|
||
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
|
||
</pre>
|
||
<!-- body="end" -->
|
||
<p>
|
||
<ul>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0118.html">Rogier Wolff: "Re: Umax Astra 6x0S - CCD distance - Do they *really* do this that way"</a>
|
||
<li> <b>Previous message:</b> <a href="0116.html">Miguel Casteleiro: "Mustek Paragon 1200 A3 PRO"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|