Loading...
Searching...
No Matches
uwb_dw1000_config.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Inria
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
21
22#include "dw1000/dw1000_regs.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
37#ifndef CONFIG_DW1000_ROLE_DEFAULT
38#define CONFIG_DW1000_ROLE_DEFAULT 0x0
39#endif
40
44#ifndef CONFIG_DW1000_NSFD_DEFAULT
45#define CONFIG_DW1000_NSFD_DEFAULT 8
46#endif
47
51#ifndef CONFIG_DW1000_NSYNC_DEFAULT
52#define CONFIG_DW1000_NSYNC_DEFAULT 128
53#endif
54
58#ifndef CONFIG_DW1000_NPHR_DEFAULT
59#define CONFIG_DW1000_NPHR_DEFAULT 21
60#endif
61
65#ifndef CONFIG_DW1000_CHANNEL_DEFAULT
66#define CONFIG_DW1000_CHANNEL_DEFAULT 5
67#if CONFIG_DW1000_CHANNEL_DEFAULT > 7 || CONFIG_DW1000_CHANNEL_DEFAULT < 1 || \
68 CONFIG_DW1000_CHANNEL_DEFAULT == 6
69#error "CONFIG_DW1000_CHANNEL_DEFAULT must be 1..7, 6 excluded"
70#endif
71#endif
72
76#ifndef CONFIG_DW1000_TX_PGDELAY_DEFAULT
77#if CONFIG_DW1000_CHANNEL_DEFAULT == 1
78#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH1
79#elif CONFIG_DW1000_CHANNEL_DEFAULT == 2
80#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH2
81#elif CONFIG_DW1000_CHANNEL_DEFAULT == 3
82#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH3
83#elif CONFIG_DW1000_CHANNEL_DEFAULT == 4
84#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH4
85#elif CONFIG_DW1000_CHANNEL_DEFAULT == 5
86#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH5
87#elif CONFIG_DW1000_CHANNEL_DEFAULT == 7
88#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH7
89#endif
90#endif
91
98#ifndef CONFIG_DW1000_PRF_DEFAULT
99#define CONFIG_DW1000_PRF_DEFAULT DWT_PRF_64M
100#endif
101
109#ifndef CONFIG_DW1000_DATARATE_DEFAULT
110#define CONFIG_DW1000_DATARATE_DEFAULT DWT_BR_6M8
111#endif
112
121#ifndef CONFIG_DW1000_PACLEN_DEFAULT
122#define CONFIG_DW1000_PACLEN_DEFAULT DWT_PAC8
123#endif
124
128#ifndef CONFIG_DW1000_RX_PREAM_CIDX_DEFAULT
129#define CONFIG_DW1000_RX_PREAM_CIDX_DEFAULT 9
130#endif
131
138#ifndef CONFIG_DW1000_RX_SFD_TYPE_DEFAULT
139#define CONFIG_DW1000_RX_SFD_TYPE_DEFAULT true
140#endif
141
145#ifndef CONFIG_DW1000_RX_SFD_TO_DEFAULT
146
147/* (preamble length + 1 + SFD length - PAC size) */
148#define CONFIG_DW1000_RX_SFD_TO_DEFAULT (128 + 1 + 8 - 8)
149#endif
150
157#ifndef CONFIG_DW1000_RX_PHR_MODE_DEFAULT
158#define CONFIG_DW1000_RX_PHR_MODE_DEFAULT DWT_PHRMODE_EXT
159#endif
160
164#ifndef CONFIG_DW1000_RX_DIAGNOSTIC
165#define CONFIG_DW1000_RX_DIAGNOSTIC 0
166#endif
167
171#ifndef CONFIG_DW1000_TX_PREAM_CIDX_DEAULT
172#define CONFIG_DW1000_TX_PREAM_CIDX_DEAULT 9
173#endif
174
189#ifndef CONFIG_DW1000_TX_PREAM_LEN_DEFAULT
190#define CONFIG_DW1000_TX_PREAM_LEN_DEFAULT DWT_PLEN_128
191#endif
192
196#ifndef CONFIG_DW1000_RX_ANTSEP_DEFAULT
197#define CONFIG_DW1000_RX_ANTSEP_DEFAULT 0.0205
198#endif
199
204#ifndef CONFIG_DW1000_FRAME_FILTER_DEFAULT
205#define CONFIG_DW1000_FRAME_FILTER_DEFAULT 0x00ff
206#endif
207
211#ifndef CONFIG_DW1000_XTAL_TRIM_DEFAULT
212#define CONFIG_DW1000_XTAL_TRIM_DEFAULT 0x10
213#endif
214
218#ifndef CONFIG_DW1000_RX_STABLE_TIME_US
219#define CONFIG_DW1000_RX_STABLE_TIME_US 6
220#endif
221
225#ifndef CONFIG_DW1000_TRXOFF_ENABLE
226#define CONFIG_DW1000_TRXOFF_ENABLE 1
227#endif
228
232#define DW1000_DOUBLE_BUFFER_ENABLE false
233
237#ifndef CONFIG_DW1000_LDE_ENABLE
238#define CONFIG_DW1000_LDE_ENABLE true
239#endif
240
244#ifndef CONFIG_DW1000_LDO_ENABLE
245#define CONFIG_DW1000_LDO_ENABLE false
246#endif
247
251#ifndef CONFIG_DW1000_SLEEP_ENABLE
252#define CONFIG_DW1000_SLEEP_ENABLE true
253#endif
254
258#ifndef CONFIG_DW1000_WAKEUP_RX_ENABLE
259#define CONFIG_DW1000_WAKEUP_RX_ENABLE true
260#endif
261
265#ifndef CONFIG_DW1000_RX_AUTO_ENABLE
266#define CONFIG_DW1000_RX_AUTO_ENABLE true
267#endif
268
269#ifdef __cplusplus
270}
271#endif