?? lpci2c.h
字號:
/******************************************************************************
*
* $RCSfile: $
* $Revision: $
*
* Header file for Philips LPC ARM Processors.
* Copyright 2004 R O SoftWare
*
* No guarantees, warrantees, or promises, implied or otherwise.
* May be used for hobby or commercial purposes provided copyright
* notice remains intact.
*
*****************************************************************************/
#ifndef INC_LPC_I2C_H
#define INC_LPC_I2C_H
// I2C Interface Registers
typedef struct
{
REG_8 conset; // Control Set Register
REG_8 _pad0[3];
REG_8 stat; // Status Register
REG_8 _pad1[3];
REG_8 dat; // Data Register
REG_8 _pad2[3];
REG_8 adr; // Slave Address Register
REG_8 _pad3[3];
REG16 sclh; // SCL Duty Cycle Register (high half word)
REG16 _pad4;
REG16 scll; // SCL Duty Cycle Register (low half word)
REG16 _pad5;
REG_8 conclr; // Control Clear Register
REG_8 _pad6[3];
} i2cRegs_t;
// I2CONSET Register Bit Definitions
#define I2CON_I2EN (1 << 6) // I2C Enable
#define I2CON_STA (1 << 5) // START flag
#define I2CON_STO (1 << 4) // STOP flag
#define I2CON_SI (1 << 3) // I2C Interrupt flag
#define I2CON_AA (1 << 2) // Assert Acknowlege flag
// I2CONCLR Register Bit Definitions
#define I2CON_I2ENC (1 << 6) // I2C Enable Clear
#define I2CON_STAC (1 << 5) // START Clear
#define I2CON_SIC (1 << 3) // I2C Interrupt Clear
#define I2CON_AAC (1 << 2) // Assert Acknowlege Clear
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -