Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ppm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 The Paparazzi Team
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 #ifndef RC_PPM_H
23 #define RC_PPM_H
24 
25 #include "std.h"
26 
27 /* in case you want to override RADIO_CONTROL_NB_CHANNEL */
28 #include "generated/airframe.h"
29 
33 #include "modules/radio_control/ppm_arch.h"
34 /* must be implemented by arch dependant code */
35 extern void ppm_arch_init(void);
36 
41 #include "generated/radio.h"
42 
46 #define PPM_PULSE_TYPE_POSITIVE 0
47 #define PPM_PULSE_TYPE_NEGATIVE 1
48 
49 extern uint16_t ppm_pulses[RADIO_CTL_NB];
50 extern volatile bool ppm_frame_available;
51 
55 extern void ppm_init(void);
56 
61 extern void ppm_event(void);
62 
70 extern void ppm_decode_frame(uint32_t ppm_time);
71 
79 extern void ppm_decode_frame_width(uint32_t ppm_width);
80 
81 #endif /* RC_PPM_H */
void ppm_decode_frame_width(uint32_t ppm_width)
Decode a PPM frame from last width.
Definition: ppm.c:120
void ppm_arch_init(void)
Architecture dependant code.
Definition: ppm_arch.c:90
void ppm_init(void)
RC init function.
Definition: ppm.c:71
uint16_t ppm_pulses[RADIO_CTL_NB]
Definition: ppm.c:36
void ppm_decode_frame(uint32_t ppm_time)
Decode a PPM frame from global timer value.
Definition: ppm.c:105
void ppm_event(void)
RC event function.
Definition: ppm.c:86
volatile bool ppm_frame_available
Definition: ppm.c:37
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
Definition: vl53l1_types.h:78