#define MCLK_FREQ 1000000 // 此处填写实际时钟频率
//-----屏蔽硬件差异,对I2C的IO操作进行宏定义-----
#define I2C_CLK_HIGH P1DIR &=~BIT6;
#define I2C_CLK_LOW P1DIR |= BIT6; P1OUT &=~BIT6
#define I2C_DATA_HIGH P1DIR &=~BIT7
#define I2C_DATA_LOW P1DIR |= BIT7; P1OUT &=~BIT7
#define I2C_DATA_IN P1IN&BIT7
#define I2C_START Start()
#define I2C_STOP Stop()
//-----从机地址宏定义
#define SLAVE_ADDR 0x20 //填写实际的从机地址
#define SLAVE_ADDR_W SLAVE_ADDR