Files
lm-sensors/i2c/algo-bit.h
T
Frodo Looijaard 11e88380d5 The basic directory structure for lmsensors2.
README.directories contains a description of the directories I created;
  read it if you have questions about them.
doc/design is the design document I sent before through email.
doc/useful_addresses.html contains links to I2C, SMBus and sensors
  information.

Note that we may have to change minor i2c things, like Makefiles; this
is why I put it in the archive too (we should, of course, send important
changes to Simon Vogl).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3 7894878c-1315-0410-8ee3-d5d059ff63e0
1998-11-02 20:29:28 +00:00

39 lines
1.0 KiB
C

#ifndef ALGO_BIT_H
#define AGLO_BIT_H 1
/* --- Defines for bit-adapters --------------------------------------- */
#include "i2c.h"
/*
* This struct contains the hw-dependent functions of bit-style adapters to
* manipulate the line states, and to init any hw-specific features. This is
* only used if you have more than one hw-type of adapter running.
*/
struct bit_adapter {
char name[32]; /* give it a nice name */
unsigned int id; /* not used yet, maybe later */
void *data; /* private data for lolevel routines */
void (*setsda) (void *data, int state);
void (*setscl) (void *data, int state);
int (*getsda) (void *data);
int (*getscl) (void *data);
/* administrative calls */
int (*client_register)(struct i2c_client *);
int (*client_unregister)(struct i2c_client *);
/* local settings */
int udelay;
int mdelay;
int timeout;
};
extern struct bit_adapter *bit_adaps[];
#define BIT_ADAP_MAX 16
int i2c_bit_add_bus(struct bit_adapter *);
int i2c_bit_del_bus(struct bit_adapter *);
#endif /* ALGO_BIT_H */