| | |
| | | } |
| | | } |
| | | } |
| | | extern void FZNearPoll(void); |
| | | u32 id,error_times=0; |
| | | |
| | | u8 ttt = 1; |
| | | extern float Height; |
| | | void Tag_App(void)//发送模式(TAG标签) |
| | | void UWBWkWp(void) |
| | | { |
| | | static uint8_t diccount = 0; |
| | | //LED0_ON; |
| | | SPIx_CS_GPIO->BRR = SPIx_CS; |
| | | delay_us(700); |
| | | SPIx_CS_GPIO->BSRR = SPIx_CS; |
| | | id = dwt_readdevid() ; |
| | | |
| | | while (DWT_DEVICE_ID != id) |
| | | { |
| | | // Dw1000_Init(); |
| | |
| | | } |
| | | } |
| | | error_times = 0; |
| | | } |
| | | void Tag_App(void)//发送模式(TAG标签) |
| | | { |
| | | static uint8_t diccount = 0,diccount2; |
| | | //LED0_ON; |
| | | UWBWkWp(); |
| | | if(0) |
| | | { |
| | | FZNearPoll(); |
| | | }else{ |
| | | switch(tag_state) |
| | | { |
| | | case REGPOLL: |
| | |
| | | case SINGLEPOLL: |
| | | // Poll(); |
| | | break; |
| | | } |
| | | FZNearPoll(); |
| | | }} |
| | | |
| | | FZNearPoll(); |
| | | |
| | | dwt_forcetrxoff(); |
| | | userkey_state = !GET_USERKEY; |
| | | dwt_entersleep(); |
| | | } |