diff options
author | nsouch <nsouch@FreeBSD.org> | 1999-01-09 18:08:24 +0000 |
---|---|---|
committer | nsouch <nsouch@FreeBSD.org> | 1999-01-09 18:08:24 +0000 |
commit | e670443158fa0f8567cc666000f1cf5819c156ca (patch) | |
tree | dc9371aa53218a6e6b09f54a5dd8c837e4342de9 /sys/dev/iicbus/iiconf.h | |
parent | 674988520c88d8bdd31977e29964f169a47a72b1 (diff) | |
download | FreeBSD-src-e670443158fa0f8567cc666000f1cf5819c156ca.zip FreeBSD-src-e670443158fa0f8567cc666000f1cf5819c156ca.tar.gz |
Change /dev/smb and /dev/iic interface to allow user programs to interact with
devices dynamically. That means,
+ only one /dev/iic or /dev/smb device for each smb/iic bus to access
+ I2C/SMB device address must be given to any ioctl
+ new devices may be plugged and accessed after boot, which was
impossible previously (device addresses were hardcoded into
the kernel)
Diffstat (limited to 'sys/dev/iicbus/iiconf.h')
-rw-r--r-- | sys/dev/iicbus/iiconf.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/iicbus/iiconf.h b/sys/dev/iicbus/iiconf.h index 874ecd4..0b548fb 100644 --- a/sys/dev/iicbus/iiconf.h +++ b/sys/dev/iicbus/iiconf.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: iiconf.h,v 1.1.1.1 1998/09/03 20:51:50 nsouch Exp $ + * $Id: iiconf.h,v 1.2 1998/10/31 11:31:07 nsouch Exp $ */ #ifndef __IICONF_H #define __IICONF_H @@ -108,17 +108,17 @@ extern int iicbus_null_callback(device_t, int, caddr_t); #define iicbus_repeated_start(bus,slave,timeout) \ (IICBUS_REPEATED_START(device_get_parent(bus), slave, timeout)) -#define iicbus_start(bus,slave,timeout) \ - (IICBUS_START(device_get_parent(bus), slave, timeout)) -#define iicbus_stop(bus) \ - (IICBUS_STOP(device_get_parent(bus))) #define iicbus_reset(bus,speed,addr,oldaddr) \ (IICBUS_RESET(device_get_parent(bus), speed, addr, oldaddr)) -#define iicbus_write(bus,buf,len,sent,timeout) \ - (IICBUS_WRITE(device_get_parent(bus), buf, len, sent, timeout)) -#define iicbus_read(bus,buf,len,sent,last,delay) \ - (IICBUS_READ(device_get_parent(bus), buf, len, sent, last, delay)) +/* basic I2C operations */ +extern int iicbus_started(device_t); +extern int iicbus_start(device_t, u_char, int); +extern int iicbus_stop(device_t); +extern int iicbus_write(device_t, char *, int, int *, int); +extern int iicbus_read(device_t, char *, int, int *, int, int); + +/* Read/write operations with start/stop conditions managed */ extern int iicbus_block_write(device_t, u_char, char *, int, int *); extern int iicbus_block_read(device_t, u_char, char *, int, int *); |