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
26 extern "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_L2ADDR
56 
59 #define CC110X_PARAM_L2ADDR CC110X_L2ADDR_AUTO
60 #endif
61 
62 #ifndef CC110X_PARAM_PATABLE
63 
69 #define CC110X_PARAM_PATABLE (&cc110x_patable_868mhz)
70 #endif
71 
72 #ifndef CC110X_PARAM_CONFIG
73 
78 #define CC110X_PARAM_CONFIG NULL
79 #endif
80 
81 #ifndef CC110X_PARAM_CHANNELS
82 
87 #define CC110X_PARAM_CHANNELS (&cc110x_chanmap_868mhz_lora)
88 #endif
89 
90 #ifndef CC110X_PARAMS
91 
94 #define CC110X_PARAMS { \
95  .spi = CC110X_PARAM_SPI, \
96  .spi_clk = CC110X_PARAM_SPI_CLOCK, \
97  .cs = CC110X_PARAM_CS, \
98  .gdo0 = CC110X_PARAM_GDO0, \
99  .gdo2 = CC110X_PARAM_GDO2, \
100  .l2addr = CC110X_PARAM_L2ADDR, \
101  .patable = CC110X_PARAM_PATABLE, \
102  .config = CC110X_PARAM_CONFIG, \
103  .channels = CC110X_PARAM_CHANNELS, \
104 }
105 
106 #endif
107 
112 static const cc110x_params_t cc110x_params[] = {
114 };
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 #endif /* CC110X_PARAMS_H */
120 
cc110x_params_t
Structure holding all parameter for driver initialization.
Definition: cc110x.h:460
CC110X_PARAMS
#define CC110X_PARAMS
Default initialization parameters of the CC110x driver.
Definition: cc110x_params.h:94
cc110x_params
static const cc110x_params_t cc110x_params[]
CC110X initialization parameters.
Definition: cc110x_params.h:112
cc110x_settings.h
Default settings of the TI CC1100/CC1101 transceiver.