| | |
| | | |
| | | if(tag_timer++>=g_com_map[COM_INTERVAL]) |
| | | {tag_timer=0;} |
| | | if(g_Resttimer++>2000) |
| | | if(g_Resttimer++>10000) |
| | | { |
| | | NVIC_SystemReset(); |
| | | } |
| | |
| | | if(!g_com_map[DEV_ROLE]) //鍩虹珯 |
| | | { |
| | | tag_recv_timer++; |
| | | TagDistClear(); |
| | | // TagDistClear(); |
| | | if(g_com_map[ANC_POLL]) |
| | | { |
| | | if((sync_timer-10)%g_com_map[COM_INTERVAL]==tyncpoll_time&&sync_timer>=10&&sync_timer!=1010) |
| | |
| | | } |
| | | } |
| | | // if(g_com_map[ALARM_DEV]!=0) |
| | | main_logic(); |
| | | //main_logic(); |
| | | if(sync_timer==10) |
| | | { |
| | | GPIO_WriteBit(GPIOA, GPIO_Pin_9, Bit_SET); |
| | |
| | | // } |
| | | |
| | | } |
| | | void HardFault_Handler(void) |
| | | { |
| | | |
| | | while(1) |
| | | { |
| | | NVIC_SystemReset(); |
| | | } |
| | | } |