📄 twowire.h
字号:
#ifndef __TWOWIREPARMS_H__
#define __TWOWIREPARMS_H__
uCHAR I2CWriteByte (uCHAR cDevAddr, uCHAR cReg, uCHAR cData);
uCHAR I2CReadByte (uCHAR cDevAddr, uCHAR cReg);
uCHAR twdWr_Burst_A (uCHAR cReg);
void twdWr_Burst_D (uCHAR cReg);
void twdWr_Burst_P (void);
void twdDelay (uWORD wLoops);
void twdDelay1 (uWORD wLoops);
void OSDCfgWr(uCHAR index,uCHAR dat);
sbit SDA = P1^7;//P2^7;
sbit SCL = P1^6;//P2^6;
//sbit P_SCK=P1^6;
//sbit P_SDA=P1^7;
#define Set_SDA2High SDA = 1
#define Set_SDA2Low SDA = 0
#define Set_SCL2High SCL = 1
#define Set_SCL2Low SCL = 0
#define Set_SDA_High SDA = 1,SDA = 1
#define Set_SDA_Low SDA = 0,SDA = 0
#define Set_SCL_High SCL = 1,SCL = 1
#define Set_SCL_Low SCL = 0,SCL = 0
#define SDA_High SDA!=0
#define SDA_Low SDA==0
#define SCL_High SCL!=0
#define SCL_Low SCL==0
#define TWD_SPEED 0x01
#define TWD_LONG_TIME (TWD_SPEED*10)//8
#define TWD_SHORT_TIME (TWD_SPEED*4)//2
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -