home *** CD-ROM | disk | FTP | other *** search
- {$if not def I2C_LIB_H} CONST I2C_LIB_H=0;
-
- { **********************************************
- ** KickPascal-Include-Datei "i2c.lib" V39.2 **
- ********************************************** }
-
- VAR I2CBase : Ptr;
-
- LIBRARY I2CBase :
- -30 : FUNCTION AllocI2C(D0: Byte; A1: Str): Byte;
- -36 : PROCEDURE FreeI2C;
- -42 : FUNCTION SetI2CDelay(D0: Long): Long;
- -48 : PROCEDURE InitI2C;
- -54 : FUNCTION SendI2C(D0: Byte; D1: Word; A1: Ptr): Long;
- -60 : FUNCTION ReceiveI2C(D0: Byte; D1: Word; A1: Ptr): Long;
- { V38+: }
- -66 : FUNCTION GetI2COpponent: Str;
- { V39+: }
- -72 : FUNCTION I2CErrText(D0: Long): Str;
- -78 : PROCEDURE ShutDownI2C;
- -84 : FUNCTION BringBackI2C: Byte;
- END;
-
- CONST
- { types of delay on SCL: }
- DELAY_TIMER = 1;
- DELAY_LOOP = 2;
- { magic delay value: }
- I2CDELAY_READONLY = -1;
- { allocation errors: }
- I2C_OK = 0;
- I2C_PORT_BUSY = 1;
- I2C_BITS_BUSY = 2;
- I2C_NO_MISC_RESOURCE = 3;
- I2C_ERROR_PORT = 4;
- I2C_ACTIVE = 5;
- I2C_NO_TIMER = 6;
- { I/O errors: }
- {I2C_OK = 0;}
- I2C_REJECT = 1;
- I2C_NO_REPLY = 2;
- SDA_TRASHED = 3;
- SDA_LO = 4;
- SDA_HI = 5;
- SCL_TIMEOUT = 6;
- SCL_HI = 7;
- I2C_HARDW_BUSY = 8;
-
- {$endif}
-