SANEI 1.3.1.76-0750
sanei_lm983x.h
Go to the documentation of this file.
1/* sane - Scanner Access Now Easy.
2
3 based on sources acquired from Plustek Inc.
4 Copyright (C) 2002-2003 Gerhard Jaeger <gerhard@gjaeger.de>
5
6 This file is part of the SANE package.
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21 As a special exception, the authors of SANE give permission for
22 additional uses of the libraries contained in this release of SANE.
23
24 The exception is that, if you link a SANE library with other files
25 to produce an executable, this does not by itself cause the
26 resulting executable to be covered by the GNU General Public
27 License. Your use of that executable is in no way restricted on
28 account of linking the SANE library code into it.
29
30 This exception does not, however, invalidate any other reasons why
31 the executable file might be covered by the GNU General Public
32 License.
33
34 If you submit changes to SANE to the maintainers to be included in
35 a subsequent release, you agree by submitting the changes that
36 those changes may be distributed with this exception intact.
37
38 If you write modifications of your own for SANE, it is your choice
39 whether to permit this exception to apply to your modifications.
40 If you do not wish that, delete this exception notice.
41
42*/
43
53#ifndef sanei_lm983x_h
54#define sanei_lm983x_h
55
56#include "../include/sane/config.h"
57#include "../include/sane/sane.h"
58
71#define sanei_lm983x_read_byte(fd, reg, value) \
72 sanei_lm983x_read (fd, reg, value, 1, 0)
73
79extern void sanei_lm983x_init( void );
80
93extern SANE_Status sanei_lm983x_write_byte( SANE_Int fd,
94 SANE_Byte reg, SANE_Byte value );
95
112extern SANE_Status sanei_lm983x_write( SANE_Int fd, SANE_Byte reg,
113 SANE_Byte *buffer, SANE_Word len,
114 SANE_Bool increment );
115
133extern SANE_Status sanei_lm983x_read( SANE_Int fd, SANE_Byte reg,
134 SANE_Byte *buffer, SANE_Word len,
135 SANE_Bool increment );
136
145extern SANE_Bool sanei_lm983x_reset( SANE_Int fd );
146
147#endif /* sanei_lm983x_h */
void sanei_lm983x_init(void)
Initialize sanei_lm983x.
SANE_Bool sanei_lm983x_reset(SANE_Int fd)
Reset the LM983x chip.
SANE_Status sanei_lm983x_read(SANE_Int fd, SANE_Byte reg, SANE_Byte *buffer, SANE_Word len, SANE_Bool increment)
Read one or more data bytes from one ore more specific LM983x registers.
SANE_Status sanei_lm983x_write(SANE_Int fd, SANE_Byte reg, SANE_Byte *buffer, SANE_Word len, SANE_Bool increment)
Write one or more data bytes to one or more specific LM983x registers.
SANE_Status sanei_lm983x_write_byte(SANE_Int fd, SANE_Byte reg, SANE_Byte value)
Write one data byte to a specific LM983x register.