求救高手-有酬谢!!!
while(stream_count <= 2)
{ 这是在德国一个网上下载的一段代码:
难点是下面的问号好冒号,代表什么符号。
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; 问号 冒号
// 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)
{ 正确判定者有酬谢!!!
|