amiro-lld / drivers / DW1000 / v2 / decadriver / deca_param_types.h @ 22401187
History | View | Annotate | Download (2.146 KB)
1 | 22401187 | Thomas Schöpping | /*! ----------------------------------------------------------------------------
|
---|---|---|---|
2 | * @file deca_param_types.h
|
||
3 | * @brief Decawave general type definitions for configuration structures
|
||
4 | *
|
||
5 | * @attention
|
||
6 | *
|
||
7 | * Copyright 2013 (c) Decawave Ltd, Dublin, Ireland.
|
||
8 | *
|
||
9 | * All rights reserved.
|
||
10 | *
|
||
11 | */
|
||
12 | #ifndef _DECA_PARAM_TYPES_H_
|
||
13 | #define _DECA_PARAM_TYPES_H_
|
||
14 | |||
15 | #ifdef __cplusplus
|
||
16 | extern "C" { |
||
17 | #endif
|
||
18 | #include "deca_types.h" |
||
19 | |||
20 | #define NUM_BR 3 |
||
21 | #define NUM_PRF 2 |
||
22 | #define NUM_PACS 4 |
||
23 | #define NUM_BW 2 //2 bandwidths are supported |
||
24 | #define NUM_SFD 2 //supported number of SFDs - standard = 0, non-standard = 1 |
||
25 | #define NUM_CH 6 //supported channels are 1, 2, 3, 4, 5, 7 |
||
26 | #define NUM_CH_SUPPORTED 8 //supported channels are '0', 1, 2, 3, 4, 5, '6', 7 |
||
27 | #define PCODES 25 //supported preamble codes |
||
28 | |||
29 | |||
30 | typedef struct { |
||
31 | uint32 lo32; |
||
32 | uint16 target[NUM_PRF]; |
||
33 | } agc_cfg_struct ; |
||
34 | |||
35 | extern const agc_cfg_struct agc_config ; |
||
36 | |||
37 | //SFD threshold settings for 110k, 850k, 6.8Mb standard and non-standard
|
||
38 | extern const uint16 sftsh[NUM_BR][NUM_SFD]; |
||
39 | |||
40 | extern const uint16 dtune1[NUM_PRF]; |
||
41 | |||
42 | #define XMLPARAMS_VERSION (1.17f) |
||
43 | |||
44 | extern const uint32 fs_pll_cfg[NUM_CH]; |
||
45 | extern const uint8 fs_pll_tune[NUM_CH]; |
||
46 | extern const uint8 rx_config[NUM_BW]; |
||
47 | extern const uint32 tx_config[NUM_CH]; |
||
48 | extern const uint8 dwnsSFDlen[NUM_BR]; //length of SFD for each of the bitrates |
||
49 | extern const uint32 digital_bb_config[NUM_PRF][NUM_PACS]; |
||
50 | extern const uint8 chan_idx[NUM_CH_SUPPORTED]; |
||
51 | |||
52 | #define TEMP_COMP_FACTOR_CH2 (327) //(INT) (0.0798 * 4096) |
||
53 | #define TEMP_COMP_FACTOR_CH5 (607) //(INT) (0.1482 * 4096) |
||
54 | #define SAR_TEMP_TO_CELCIUS_CONV (1.14) |
||
55 | #define SAR_VBAT_TO_VOLT_CONV (1.0/173) |
||
56 | |||
57 | #define DCELCIUS_TO_SAR_TEMP_CONV ((int)((0.10/1.14)*256)) |
||
58 | #define MVOLT_TO_SAR_VBAT_CONV (173.0/1000) |
||
59 | |||
60 | #define MIXER_GAIN_STEP (0.5) |
||
61 | #define DA_ATTN_STEP (2.5) |
||
62 | |||
63 | #define MIX_DA_FACTOR (DA_ATTN_STEP/MIXER_GAIN_STEP)
|
||
64 | |||
65 | #define PEAK_MULTPLIER (0x60) //3 -> (0x3 * 32) & 0x00E0 |
||
66 | #define N_STD_FACTOR (13) |
||
67 | #define LDE_PARAM1 (PEAK_MULTPLIER | N_STD_FACTOR)
|
||
68 | |||
69 | #define LDE_PARAM3_16 (0x1607) |
||
70 | #define LDE_PARAM3_64 (0x0607) |
||
71 | |||
72 | extern const uint16 lde_replicaCoeff[PCODES]; |
||
73 | |||
74 | #ifdef __cplusplus
|
||
75 | } |
||
76 | #endif
|
||
77 | |||
78 | #endif
|
||
79 |