"Fossies" - the Fresh Open Source Software Archive

Member "i2c-tools-4.3/tools/i2cbusses.h" (22 Jul 2021, 1395 Bytes) of package /linux/misc/i2c-tools-4.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "i2cbusses.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 4.0_vs_4.1.

    1 /*
    2     i2cbusses.h - Part of the i2c-tools package
    3 
    4     Copyright (C) 2004-2010  Jean Delvare <jdelvare@suse.de>
    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 #include <unistd.h>
   26 
   27 struct i2c_adap {
   28     int nr;
   29     char *name;
   30     const char *funcs;
   31     const char *algo;
   32 };
   33 
   34 struct i2c_adap *gather_i2c_busses(void);
   35 void free_adapters(struct i2c_adap *adapters);
   36 
   37 int lookup_i2c_bus(const char *i2cbus_arg);
   38 int parse_i2c_address(const char *address_arg, int all_addrs);
   39 int open_i2c_dev(int i2cbus, char *filename, size_t size, int quiet);
   40 int set_slave_addr(int file, int address, int force);
   41 
   42 #define MISSING_FUNC_FMT    "Error: Adapter does not have %s capability\n"
   43 
   44 #endif