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
joby.h
Go to the documentation of this file.
1 /*
2  * Paparazzi $Id$
3  *
4  * Copyright (C) 2009 Pascal Brisset <pascal.brisset@gmail.com>,
5  * Antoine Drouin <poinix@gmail.com>
6  *
7  * This file is part of paparazzi.
8  *
9  * paparazzi is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2, or (at your option)
12  * any later version.
13  *
14  * paparazzi is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with paparazzi; see the file COPYING. If not, write to
21  * the Free Software Foundation, 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  */
24 
25 #ifndef RADIO_CONTROL_JOBY_H
26 #define RADIO_CONTROL_JOBY_H
27 
28 #include "std.h"
29 #include "mcu_periph/uart.h"
30 
31 #define RC_JOBY_MAGIC_START 13999
32 
33 #include RADIO_CONTROL_JOBY_MODEL_H
34 
35 typedef enum {
39 
40 typedef enum {
44 
46 {
50 
55 
57 };
58 
59 void rc_joby_parse(int8_t c, void (* callback)(void));
60 
61 #define __RcLink(dev, _x) dev##_x
62 #define _RcLink(dev, _x) __RcLink(dev, _x)
63 #define RcLink(_x) _RcLink(RADIO_CONTROL_LINK, _x)
64 
65 #define RcLinkChAvailable() RcLink(ChAvailable())
66 #define RcLinkGetCh() RcLink(Getch())
67 
68 #define RadioControlEvent(_received_frame_handler) { \
69  while (RcLinkChAvailable()) { \
70  rc_joby_parse(RcLinkGetCh(), _received_frame_handler); \
71  } \
72  }
73 
74 
75 #endif /* RADIO_CONTROL_JOBY_H */
parser_byte_t current_byte
Definition: joby.h:47
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
int16_t parser_inverted_buf
Definition: joby.h:51
uint8_t high_byte_buf
Definition: joby.h:53
parser_inverted_t
Definition: joby.h:40
int current_channel
Definition: joby.h:49
void rc_joby_parse(int8_t c, void(*callback)(void))
Definition: joby.c:76
unsigned long uint32_t
Definition: types.h:18
signed short int16_t
Definition: types.h:17
uint32_t error_counter
Definition: joby.h:56
unsigned char uint8_t
Definition: types.h:14
uint8_t low_byte_buf
Definition: joby.h:54
signed char int8_t
Definition: types.h:15
static struct point c
Definition: discsurvey.c:13
parser_byte_t
Definition: joby.h:35
parser_inverted_t current_inverted
Definition: joby.h:48
int16_t parser_normal_buf
Definition: joby.h:52