| | |
| | | u16 tag_recv_timer, tag_timer,last_polltime; |
| | | extern uint16_t g_Resttimer,heartbeat_timer,sync_timer; |
| | | extern uint8_t g_pairstart; |
| | | u8 neartimout_timer=0,flag_syncbase=0; |
| | | u8 neartimout_timer=0,flag_syncbase=0,flag_newsecond=0; |
| | | extern u16 tyncpoll_time; |
| | | extern uint32_t synclost_timer,current_syncid; |
| | | void TIM3_IRQHandler(void) //TIM3?? |
| | |
| | | if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET) //??TIM3???????? |
| | | { |
| | | TIM_ClearITPendingBit(TIM3, TIM_IT_Update ); //??TIMx?????? |
| | | |
| | | main_logic(); |
| | | time32_incr++; |
| | | heartbeat_timer++; |
| | | sync_timer++; |
| | | neartimout_timer++; |
| | | synclost_timer++; |
| | | GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_RESET); |
| | | //GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_RESET); |
| | | if(sync_timer>=1000) |
| | | { |
| | | GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_SET); |
| | | flag_newsecond=1; |
| | | //GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_SET); |
| | | sync_timer=0; |
| | | TagListUpdate(); |
| | | } |
| | |
| | | { |
| | | if(sync_timer%g_com_map[COM_INTERVAL]==tyncpoll_time&&sync_timer<990&&sync_timer!=last_polltime) |
| | | { |
| | | g_start_send_flag=1; |
| | | // g_start_send_flag=1; |
| | | } |
| | | } |
| | | |