cc2420_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universität Berlin
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 CC2420_PARAMS_H
20 #define CC2420_PARAMS_H
21 
22 #include "board.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #ifndef CC2420_PARAM_SPI
33 #define CC2420_PARAM_SPI (SPI_DEV(0))
34 #endif
35 #ifndef CC2420_PARAM_SPI_CLK
36 #define CC2420_PARAM_SPI_CLK (SPI_CLK_5MHZ)
37 #endif
38 #ifndef CC2420_PARAM_CS
39 #define CC2420_PARAM_CS (GPIO_PIN(0, 0))
40 #endif
41 #ifndef CC2420_PARAM_FIFO
42 #define CC2420_PARAM_FIFO (GPIO_PIN(0, 1))
43 #endif
44 #ifndef CC2420_PARAM_FIFOP
45 #define CC2420_PARAM_FIFOP (GPIO_PIN(0, 2))
46 #endif
47 #ifndef CC2420_PARAM_CCA
48 #define CC2420_PARAM_CCA (GPIO_PIN(0, 3))
49 #endif
50 #ifndef CC2420_PARAM_SFD
51 #define CC2420_PARAM_SFD (GPIO_PIN(0, 3))
52 #endif
53 #ifndef CC2420_PARAM_VREFEN
54 #define CC2420_PARAM_VREFEN (GPIO_PIN(0, 3))
55 #endif
56 #ifndef CC2420_PARAM_RESET
57 #define CC2420_PARAM_RESET (GPIO_PIN(0, 3))
58 #endif
59 
60 #ifndef CC2420_PARAMS
61 #define CC2420_PARAMS { .spi = CC2420_PARAM_SPI, \
62  .spi_clk = CC2420_PARAM_SPI_CLK, \
63  .pin_cs = CC2420_PARAM_CS, \
64  .pin_fifo = CC2420_PARAM_FIFO, \
65  .pin_fifop = CC2420_PARAM_FIFOP, \
66  .pin_cca = CC2420_PARAM_CCA, \
67  .pin_sfd = CC2420_PARAM_SFD, \
68  .pin_vrefen = CC2420_PARAM_VREFEN, \
69  .pin_reset = CC2420_PARAM_RESET }
70 #endif
71 
77 {
78  CC2420_PARAMS
79 };
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* CC2420_PARAMS_H */
86 
cc2420_params
Struct holding all parameters needed for device initialization.
Definition: cc2420.h:74