Loading...
Searching...
No Matches
cc110x_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Otto-von-Guericke-Universität Magdeburg
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 CC110X_PARAMS_H
20#define CC110X_PARAMS_H
21
22#include "board.h"
23#include "cc110x_settings.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
35#ifndef CC110X_PARAM_SPI
36#define CC110X_PARAM_SPI SPI_DEV(0)
37#endif
38
39#ifndef CC110X_PARAM_CS
40#define CC110X_PARAM_CS GPIO_PIN(1, 21)
41#endif
42
43#ifndef CC110X_PARAM_GDO0
44#define CC110X_PARAM_GDO0 GPIO_PIN(0, 27)
45#endif
46
47#ifndef CC110X_PARAM_GDO2
48#define CC110X_PARAM_GDO2 GPIO_PIN(0, 28)
49#endif
50
51#ifndef CC110X_PARAM_SPI_CLOCK
52#define CC110X_PARAM_SPI_CLOCK SPI_CLK_5MHZ
53#endif
54
55#ifndef CC110X_PARAM_PATABLE
62#if IS_USED(MODULE_CC110X_433MHZ)
63#define CC110X_PARAM_PATABLE (&cc110x_patable_433mhz)
64#elif IS_USED(MODULE_CC110X_868MHZ)
65#define CC110X_PARAM_PATABLE (&cc110x_patable_868mhz)
66#elif IS_USED(MODULE_CC110X_915MHZ)
67#define CC110X_PARAM_PATABLE (&cc110x_patable_915mhz)
68#endif
69#endif
70
71#ifndef CC110X_PARAM_CONFIG
77#if IS_USED(MODULE_CC110X_433MHZ)
78#define CC110X_PARAM_CONFIG (&cc110x_config_433mhz_250kbps_300khz)
79#else
80#define CC110X_PARAM_CONFIG NULL
81#endif
82#endif
83
84#ifndef CC110X_PARAM_CHANNELS
90#if IS_USED(MODULE_CC110X_433MHZ)
91#define CC110X_PARAM_CHANNELS (&cc110x_chanmap_433mhz_300khz)
92#else
93#define CC110X_PARAM_CHANNELS (&cc110x_chanmap_868mhz_lora)
94#endif
95#endif
96
97#ifndef CC110X_PARAMS
101#define CC110X_PARAMS { \
102 .spi = CC110X_PARAM_SPI, \
103 .spi_clk = CC110X_PARAM_SPI_CLOCK, \
104 .cs = CC110X_PARAM_CS, \
105 .gdo0 = CC110X_PARAM_GDO0, \
106 .gdo2 = CC110X_PARAM_GDO2, \
107 .patable = CC110X_PARAM_PATABLE, \
108 .config = CC110X_PARAM_CONFIG, \
109 .channels = CC110X_PARAM_CHANNELS, \
110}
111
112#endif
120};
121
122#ifdef __cplusplus
123}
124#endif
125#endif /* CC110X_PARAMS_H */
#define CC110X_PARAMS
Default initialization parameters of the CC110x driver.
static const cc110x_params_t cc110x_params[]
CC110X initialization parameters.
Default settings of the TI CC1100/CC1101 transceiver.
Structure holding all parameter for driver initialization.
Definition cc110x.h:454