⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lpc_lib_iic.h

📁 使用embest IDE开发工具开发的基于LPC2294 的触摸屏开发
💻 H
字号:
/*
**********************************************************************************************
*
*     		  Embest Info&Tech Co., Ltd.  All rights reserved.
*                   		  www.embedinfo.com
*			
*file:     		xxx.c/xxx.h 
*author:   		embest 
*establish: 	2006.xx.xx
*modify:		xx
*notes:			xx
**********************************************************************************************
*/
/*
**********************************************************************************************
*                                      compiler condition 
**********************************************************************************************
*/
#ifndef lpc_lib_IIC
 #define lpc_lib_IIC
/*
**********************************************************************************************
*                                       include files
**********************************************************************************************
*/
#include	"..\..\com\type_redefine.h"
#include	"..\..\com\lpc22xx_register.h"
#include 	"..\..\com\lpc_lib_pll\lpc_lib_pll.h"
#include 	"..\..\com\lpc_lib_spi\lpc_lib_spi.h"
#include	"..\..\com\22eb06_lib_modulecontrol\22eb06_lib_modulecontrol.h"
#include	"..\..\com\lpc_lib_LCD\lpc_lib_LCD.h"
/*
**********************************************************************************************
*                                   constant define 
**********************************************************************************************
*/
#define 	P0_IIC_PINSEL0_EN	(0x05<<4)
#define 	P0_IIC_PINSEL0_MASK (0x0f<<4)

#define 	I2CONSET_AA 	(0x1<<2)
#define 	I2CONSET_SI 	(0x1<<3)
#define 	I2CONSET_STO 	(0x1<<4)
#define 	I2CONSET_STA	(0x1<<5)
#define 	I2CONSET_I2EN	(0x1<<6)

#define 	I2CONCLR_AAD 	(0x1<<2)
#define 	I2CONCLR_SIC 	(0x1<<3)
#define 	I2CONCLR_STAC	(0x1<<5)
#define 	I2CONCLR_I2ENC 	(0x1<<6)

#define		SCLL	50
#define 	SCLH 	50
/*
**********************************************************************************************
*                               extern function/variable declare
**********************************************************************************************
*/

/*
**********************************************************************************************
*                                   function declare  
**********************************************************************************************
*/

void IIC_init(void);
void Wr24C02(INT8U Deaddr,INT8U addr,INT8U data);
void Rd24C02(INT8U Deaddr,INT8U addr, INT8U *data);
void IIC_close(void);

#endif








⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -