Skip to content

IIC接收应答冗余 #2

Description

@YONG-UNO

int IIC_WaitAck(void)
{
uint16_t Out_Time=1000;

IIC_SDA_H(); //  可以删除
IIC_SDA_In();
IIC_Delay(1);
IIC_SCL_H();
IIC_Delay(1);
while(IIC_SDA_Read())
{
	if(--Out_Time)
	{
		IIC_Stop();
        return 0xff;
	}
}
IIC_SCL_L();
return 0;

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions