Loading...
Searching...
No Matches
uwb_dw1000_config.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "dw1000/dw1000_regs.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
34#ifndef CONFIG_DW1000_ROLE_DEFAULT
35#define CONFIG_DW1000_ROLE_DEFAULT 0x0
36#endif
37
41#ifndef CONFIG_DW1000_NSFD_DEFAULT
42#define CONFIG_DW1000_NSFD_DEFAULT 8
43#endif
44
48#ifndef CONFIG_DW1000_NSYNC_DEFAULT
49#define CONFIG_DW1000_NSYNC_DEFAULT 128
50#endif
51
55#ifndef CONFIG_DW1000_NPHR_DEFAULT
56#define CONFIG_DW1000_NPHR_DEFAULT 21
57#endif
58
62#ifndef CONFIG_DW1000_CHANNEL_DEFAULT
63#define CONFIG_DW1000_CHANNEL_DEFAULT 5
64#if CONFIG_DW1000_CHANNEL_DEFAULT > 7 || CONFIG_DW1000_CHANNEL_DEFAULT < 1 || \
65 CONFIG_DW1000_CHANNEL_DEFAULT == 6
66#error "CONFIG_DW1000_CHANNEL_DEFAULT must be 1..7, 6 excluded"
67#endif
68#endif
69
73#ifndef CONFIG_DW1000_TX_PGDELAY_DEFAULT
74#if CONFIG_DW1000_CHANNEL_DEFAULT == 1
75#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH1
76#elif CONFIG_DW1000_CHANNEL_DEFAULT == 2
77#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH2
78#elif CONFIG_DW1000_CHANNEL_DEFAULT == 3
79#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH3
80#elif CONFIG_DW1000_CHANNEL_DEFAULT == 4
81#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH4
82#elif CONFIG_DW1000_CHANNEL_DEFAULT == 5
83#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH5
84#elif CONFIG_DW1000_CHANNEL_DEFAULT == 7
85#define CONFIG_DW1000_TX_PGDELAY_DEFAULT TC_PGDELAY_CH7
86#endif
87#endif
88
95#ifndef CONFIG_DW1000_PRF_DEFAULT
96#define CONFIG_DW1000_PRF_DEFAULT DWT_PRF_64M
97#endif
98
106#ifndef CONFIG_DW1000_DATARATE_DEFAULT
107#define CONFIG_DW1000_DATARATE_DEFAULT DWT_BR_6M8
108#endif
109
118#ifndef CONFIG_DW1000_PACLEN_DEFAULT
119#define CONFIG_DW1000_PACLEN_DEFAULT DWT_PAC8
120#endif
121
125#ifndef CONFIG_DW1000_RX_PREAM_CIDX_DEFAULT
126#define CONFIG_DW1000_RX_PREAM_CIDX_DEFAULT 9
127#endif
128
135#ifndef CONFIG_DW1000_RX_SFD_TYPE_DEFAULT
136#define CONFIG_DW1000_RX_SFD_TYPE_DEFAULT true
137#endif
138
142#ifndef CONFIG_DW1000_RX_SFD_TO_DEFAULT
143
144/* (preamble length + 1 + SFD length - PAC size) */
145#define CONFIG_DW1000_RX_SFD_TO_DEFAULT (128 + 1 + 8 - 8)
146#endif
147
154#ifndef CONFIG_DW1000_RX_PHR_MODE_DEFAULT
155#define CONFIG_DW1000_RX_PHR_MODE_DEFAULT DWT_PHRMODE_EXT
156#endif
157
161#ifndef CONFIG_DW1000_RX_DIAGNOSTIC
162#define CONFIG_DW1000_RX_DIAGNOSTIC 0
163#endif
164
168#ifndef CONFIG_DW1000_TX_PREAM_CIDX_DEAULT
169#define CONFIG_DW1000_TX_PREAM_CIDX_DEAULT 9
170#endif
171
186#ifndef CONFIG_DW1000_TX_PREAM_LEN_DEFAULT
187#define CONFIG_DW1000_TX_PREAM_LEN_DEFAULT DWT_PLEN_128
188#endif
189
193#ifndef CONFIG_DW1000_RX_ANTSEP_DEFAULT
194#define CONFIG_DW1000_RX_ANTSEP_DEFAULT 0.0205
195#endif
196
201#ifndef CONFIG_DW1000_FRAME_FILTER_DEFAULT
202#define CONFIG_DW1000_FRAME_FILTER_DEFAULT 0x00ff
203#endif
204
208#ifndef CONFIG_DW1000_XTAL_TRIM_DEFAULT
209#define CONFIG_DW1000_XTAL_TRIM_DEFAULT 0x10
210#endif
211
215#ifndef CONFIG_DW1000_RX_STABLE_TIME_US
216#define CONFIG_DW1000_RX_STABLE_TIME_US 6
217#endif
218
222#ifndef CONFIG_DW1000_TRXOFF_ENABLE
223#define CONFIG_DW1000_TRXOFF_ENABLE 1
224#endif
225
229#define DW1000_DOUBLE_BUFFER_ENABLE false
230
234#ifndef CONFIG_DW1000_LDE_ENABLE
235#define CONFIG_DW1000_LDE_ENABLE true
236#endif
237
241#ifndef CONFIG_DW1000_LDO_ENABLE
242#define CONFIG_DW1000_LDO_ENABLE false
243#endif
244
248#ifndef CONFIG_DW1000_SLEEP_ENABLE
249#define CONFIG_DW1000_SLEEP_ENABLE true
250#endif
251
255#ifndef CONFIG_DW1000_WAKEUP_RX_ENABLE
256#define CONFIG_DW1000_WAKEUP_RX_ENABLE true
257#endif
258
262#ifndef CONFIG_DW1000_RX_AUTO_ENABLE
263#define CONFIG_DW1000_RX_AUTO_ENABLE true
264#endif
265
266#ifdef __cplusplus
267}
268#endif