求救高手-有酬謝!!!
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)
{ 正確判定者有酬謝!!!
|