traj circle
[aversive.git] / projects / firefly_example1 / cc2420_config.h
1 /*  
2  *  Copyright Droids Corporation (2008)
3  * 
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  */
19
20 /*
21  * Author : Julien LE GUEN - jlg@jleguen.info
22  */
23
24 #ifndef _CC2420_CONFIG_H
25 #define _CC2420_CONFIG_H
26
27 /*
28  * Configure HERE your hardware connections to the device
29  * Here is the list of connections between the CC2420 and the AVR:
30  *      - VREG_EN       Enable the onchip voltage regulator
31  *      - RESET         Drive the CC2420 reset line
32  *      - FIFO          RX FIFO status line
33  *      - FIFOP         RX FIFO status line
34  *      - CCA           Clear Channel Assessment
35  *      - SFD           Timing information
36  *      
37  *      In addition the chip communicates through a 4-wire SPI connection
38  *      Thus you have to enable the SPI module in Aversive. The CC2420 is a slave
39  *      on the SPI bus.
40  *
41  *      For more information please see the CC2420 DataSheet.
42  */
43
44
45 /* 
46  * VREG_EN - Enable the CC2420  voltage regulator
47  */
48
49 /* Comment if you don't drive VREG_EN from the microcontroller */
50 #define CC2420_VREG_ENABLE
51 #define CC2420_VREG_EN_PORT     PORTA
52 #define CC2420_VREG_EN_PIN      5
53
54 /*
55  * RESET - Drive the CC2420 reset line
56  */
57
58 /* Comment if you don't drive RESET from the microcontroller */
59 #define CC2420_RESET_ENABLE
60 #define CC2420_RESET_PORT       PORTA
61 #define CC2420_RESET_PIN        6
62
63 /*
64  *      FIFO status lines
65  */
66 #define CC2420_FIFO_PORT        PORTC
67 #define CC2420_FIFO_PIN         1
68
69 #define CC2420_FIFOP_PORT       PORTE
70 #define CC2420_FIFOP_PIN        7
71
72 /*
73  *      CCA status line
74  */
75 #define CC2420_CCA_PORT         PORTD
76 #define CC2420_CCA_PIN          4
77
78 /*
79  *      SFD status line
80  */
81 #define CC2420_SFD_PORT         PORTD
82 #define CC2420_SFD_PIN          6
83
84 /*
85  *      SPI Slave Select (SS pin) configuration
86  */
87 #define CC2420_SS_DDR           DDRC
88 #define CC2420_SS_PORT          PORTC
89 #define CC2420_SS_PIN           0
90
91
92
93 #endif /* _CC2420_CONFIG_H */