Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
xbee24.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 ENAC, Pascal Brisset
3  * Copyright (C) 2014 Gautier Hattenberger <gautier.hattenberger@enac.fr>
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, see
19  * <http://www.gnu.org/licenses/>.
20  *
21  */
22 
28 #ifndef XBEE24_H
29 #define XBEE24_H
30 
31 #define XBEE_TX_ID 0x01 /* 16 bits address */
32 #define XBEE_RX_ID 0x81 /* 16 bits address */
33 #define XBEE_RFDATA_OFFSET 5
34 
35 #define XBEE_TX_OVERHEAD 4
36 #define XBEE_TX_HEADER { \
37  XBEE_TX_ID, \
38  NO_FRAME_ID, \
39  (GROUND_STATION_ADDR >> 8), \
40  (GROUND_STATION_ADDR & 0xff), \
41  TX_OPTIONS \
42  }
43 
44 #define XbeeGetRSSI(_payload) { xbee_tp.rssi = _payload[3]; }
45 
46 #endif // XBEE24_H