求救高手-有酬謝。。
while(stream_count <= 2)
{ 這是在德國(guó)一個(gè)網(wǎng)上下載的一段代碼:
難點(diǎn)是下面的問號(hào)好冒號(hào),代表什么符號(hào)。
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; 問號(hào) 冒號(hào)
// 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)
{ 正確判定者有酬謝。!
|