summaryrefslogtreecommitdiff
path: root/backend/kvs20xx_cmd.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:29:05 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:29:05 +0200
commit324a8a71bb7d9e4f8bc49b6bc47efaf9fb58282e (patch)
treebd2d48a139bfbe869f4f49359b63097931a45e7b /backend/kvs20xx_cmd.c
parent2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff)
parent1edb02101a9306fc711cd422ed507d18165b1691 (diff)
Merge branch 'release/experimental/1.0.27-1_experimental1'experimental/1.0.27-1_experimental1
Diffstat (limited to 'backend/kvs20xx_cmd.c')
-rw-r--r--backend/kvs20xx_cmd.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/backend/kvs20xx_cmd.c b/backend/kvs20xx_cmd.c
index 7579701..d0f18ee 100644
--- a/backend/kvs20xx_cmd.c
+++ b/backend/kvs20xx_cmd.c
@@ -187,7 +187,7 @@ kvs20xx_set_timeout (struct scanner * s, int timeout)
};
c.cmd[0] = SET_TIMEOUT;
c.cmd[2] = 0x8d;
- *((u16 *) (c.cmd + 7)) = cpu2be16 (sizeof (t));
+ copy16 (c.cmd + 7, cpu2be16 (sizeof (t)));
c.data = &t;
c.data_size = sizeof (t);
@@ -210,7 +210,7 @@ kvs20xx_set_window (struct scanner * s, int wnd_id)
CMD_OUT
};
c.cmd[0] = SET_WINDOW;
- *((u16 *) (c.cmd + 7)) = cpu2be16 (sizeof (wnd));
+ copy16 (c.cmd + 7, cpu2be16 (sizeof (wnd)));
c.data = &wnd;
c.data_size = sizeof (wnd);
@@ -301,29 +301,6 @@ kvs20xx_read_picture_element (struct scanner * s, unsigned side,
return SANE_STATUS_GOOD;
}
-static SANE_Status
-get_buffer_status (struct scanner * s, unsigned *data_avalible)
-{
- SANE_Status status;
- struct cmd c = {
- {0},
- 10,
- 0,
- 12,
- CMD_IN
- };
- u32 *data;
- c.cmd[0] = GET_BUFFER_STATUS;
- c.cmd[7] = 12;
-
- status = send_command (s, &c);
- if (status)
- return status;
- data = (u32 *) c.data;
- *data_avalible = be2cpu32 (data[3]);
- return SANE_STATUS_GOOD;
-}
-
SANE_Status
kvs20xx_read_image_data (struct scanner * s, unsigned page, unsigned side,
void *buf, unsigned max_size, unsigned *size)