Blame view

RIOT/drivers/cc2420/include/cc2420_params.h 2.16 KB
fb11e647   vrobic   reseau statique a...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
  /*
   * Copyright (C) 2016 Freie Universitรคt Berlin
   *
   * This file is subject to the terms and conditions of the GNU Lesser
   * General Public License v2.1. See the file LICENSE in the top level
   * directory for more details.
   */
  
  /**
   * @ingroup     drivers_cc2420
   *
   * @{
   * @file
   * @brief       Default configuration for the CC2420 driver
   *
   * @author      Hauke Petersen <hauke.petersen@fu-berlin.de>
   */
  
  #ifndef CC2420_PARAMS_H
  #define CC2420_PARAMS_H
  
  #include "board.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /**
   * @brief   Set default configuration parameters for the CC2420 driver
   * @{
   */
  #ifndef CC2420_PARAM_SPI
  #define CC2420_PARAM_SPI        (SPI_0)
  #endif
  #ifndef CC2420_PARAM_SPI_CLK
  #define CC2420_PARAM_SPI_CLK    (SPI_SPEED_5MHZ)
  #endif
  #ifndef CC2420_PARAM_CS
  #define CC2420_PARAM_CS         (GPIO_PIN(0, 0))
  #endif
  #ifndef CC2420_PARAM_FIFO
  #define CC2420_PARAM_FIFO       (GPIO_PIN(0, 1))
  #endif
  #ifndef CC2420_PARAM_FIFOP
  #define CC2420_PARAM_FIFOP      (GPIO_PIN(0, 2))
  #endif
  #ifndef CC2420_PARAM_CCA
  #define CC2420_PARAM_CCA        (GPIO_PIN(0, 3))
  #endif
  #ifndef CC2420_PARAM_SFD
  #define CC2420_PARAM_SFD        (GPIO_PIN(0, 3))
  #endif
  #ifndef CC2420_PARAM_VREFEN
  #define CC2420_PARAM_VREFEN     (GPIO_PIN(0, 3))
  #endif
  #ifndef CC2420_PARAM_RESET
  #define CC2420_PARAM_RESET      (GPIO_PIN(0, 3))
  #endif
  
  #define CC2420_PARAMS_DEFAULT   {.spi        = CC2420_PARAM_SPI, \
                                   .spi_clk    = CC2420_PARAM_SPI_CLK, \
                                   .pin_cs     = CC2420_PARAM_CS, \
                                   .pin_fifo   = CC2420_PARAM_FIFO, \
                                   .pin_fifop  = CC2420_PARAM_FIFOP, \
                                   .pin_cca    = CC2420_PARAM_CCA, \
                                   .pin_sfd    = CC2420_PARAM_SFD, \
                                   .pin_vrefen = CC2420_PARAM_VREFEN, \
                                   .pin_reset  = CC2420_PARAM_RESET}
  /**@}*/
  
  /**
   * @brief   CC2420 configuration
   */
  static const cc2420_params_t cc2420_params[] =
  {
  #ifdef CC2420_PARAMS_BOARD
      CC2420_PARAMS_BOARD,
  #else
      CC2420_PARAMS_DEFAULT,
  #endif
  };
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* CC2420_PARAMS_H */
  /** @} */