How Flowcode to rewrite the following C program?
http://embedded-lab.com/blog/?p=4333
The most important part of the program:
Code: Select all
unsigned short ReadByte(){
unsigned short num = 0, t;
DataDir = 1;
for (i=0; i<8; i++){
while(!Data);
Delay_us(40);
if(Data) num |= 1<<(7-i);
while(Data);
}
return num;
}