| | |
| | | //GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_RESET); |
| | | if(sync_timer>=1000) |
| | | { |
| | | if(pwtag.remain_time>0) |
| | | {pwtag.remain_time--;} |
| | | flag_newsecond=1; |
| | | //GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_SET); |
| | | sync_timer=0; |
| | | TagListUpdate(); |
| | | } |
| | | |
| | | if(g_Resttimer++>2000) |
| | | if(g_Resttimer++>12000) |
| | | { |
| | | // NVIC_SystemReset(); |
| | | NVIC_SystemReset(); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | #ifdef USART_INTEGRATE_OUTPUT |
| | | if(sync_timer==target_time) |
| | | if(sync_timer%g_com_map[COM_INTERVAL]==0) |
| | | { |
| | | |
| | | usart_send_flag=1; |
| | |
| | | } |
| | | if(synclost_timer>SYNCLOST_TIME) |
| | | { |
| | | //flag_syncbase=1; |
| | | flag_syncbase=1; |
| | | } |
| | | |
| | | if(flag_syncbase) //鏈ā鍧楁槸鍚屾鍩虹珯 |
| | |
| | | }else{ //鏍囩鍚屾澶勭悊 |
| | | if(sync_timer==target_time) |
| | | { |
| | | |
| | | last_polltime=sync_timer; |
| | | // GPIO_WriteBit(GPIOA, GPIO_Pin_9, Bit_SET); |
| | | g_start_send_flag=1; |