Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
link_mcu_spi.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  *
23  */
24 
29 #ifndef LINK_MCU_H
30 #define LINK_MCU_H
31 
32 #include <inttypes.h>
33 #include "inter_mcu.h"
34 
35 #ifndef SITL
36 #include "link_mcu_hw.h"
37 #endif
38 
39 struct link_mcu_msg {
40  union {
42  struct ap_state from_ap;
43  } payload;
45 };
46 
49 
50 extern bool_t link_mcu_received;
51 
52 extern void link_mcu_event_task( void );
53 
54 #if defined MCU_SPI_LINK && ! defined USE_SPI
55 #define USE_SPI
56 #endif
57 
58 
59 #ifdef FBW
60 #define SPI_SLAVE 1
61 extern void link_mcu_restart(void);
62 #endif /* FBW */
63 
64 #ifdef AP
65 #define SPI_MASTER 1
66 extern uint8_t link_mcu_nb_err;
67 extern uint8_t link_mcu_fbw_nb_err;
68 
69 extern void link_mcu_init(void);
70 extern void link_mcu_send(void);
71 #endif /* AP */
72 
73 #endif
unsigned short uint16_t
Definition: types.h:16
struct fbw_state * fbw_state
Definition: inter_mcu.c:34
struct ap_state * ap_state
Definition: inter_mcu.c:35
unsigned char uint8_t
Definition: types.h:14