00001 /* src_experimental/drivers/i2c/digital.h 00002 CubeOS Version 0.4.90 experimental 00003 Copyright (C) 1999,2000 Holger Kenn 00004 00005 CubeOS is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or any later version. 00009 00010 CubeOS is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 */ 00016 #ifndef _DIGITAL_H 00017 #define _DIGITAL_H 00018 00023 #define MAXI2CMESSLENGTH 8 00024 00029 struct _I2C_bin_datas 00030 { 00031 char bus; 00032 char address; 00033 char status; 00034 char active; 00035 }; 00036 00037 extern struct _I2C_bin_datas _I2C_bin_data[32]; 00038 extern unsigned char _I2C_digital_mbuf[MAXI2CMESSLENGTH]; 00039 extern struct i2cmess _I2C_digital_m; 00040 extern int _I2C_binnum; 00041 00042 unsigned char I2C_ReadBinIn(int chip); 00043 int I2C_WriteBinOut(int chip,unsigned char value); 00044 00045 int I2C_init_digital(); 00046 00047 #endif