extern void transmitFunc(void)
{
int w = 0;
int i;
// IIC_Flag = 1;
Counter1 = 2;
while(Counter1)
{
if (IIC_Free_Flag == 0)
{
IIC_Free_Flag = 1;
break;
}
}
IIC_flag_receive_finish = 0;
IIC_Tx_Num = 0;
I2C_config(&Config);
I2C_RSET(I2CSAR,IIC_Address);
I2C_RSET(I2CCNT,master_transmit_number); //设置发送数据的个数
w = I2C_RGET(I2CSTR)&(0x1000);
if(w==0)//总线空闲
{
I2C_start();
}
else
{
I2C_reset();
for(i=0;i<500;i++);
w = I2C_RGET(I2CSTR)&(0x1000);
if(w==0)
I2C_start();
else;
}
}
w = I2C_RGET(I2CSTR)&(0x1000); 这句话什么意思,程序运行时一直是4096,我想让 w=0 进入空闲状态
I2C_RGET(I2CSTR)什么意思求大神解答,谢谢!! |