#ifndef __DW_APP_H__
|
#define __DW_APP_H__
|
#include "stdint.h"
|
void SetANCTimestap(uint8_t i,uint8_t* pollrx,uint8_t* resptx,uint32_t resprx,uint8_t* distoffset,int32_t anc_clockoffset);
|
void CalculateDists(int64_t poll_tx_ts);
|
typedef enum
|
{ UN_BIND=0,
|
LINK_SUCCESS,
|
SEARCH_DEV,
|
} Operation_step;
|
#define MBX_RESPONSE 0x21
|
#define MBX_POLL 0x20
|
#define MBX_RESPONSE 0x21
|
#define MBX_FINAL 0x22
|
#define MBX_PRAAREPLY 0x23
|
#define MBX_REG 0x24
|
#define MESSAGE_TYPE_IDX 9
|
#define TAG_ID_IDX 5
|
#define GROUP_ID_IDX 0
|
#define ANCHOR_ID_IDX 1
|
#define MAX_NEARBASE_NUM 25
|
#define KEEP_TIMES 5
|
#define TAG_NUM_IN_SYS 25
|
#define FZ_NEARBASENUM_INDEX 10
|
#define FZ_NEARBASEID_INDEX 11
|
#define ANC_MAX_NUM 50
|
|
#define DIST_IDX 10
|
#define SEQUENCE_IDX 3
|
#define BATTARY_IDX 4
|
//NEAR POLL
|
#define RESP_MSG_POLL_RX_TS_IDX 26
|
#define RESP_MSG_RESP_TX_TS_IDX 30
|
#define RESP_MSG_ANC_DISTOFFSET 34
|
|
#define TAG_KEEPTIMES 20 //±êÇ©´æ»îʱ¼ä
|
#define MAX_TAG_LIST_NUM 200 //ͬʱͨѶ±êÇ©×î´óÊýÁ¿
|
|
#define FREQ_OFFSET_MULTIPLIER (998.4e6/2.0/1024.0/131072.0)
|
#define FREQ_OFFSET_MULTIPLIER_110KB (998.4e6/2.0/8192.0/131072.0)
|
|
#define HERTZ_TO_PPM_MULTIPLIER_CHAN_1 (-1.0e6/3494.4e6)
|
#define HERTZ_TO_PPM_MULTIPLIER_CHAN_2 (-1.0e6/3993.6e6)
|
#define HERTZ_TO_PPM_MULTIPLIER_CHAN_3 (-1.0e6/4492.8e6)
|
#define HERTZ_TO_PPM_MULTIPLIER_CHAN_5 (-1.0e6/6489.6e6)
|
#endif
|