ȸ-гx
while(stream_count <= 2)
{ @ڵһ(g)W(wng)dһδa
yc(din)Ć(wn)̖ð̖ʲô̖
while(hit_count<4)
{
//Timeout_ctr is set 25 ms ONLY for the time between downstream and upstreammeas.
// Else itis set 4 ms to wait for the possible timeout for first interrupt (first hit)
timeout_counter= ( (upstream==1) && (hit_count==1) ) ? TWENTY_MILLISE CONDS_TIMEOUT :FOUR_MILLISECONDS_TIMEOUT; (wn)̖ ð̖
// Waitingfor timeout of 4ms only on first hit, else wait for interrupt
while ((GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_9)==1) &&
(timeout_counter!=0)
)
{if(hit_count==1) timeout_counter--;
}
switch(hit_count)
{ _жгx
|