Nife version Beta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
1.3 KiB

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