Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
xbee_dl.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 *
20 */
21
28#include "mcu.h"
29#include "mcu_periph/sys_time.h"
30#include "mcu_periph/uart.h"
31#include "generated/airframe.h"
32
33#define STR_(s) #s
34#define STR(s) STR_(s)
35
36#ifndef XBEE_TYPE
37#define XBEE_TYPE XBEE_24
38#endif
39#ifndef XBEE_INIT
40#define XBEE_INIT ""
41#endif
42
43#ifdef XBEE_CHANNEL
44#define XBEE_CHANNEL_CONF "ATCH" STR(XBEE_CHANNEL) "\r"
45INFO("XBEE channel configured : " XBEE_CHANNEL_CONF)
46#else
47#define XBEE_CHANNEL_CONF ""
48#endif
49
50#define CONCAT(a, b) a b
51
52#ifndef XBEE_UPDATE_DL
53#define XBEE_UPDATE_DL TRUE
54#endif
55
57
58void xbee_dl_init(void)
59{
60#if USE_HARD_FAULT_RECOVERY
62 // in case of hardfault recovery, we want to skip xbee init which as an active wait
64 else
65#endif
67}
68
74
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
uint8_t dl_buffer[MSG_SIZE]
Definition main_demo5.c:63
bool dl_msg_available
Flag provided to control calls to dl_parse_msg.
Definition main_demo5.c:60
uint16_t foo
Definition main_demo5.c:58
Arch independent mcu ( Micro Controller Unit ) utilities.
Architecture independent timing functions.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define XBEE_CHANNEL_CONF
Definition xbee_dl.c:47
#define XBEE_TYPE
Definition xbee_dl.c:37
struct xbee_transport xbee_tp
XBEE transport structure.
Definition xbee_dl.c:56
#define CONCAT(a, b)
Definition xbee_dl.c:50
#define XBEE_INIT
Definition xbee_dl.c:40
#define XBEE_UPDATE_DL
Definition xbee_dl.c:53
void xbee_dl_init(void)
Init function.
Definition xbee_dl.c:58
void xbee_dl_event(void)
Datalink Event.
Definition xbee_dl.c:69
Datalink using XBEE protocol.