Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
uwb_dw1000_params.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
19
#ifndef UWB_DW1000_PARAMS_H
20
#define UWB_DW1000_PARAMS_H
21
22
#include "board.h"
23
#include "
uwb_dw1000.h
"
24
#include "
dpl/dpl_sem.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#ifndef DW1000_SPI_SEM
35
static
struct
dpl_sem
sem_spi;
36
#define DW1000_SPI_SEM &sem_spi
37
#endif
38
#ifndef DW1000_PARAM_SPI
39
#define DW1000_PARAM_SPI (SPI_DEV(1))
40
#endif
41
#ifndef DW1000_PARAM_SPI_CLK_LOW
42
#define DW1000_PARAM_SPI_CLK_LOW (SPI_CLK_1MHZ)
43
#endif
44
#ifndef DW1000_PARAM_SPI_CLK_HIGH
45
#define DW1000_PARAM_SPI_CLK_HIGH (SPI_CLK_10MHZ)
46
#endif
47
#ifndef DW1000_SPI_MODE
48
#define DW1000_SPI_MODE (SPI_MODE_0)
49
#endif
50
#ifndef DW1000_PARAM_CS_PIN
51
#define DW1000_PARAM_CS_PIN (GPIO_PIN(0, 17))
52
#endif
53
#ifndef DW1000_PARAM_IRQ_PIN
54
#define DW1000_PARAM_IRQ_PIN (GPIO_PIN(0, 19))
55
#endif
56
#ifndef DW1000_PARAM_RESET_PIN
57
#define DW1000_PARAM_RESET_PIN (GPIO_PIN(0, 24))
58
#endif
59
#ifndef DW1000_RX_ANTENNA_DELAY
60
#define DW1000_RX_ANTENNA_DELAY (0x4042)
61
#endif
62
#ifndef DW1000_TX_ANTENNA_DELAY
63
#define DW1000_TX_ANTENNA_DELAY (0x4042)
64
#endif
65
#ifndef DW1000_EXT_CLOCK_DELAY
66
#define DW1000_EXT_CLOCK_DELAY (0)
67
#endif
68
69
#ifndef DW1000_PARAMS
70
#define DW1000_PARAMS { .spi_sem = DW1000_SPI_SEM, \
71
.spi_baudrate = DW1000_PARAM_SPI_CLK_HIGH, \
72
.spi_baudrate_low = DW1000_PARAM_SPI_CLK_LOW, \
73
.spi_num = DW1000_PARAM_SPI, \
74
.rst_pin = DW1000_PARAM_RESET_PIN, \
75
.irq_pin = DW1000_PARAM_IRQ_PIN, \
76
.ss_pin = DW1000_PARAM_CS_PIN, \
77
.rx_antenna_delay = DW1000_RX_ANTENNA_DELAY, \
78
.tx_antenna_delay = DW1000_TX_ANTENNA_DELAY, \
79
.ext_clock_delay = DW1000_EXT_CLOCK_DELAY }
80
#endif
81
86
static
const
dw1000_params_t
dw1000_params
[] =
87
{
88
DW1000_PARAMS
89
};
90
91
#ifdef __cplusplus
92
}
93
#endif
94
95
#endif
/* UWB_DW1000_PARAMS_H */
96
uwb_dw1000.h
Abstraction layer for RIOT adaption.
dw1000_params_t
struct dw1000_dev_cfg dw1000_params_t
Device initialization parameters.
Definition:
uwb_dw1000.h:35
dpl_sem.h
uwb-core DPL (Decawave Porting Layer) semapahore wrappers
dw1000_params
static const dw1000_params_t dw1000_params[]
Configuration struct.
Definition:
uwb_dw1000_params.h:86
dpl_sem
dpl semaphore wrapper
Definition:
dpl_sem.h:37
Generated on Tue Nov 24 2020 19:46:51 by
1.8.17