From 6e9c41a892ed0e0da326e0278b3221ce3f5713b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 6 Oct 2014 14:00:40 +0200 Subject: Initial import of sane-backends version 1.0.24-1.2 --- backend/epson2-io.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 backend/epson2-io.h (limited to 'backend/epson2-io.h') diff --git a/backend/epson2-io.h b/backend/epson2-io.h new file mode 100644 index 0000000..9d29cdb --- /dev/null +++ b/backend/epson2-io.h @@ -0,0 +1,50 @@ +/* + * Prototypes for epson2 I/O functions + * + * Based on Kazuhiro Sasayama previous + * Work on epson.[ch] file from the SANE package. + * Please see those files for original copyrights. + * + * Copyright (C) 2006 Tower Technologies + * Author: Alessandro Zummo + * + * This file is part of the SANE package. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 2. + */ + +#ifndef epson2_io_h +#define epson2_io_h + +extern unsigned int r_cmd_count; +extern unsigned int w_cmd_count; + + +SANE_Status e2_cmd_simple(Epson_Scanner * s, void *buf, size_t buf_size); +int e2_send(Epson_Scanner * s, void *buf, size_t buf_size, + size_t reply_len, SANE_Status * status); +ssize_t e2_recv(Epson_Scanner * s, void *buf, ssize_t buf_size, + SANE_Status * status); + +SANE_Status +e2_txrx(Epson_Scanner * s, unsigned char *txbuf, size_t txlen, + unsigned char *rxbuf, size_t rxlen); + +SANE_Status +e2_recv_info_block(Epson_Scanner * s, unsigned char *scanner_status, + size_t info_size, size_t * payload_size); + +SANE_Status +e2_cmd_info_block(SANE_Handle handle, unsigned char *params, + unsigned char params_len, size_t reply_len, + unsigned char **buf, size_t * buf_len); + +SANE_Status e2_ack(Epson_Scanner * s); +SANE_Status e2_ack_next(Epson_Scanner * s, size_t reply_len); +SANE_Status e2_cancel(Epson_Scanner * s); + +SANE_Status +e2_esc_cmd(Epson_Scanner * s, unsigned char cmd, unsigned char val); +#endif /* epson2_io_h */ -- cgit v1.2.3