Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
inter_mcu.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
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 
27 #include "inter_mcu.h"
28 
29 #if defined SINGLE_MCU
30 static struct fbw_state _fbw_state;
31 static struct ap_state _ap_state;
32 struct fbw_state *fbw_state = &_fbw_state;
33 struct ap_state *ap_state = &_ap_state;
34 #else /* SINGLE_MCU */
35 #include "link_mcu.h"
38 #endif /* ! SINGLE_MCU */
39 
40 volatile bool inter_mcu_received_fbw = false;
41 volatile bool inter_mcu_received_ap = false;
42 
43 PPRZ_MUTEX(ap_state_mtx);
44 PPRZ_MUTEX(fbw_state_mtx);
45 
46 #ifdef FBW
47 
48 bool ap_ok;
49 uint8_t time_since_last_ap;
50 #endif
Communication between fbw and ap processes.
volatile bool inter_mcu_received_ap
Definition: inter_mcu.c:41
struct fbw_state * fbw_state
Definition: inter_mcu.c:36
struct ap_state * ap_state
Definition: inter_mcu.c:37
volatile bool inter_mcu_received_fbw
Definition: inter_mcu.c:40
unsigned char uint8_t
Definition: types.h:14
PPRZ_MUTEX(ap_state_mtx)