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/i386/include/iic.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/i386/include/iic.h')
-rw-r--r-- | sys/i386/include/iic.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/i386/include/iic.h b/sys/i386/include/iic.h index 1744326..6649821 100644 --- a/sys/i386/include/iic.h +++ b/sys/i386/include/iic.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: iic.h,v 1.1.2.1 1998/07/17 00:54:01 son Exp $ + * $Id: iic.h,v 1.1 1998/09/03 21:00:08 nsouch Exp $ * */ #ifndef __IIC_H @@ -31,10 +31,17 @@ #include <sys/ioccom.h> -#define I2CSTART _IO('i', 1) /* start condition */ -#define I2CSTOP _IO('i', 2) /* stop condition */ -#define I2CADDRESS _IOW('i', 3, long) /* address bus */ -#define I2CRSTCARD _IOW('i', 4, long) /* reset the card */ +struct iiccmd { + u_char slave; + int count; + int last; + char *buf; +}; -#endif +#define I2CSTART _IOW('i', 1, struct iiccmd) /* start condition */ +#define I2CSTOP _IO('i', 2) /* stop condition */ +#define I2CRSTCARD _IOW('i', 3, struct iiccmd) /* reset the card */ +#define I2CWRITE _IOW('i', 4, struct iiccmd) /* send data */ +#define I2CREAD _IOW('i', 5, struct iiccmd) /* receive data */ +#endif |