SANEI 1.3.1.72-4c77c
sanei_pa4s2.h
Go to the documentation of this file.
1/* sane - Scanner Access Now Easy.
2 Copyright (C) 2000-2003 Jochen Eisinger <jochen.eisinger@gmx.net>
3 This file is part of the SANE package.
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
17
18 As a special exception, the authors of SANE give permission for
19 additional uses of the libraries contained in this release of SANE.
20
21 The exception is that, if you link a SANE library with other files
22 to produce an executable, this does not by itself cause the
23 resulting executable to be covered by the GNU General Public
24 License. Your use of that executable is in no way restricted on
25 account of linking the SANE library code into it.
26
27 This exception does not, however, invalidate any other reasons why
28 the executable file might be covered by the GNU General Public
29 License.
30
31 If you submit changes to SANE to the maintainers to be included in
32 a subsequent release, you agree by submitting the changes that
33 those changes may be distributed with this exception intact.
34
35 If you write modifications of your own for SANE, it is your choice
36 whether to permit this exception to apply to your modifications.
37 If you do not wish that, delete this exception notice.
38*/
39
46#ifndef sanei_pa4s2_h
47#define sanei_pa4s2_h
48
49#include <sys/types.h>
50#include <sane/sane.h>
51
53/* @{ */
54#define SANEI_PA4S2_OPT_DEFAULT 0 /* normal mode */
55#define SANEI_PA4S2_OPT_TRY_MODE_UNI 1 /* enable UNI protocol */
56#define SANEI_PA4S2_OPT_ALT_LOCK 2 /* use alternative lock cmd */
57#define SANEI_PA4S2_OPT_NO_EPP 4 /* do not try to use EPP */
58/* @} */
59
71extern const char ** sanei_pa4s2_devices(void);
72
87extern SANE_Status sanei_pa4s2_open (const char *dev, int *fd);
88
103extern SANE_Status sanei_pa4s2_scsi_pp_open (const char *dev, int *fd);
104
109extern void sanei_pa4s2_close (int fd);
110
122extern SANE_Status sanei_pa4s2_options (u_int * options, int set);
123
136extern SANE_Status sanei_pa4s2_enable (int fd, int enable);
137
152extern SANE_Status sanei_pa4s2_readbegin (int fd, u_char reg);
153
163extern SANE_Status sanei_pa4s2_scsi_pp_get_status (int fd, u_char *status);
164
174extern SANE_Status sanei_pa4s2_scsi_pp_reg_select (int fd, int reg);
175
190extern SANE_Status sanei_pa4s2_readbyte (int fd, u_char * val);
191
204extern SANE_Status sanei_pa4s2_readend (int fd);
205
216extern SANE_Status sanei_pa4s2_writebyte (int fd, u_char reg, u_char val);
217
218#endif
void sanei_pa4s2_close(int fd)
Close pa4s2 device.
SANE_Status sanei_pa4s2_readbegin(int fd, u_char reg)
Select a register.
SANE_Status sanei_pa4s2_options(u_int *options, int set)
Set/get options.
SANE_Status sanei_pa4s2_readbyte(int fd, u_char *val)
Read a register.
SANE_Status sanei_pa4s2_writebyte(int fd, u_char reg, u_char val)
Write a register.
SANE_Status sanei_pa4s2_open(const char *dev, int *fd)
Open pa4s2 device.
SANE_Status sanei_pa4s2_scsi_pp_get_status(int fd, u_char *status)
Return port status information.
SANE_Status sanei_pa4s2_enable(int fd, int enable)
Enables/disable device.
SANE_Status sanei_pa4s2_scsi_pp_open(const char *dev, int *fd)
Open pa4s2 SCSI-over-parallel device.
SANE_Status sanei_pa4s2_readend(int fd)
Terminate reading sequence.
SANE_Status sanei_pa4s2_scsi_pp_reg_select(int fd, int reg)
Selects a register number on a SCSI-over-parallel scanner.
const char ** sanei_pa4s2_devices(void)
Get list of possibly available devices.