Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
transport.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 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 
27 #ifndef TRANSPORT_H
28 #define TRANSPORT_H
29 
30 #include <inttypes.h>
31 #include "std.h"
32 
33 #ifndef TRANSPORT_PAYLOAD_LEN
34 #define TRANSPORT_PAYLOAD_LEN 256
35 #endif
36 
39 struct transport {
40  // payload buffer
42  // payload length
43  volatile uint8_t payload_len;
44  // message received flag
45  volatile bool_t msg_received;
46  // overrun and error flags
48 };
49 
55 #define __TransportLink(dev, _x) dev##_x
56 #define _TransportLink(dev, _x) __TransportLink(dev, _x)
57 #define TransportLink(_dev, _x) _TransportLink(_dev, _x)
58 
59 #endif /* TRANSPORT_H */
60 
Generic transport header.
Definition: transport.h:39
volatile uint8_t payload_len
Definition: transport.h:43
uint8_t payload[TRANSPORT_PAYLOAD_LEN]
Definition: transport.h:41
unsigned char uint8_t
Definition: types.h:14
volatile bool_t msg_received
Definition: transport.h:45
uint8_t ovrn
Definition: transport.h:47
uint8_t error
Definition: transport.h:47
#define TRANSPORT_PAYLOAD_LEN
Definition: transport.h:34