Martin Zackrisson <martin.zackrisson at cmb.gu.se> writes: > I've dug through the code and made copy/paste/rename adjustments > everywhere it seemed reasonable (first day with c-code...). This will > probably more show how lost I am than anything else, but below are the > diffs for all files I've been poking around (don't think I forgot > any). I think my main issue is that I have no clue how to connect the > static that I made (SANE_EPSON_CAP_FULL_SENSOR_IN_TPU) to what is > being sent in the scanner in "define esci_set_full_sensor(s,v) > e2_esc_cmd( s,(s)->hw->cmd->set_full_sensor, v)". That is to give > set_full_sensor the value of SANE_EPSON_CAP_FULL_SENSOR_IN_TPU.
Your SANE_EPSON_CAP_FULL_SENSOR_IN_TPU defines a two byte value but s->hw->cmd->set_full_sensor is only a single byte. The e2_esc_cmd() route will not work as it was written for scanner commands that all start with an ESC (0x1b). You have to write your own esci_set_full_sensor() (see esci_set_zoom() in epson2-cmd.c for inspiration) and make that send the two bytes of SANE_EPSON_CAP_FULL_SENSOR_IN_TPU as well as the 0 or 1 value you want to set. BTW, I have no clue as to the command handshake but expect it to be similar to that of esci_set_zoom(). > [...snip...] Hope this helps, -- Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION FSF Associate Member #1962 Help support software freedom http://www.fsf.org/jf?referrer=1962