root/i2c-tools/trunk/tools/i2cbusses.h

Revision 5241, 1.3 kB (checked in by khali, 7 months ago)

Share the error string between all functionality checks.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2     i2cbusses.h - Part of the i2c-tools package
3
4     Copyright (C) 2004-2007  Jean Delvare <khali@linux-fr.org>
5
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19     MA 02110-1301 USA.
20 */
21
22 #ifndef _I2CBUSSES_H
23 #define _I2CBUSSES_H
24
25 struct i2c_adap {
26         int nr;
27         char *name;
28         const char *funcs;
29         const char *algo;
30 };
31
32 struct i2c_adap *gather_i2c_busses(void);
33 void free_adapters(struct i2c_adap *adapters);
34
35 int lookup_i2c_bus(const char *i2cbus_arg);
36 int parse_i2c_address(const char *address_arg);
37 int open_i2c_dev(const int i2cbus, char *filename, const int quiet);
38 int set_slave_addr(int file, int address, int force);
39
40 #define MISSING_FUNC_FMT        "Error: Adapter does not have %s capability\n"
41
42 #endif
Note: See TracBrowser for help on using the browser.