at86rf2xx_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de>
3  * 2015 Hauke Petersen <hauke.petersen@fu-berlin.de>
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
20 #ifndef AT86RF2XX_PARAMS_H
21 #define AT86RF2XX_PARAMS_H
22 
23 #include "board.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef AT86RF2XX_PARAM_SPI
34 #define AT86RF2XX_PARAM_SPI (SPI_DEV(0))
35 #endif
36 #ifndef AT86RF2XX_PARAM_SPI_CLK
37 #define AT86RF2XX_PARAM_SPI_CLK (SPI_CLK_5MHZ)
38 #endif
39 #ifndef AT86RF2XX_PARAM_CS
40 #define AT86RF2XX_PARAM_CS (GPIO_PIN(0, 0))
41 #endif
42 #ifndef AT86RF2XX_PARAM_INT
43 #define AT86RF2XX_PARAM_INT (GPIO_PIN(0, 1))
44 #endif
45 #ifndef AT86RF2XX_PARAM_SLEEP
46 #define AT86RF2XX_PARAM_SLEEP (GPIO_PIN(0, 2))
47 #endif
48 #ifndef AT86RF2XX_PARAM_RESET
49 #define AT86RF2XX_PARAM_RESET (GPIO_PIN(0, 3))
50 #endif
51 
52 #ifndef AT86RF2XX_PARAMS
53 #define AT86RF2XX_PARAMS { .spi = AT86RF2XX_PARAM_SPI, \
54  .spi_clk = AT86RF2XX_PARAM_SPI_CLK, \
55  .cs_pin = AT86RF2XX_PARAM_CS, \
56  .int_pin = AT86RF2XX_PARAM_INT, \
57  .sleep_pin = AT86RF2XX_PARAM_SLEEP, \
58  .reset_pin = AT86RF2XX_PARAM_RESET }
59 #endif
60 
65 #if defined(MODULE_AT86RFA1) || defined(MODULE_AT86RFR2)
66 static const uint8_t at86rf2xx_params[] =
67 {
68  0 /* dummy value */
69 };
70 #else
72 {
73  AT86RF2XX_PARAMS
74 };
75 #endif
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* AT86RF2XX_PARAMS_H */
82 
at86rf2xx_params
struct holding all params needed for device initialization
Definition: at86rf2xx.h:231