Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
abi_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 ENAC - Gautier Hattenberger
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, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 /* Common tools for ABI middelware */
23 
24 #ifndef ABI_COMMON_H
25 #define ABI_COMMON_H
26 
27 /* Include pprz math library */
28 #include "std.h"
29 #include "math/pprz_algebra_int.h"
31 /* Include here headers with structure definition you may want to use with ABI
32  * Ex: '#include "subsystems/gps.h"' in order to use the GpsState structure
33  */
34 
35 
36 /* Some magic to avoid to compile C code, only headers */
37 #ifdef ABI_C
38 #define EXTERN
39 #else
40 #define EXTERN extern
41 #endif
42 
44 typedef void (*abi_callback)(void);
45 
50 #define ABI_BROADCAST 0
51 
53 struct abi_struct {
56  struct abi_struct * next;
57 };
58 typedef struct abi_struct abi_event;
59 
61 #define ABI_FOREACH(head,el) for(el=head; el; el=el->next)
62 #define ABI_PREPEND(head,add) { (add)->next = head; head = add; }
63 
64 #endif /* ABI_COMMON_H */
65 
abi_callback cb
Definition: abi_common.h:55
Paparazzi floating point algebra.
void(* abi_callback)(void)
Generic callback definition.
Definition: abi_common.h:44
struct abi_struct * next
Definition: abi_common.h:56
unsigned char uint8_t
Definition: types.h:14
uint8_t id
Definition: abi_common.h:54
Paparazzi fixed point algebra.
Event structure to store callbacks in a linked list.
Definition: abi_common.h:53