projekty/Source/example1/src/include/lpc2100/lpc2100/lpcI2C.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * $RCSfile: $
00004  * $Revision: $
00005  *
00006  * Header file for Philips LPC ARM Processors.
00007  * Copyright 2004 R O SoftWare
00008  *
00009  * No guarantees, warrantees, or promises, implied or otherwise.
00010  * May be used for hobby or commercial purposes provided copyright
00011  * notice remains intact.
00012  *
00013  *****************************************************************************/
00014 #ifndef INC_LPC_I2C_H
00015 #define INC_LPC_I2C_H
00016 
00017 // I2C Interface Registers
00018 typedef struct
00019 {
00020   REG_8 conset;                         // Control Set Register
00021   REG_8 _pad0[3];
00022   REG_8 stat;                           // Status Register
00023   REG_8 _pad1[3];
00024   REG_8 dat;                            // Data Register
00025   REG_8 _pad2[3];
00026   REG_8 adr;                            // Slave Address Register
00027   REG_8 _pad3[3];
00028   REG16 sclh;                           // SCL Duty Cycle Register (high half word)
00029   REG16 _pad4;
00030   REG16 scll;                           // SCL Duty Cycle Register (low half word)
00031   REG16 _pad5;
00032   REG_8 conclr;                         // Control Clear Register
00033   REG_8 _pad6[3];
00034 } i2cRegs_t;
00035 
00036 // I2CONSET Register Bit Definitions
00037 #define I2CON_I2EN  (1 << 6)            // I2C Enable
00038 #define I2CON_STA   (1 << 5)            // START flag
00039 #define I2CON_STO   (1 << 4)            // STOP flag
00040 #define I2CON_SI    (1 << 3)            // I2C Interrupt flag
00041 #define I2CON_AA    (1 << 2)            // Assert Acknowlege flag
00042 
00043 // I2CONCLR Register Bit Definitions
00044 #define I2CON_I2ENC (1 << 6)            // I2C Enable Clear
00045 #define I2CON_STAC  (1 << 5)            // START Clear
00046 #define I2CON_SIC   (1 << 3)            // I2C Interrupt Clear
00047 #define I2CON_AAC   (1 << 2)            // Assert Acknowlege Clear
00048 
00049 #endif

Generated on Fri Sep 21 13:41:54 2007 for example1 by  doxygen 1.4.7