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