Loading...
Searching...
No Matches
dw3000_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026 Technische Universität Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19/* Note: Since the dw3000.h is already used by decadriver, the name _conf.h is
20 * used here for the struct definitions */
21#include "dw3000_conf.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
35#ifndef DW3000_PARAM_SPI
36# define DW3000_PARAM_SPI SPI_DEV(0)
37#endif
38
40#ifndef DW3000_PARAM_SPI_CS
41# define DW3000_PARAM_SPI_CS GPIO_PIN(1, 12)
42#endif
43
45#ifndef DW3000_PARAM_SPI_MODE
46# define DW3000_PARAM_SPI_MODE SPI_MODE_0
47#endif
48
50#ifndef DW3000_PARAM_IRQ
51# define DW3000_PARAM_IRQ GPIO_PIN(1, 10)
52#endif
53
55#ifndef DW3000_PARAM_RESET
56# define DW3000_PARAM_RESET GPIO_PIN(1, 8)
57#endif
58
64#ifndef DW3000_PARAM_WAKEUP
65# define DW3000_PARAM_WAKEUP GPIO_PIN(1, 11)
66#endif
67
69#ifndef DW3000_PARAM_SPI_SPEED_FAST
70# define DW3000_PARAM_SPI_SPEED_FAST SPI_CLK_10MHZ
71#endif
72
74#ifndef DW3000_PARAM_SPI_SPEED_SLOW
75# define DW3000_PARAM_SPI_SPEED_SLOW SPI_CLK_1MHZ
76#endif
77
79#ifndef DW3000_PARAMS
80# define DW3000_PARAMS { .spi = DW3000_PARAM_SPI, \
81 .spi_cs = DW3000_PARAM_SPI_CS, \
82 .spi_mode = DW3000_PARAM_SPI_MODE, \
83 .irq = DW3000_PARAM_IRQ, \
84 .reset = DW3000_PARAM_RESET, \
85 .wakeup = DW3000_PARAM_WAKEUP, \
86 .spi_speed_fast = DW3000_PARAM_SPI_SPEED_FAST, \
87 .spi_speed_slow = DW3000_PARAM_SPI_SPEED_SLOW }
88#endif
90
100
101#ifdef __cplusplus
102}
103#endif
104
Device configuration structs.
static const dw3000_params_t dw3000_params
Configuration struct.
#define DW3000_PARAMS
Collection of all params.
Device initialization parameters.
Definition dw3000_conf.h:28