| | |
| | | DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */ |
| | | 9, /* TX preamble code. Used in TX only. */ |
| | | 9, /* RX preamble code. Used in RX only. */ |
| | | 0, /* Use non-standard SFD (Boolean) */ |
| | | 1, /* Use non-standard SFD (Boolean) */ |
| | | DWT_BR_6M8, /* Data rate. */ |
| | | DWT_PHRMODE_STD, /* PHY header mode. */ |
| | | (129 + 8 - 8) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */ |
| | |
| | | last_nearbase_num=next_nearbase_num; |
| | | nearbase_num=next_nearbase_num; |
| | | recbase_num=0; |
| | | motor_state=0; |
| | | // motor_state=0; |
| | | |
| | | tx_near_msg[BATTARY_IDX] = bat_percent; |
| | | tx_near_msg[BUTTON_IDX] = !GET_USERKEY|stationary_flag<<1; |
| | |
| | | } |
| | | // dwt_write32bitreg(SYS_STATUS_ID,SYS_STATUS_RXFCG| SYS_STATUS_ALL_RX_ERR); |
| | | } |
| | | if(mainbase_lost_count>tag_frequency*BASELOST_STOPMOTOR_TIME) |
| | | {motor_state=0; } |
| | | dwt_write32bitreg(SYS_STATUS_ID,SYS_STATUS_RXFCG| SYS_STATUS_ALL_RX_ERR); |
| | | nearbase_num=recbase_num; |
| | | j=0; |
| | |
| | | tyncpoll_time = (tagslotpos--%max_slotpos)*slottime; |
| | | } |
| | | } |
| | | |
| | | u32 id; |
| | | void Tag_App(void)//发送模式(TAG标签) |
| | | { |
| | | u32 id; |
| | | |
| | | //LED0_ON; |
| | | id = dwt_readdevid() ; |
| | | while (DWT_DEVICE_ID != id) |