| | |
| | | volatile uint32_t time32_incr; |
| | | uint8_t tt=0; |
| | | uint8_t g_start_send_flag = 0,sync_seq=0,usart_send_flag; |
| | | u16 usart_timer=0; |
| | | u16 usart_timer=0,pollsendtimer=0; |
| | | uint16_t sysscal; |
| | | u16 tag_recv_timer, tag_timer,last_polltime,userdata_timer; |
| | | extern uint16_t g_Resttimer,heartbeat_timer,sync_timer; |
| | |
| | | heartbeat_timer++; |
| | | sync_timer++; |
| | | neartimout_timer++; |
| | | synclost_timer++; |
| | | synclost_timer++; |
| | | if(g_com_map[DEV_ROLE]||g_com_map[ANC_POLL]) |
| | | { |
| | | if(pollsendtimer++>=g_com_map[COM_INTERVAL]) |
| | | { |
| | | pollsendtimer = 0; |
| | | g_start_send_flag = 1; |
| | | } |
| | | } |
| | | //GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_RESET); |
| | | if(sync_timer>=1000) |
| | | { |
| | |
| | | { |
| | | if(sync_timer==target_time) |
| | | { |
| | | g_start_send_flag=1; |
| | | // g_start_send_flag=1; |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | last_polltime=sync_timer; |
| | | // GPIO_WriteBit(GPIOA, GPIO_Pin_9, Bit_SET); |
| | | g_start_send_flag=1; |
| | | // g_start_send_flag=1; |
| | | } |
| | | |
| | | } |