i2c.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  *   i2c.h:  Header file for Philips LPC214x Family Microprocessors
00003  *
00004  *   Copyright(C) 2006, Philips Semiconductor
00005  *   All rights reserved.
00006  *
00007  *   History
00008  *   2005.10.01  ver 1.00    Prelimnary version, first Release
00009  *   Modifications from Ascending Technologies GmbH
00010  *
00011 ******************************************************************************/
00012 #ifndef __I2C_H 
00013 #define __I2C_H
00014 
00015 #define BUFSIZE                 0x20
00016 #define MAX_TIMEOUT             0x00FFFFFF
00017 
00018 #define I2CMASTER               0x01
00019 #define I2CSLAVE                0x02
00020 
00021 /* For more info, read Philips's SE95 datasheet */
00022 #define SE95_ADDR               0x9E
00023 #define SE95_ID                 0x05
00024 #define SE95_CONFIG             0x01
00025 #define SE95_TEMP               0x00
00026 #define RD_BIT                  0x01
00027 
00028 #define GET_DEVICE_ID           0x01
00029 #define GET_TEMPERATURE         0x02
00030 #define SET_CONFIGURATION       0x03
00031 
00032 #define I2C_IDLE                0
00033 #define I2C_STARTED             1
00034 #define I2C_RESTARTED           2
00035 #define I2C_REPEATED_START      3
00036 #define DATA_ACK                4
00037 #define DATA_NACK               5
00038 
00039 #define I2CONSET_I2EN           0x00000040  /* I2C Control Set Register */
00040 #define I2CONSET_AA             0x00000004
00041 #define I2CONSET_SI             0x00000008
00042 #define I2CONSET_STO            0x00000010
00043 #define I2CONSET_STA            0x00000020
00044 
00045 #define I2CONCLR_AAC            0x00000004  /* I2C Control clear Register */
00046 #define I2CONCLR_SIC            0x00000008
00047 #define I2CONCLR_STAC           0x00000020
00048 #define I2CONCLR_I2ENC          0x00000040
00049 
00050 #define I2DAT_I2C               0x00000000  /* I2C Data Reg */
00051 #define I2ADR_I2C               0x00000000  /* I2C Slave Address Reg */
00052 #define I2SCLH_SCLH             0x00000080  /* I2C SCL Duty Cycle High Reg */
00053 #define I2SCLL_SCLL             0x00000080  /* I2C SCL Duty Cycle Low Reg */
00054 
00055 extern void I2CInit( unsigned int I2cMode );
00056 extern unsigned int I2CStart( void );
00057 extern unsigned int I2CStop( void );
00058 extern unsigned int I2CEngine( void );
00059 extern void I2C0_send_motordata(void);
00060 extern void I2C0MasterHandler(void);
00061 
00062 #endif /* end __I2C_H */
00063 /****************************************************************************
00064 **                            End Of File
00065 *****************************************************************************/


asctec_hl_firmware
Author(s): Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
autogenerated on Tue Jan 7 2014 11:05:19