| | |
| | | #include "global_param.h" |
| | | #include "filters.h" |
| | | #include <stdio.h> |
| | | |
| | | #include "beep.h" |
| | | |
| | | |
| | | /*------------------------------------ Marcos ------------------------------------------*/ |
| | |
| | | /*------------------------------------ Variables ------------------------------------------*/ |
| | | /* Default communication configuration. We use here EVK1000's default mode (mode 3). */ |
| | | static dwt_config_t config = { |
| | | 5, /* Channel number. */ |
| | | 2, /* Channel number. */ |
| | | DWT_PRF_64M, /* Pulse repetition frequency. */ |
| | | DWT_PLEN_128, /* Preamble length. */ |
| | | DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */ |
| | |
| | | } |
| | | void Dw1000_App_Init(void) |
| | | { |
| | | // g_com_map[DEV_ID] = 0x02; |
| | | //g_com_map[DEV_ID] = 0x0b; |
| | | tx_poll_msg[MESSAGE_TYPE_IDX]=POLL; |
| | | tx_resp_msg[MESSAGE_TYPE_IDX]=RESPONSE; |
| | | tx_final_msg[MESSAGE_TYPE_IDX]=FINAL; |
| | |
| | | g_pairstart=0; |
| | | g_com_map[PAIR_ID]=tag_id_recv; |
| | | save_com_map_to_flash(); |
| | | BEEP2_ON; |
| | | delay_ms(1000); |
| | | printf("Pair Finish PairID: %d. \r\n",g_com_map[PAIR_ID]); |
| | | } |
| | | g_flag_Taggetdist[tag_id_recv]=0; |