home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lxapi32.zip / Include / Linux / i2c-algo-bit.h < prev    next >
C/C++ Source or Header  |  2002-04-26  |  1KB  |  54 lines

  1. /* $Id: i2c-algo-bit.h,v 1.2 2002/04/26 23:09:05 smilcke Exp $ */
  2.  
  3. /*
  4.  * i2c-algo-bit.h
  5.  * Autor:               Stefan Milcke
  6.  * Erstellt am:         12.10.2001
  7.  * Letzte Aenderung am: 12.01.2002
  8.  *
  9. */
  10.  
  11. #ifndef I2CALGOB_H_INCLUDED
  12. #define I2CALGOB_H_INCLUDED
  13.  
  14. #include "i2c.h"
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. /* --- Defines for bit-adapters ---------------------------------------    */
  21. /*
  22.  * This struct contains the hw-dependent functions of bit-style adapters to
  23.  * manipulate the line states, and to init any hw-specific features. This is
  24.  * only used if you have more than one hw-type of adapter running.
  25.  */
  26. struct i2c_algo_bit_data {
  27.     void *data;        /* private data for lowlevel routines */
  28.     void (*setsda) (void *data, int state);
  29.     void (*setscl) (void *data, int state);
  30.     int  (*getsda) (void *data);
  31.     int  (*getscl) (void *data);
  32.  
  33.     /* local settings */
  34.     int udelay;
  35.     int mdelay;
  36.     int timeout;
  37. };
  38.  
  39. #define I2C_BIT_ADAP_MAX    16
  40.  
  41. #if (defined(TARGET_OS2) && !defined(NOOS2LXAPI))
  42. extern int (*i2c_bit_add_bus)(struct i2c_adapter *);
  43. extern int (*i2c_bit_del_bus)(struct i2c_adapter *);
  44. #else
  45. int i2c_bit_add_bus(struct i2c_adapter *);
  46. int i2c_bit_del_bus(struct i2c_adapter *);
  47. #endif
  48.  
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52.  
  53. #endif //I2CALGOB_H_INCLUDED
  54.