Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ppm_arch.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2014 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, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
30 
31 
32 void ppm_arch_init(void)
33 {
34  /* select pin for capture */
36  /* enable capture 0.2 on falling or rising edge + trigger interrupt */
37 #if defined PPM_PULSE_TYPE && PPM_PULSE_TYPE == PPM_PULSE_TYPE_POSITIVE
39 #elif defined PPM_PULSE_TYPE && PPM_PULSE_TYPE == PPM_PULSE_TYPE_NEGATIVE
41 #else
42 #error "Unknown PPM_PULSE_TYPE"
43 #endif
44 
45 #ifdef USE_PPM_RSSI_GPIO
46  /* select pin as GPIO (input) : should be default ?*/
47  //PPM_RSSI_PINSEL |= PPM_RSSI_VAL << PPM_RSSI_PINSEL_BIT;
48  //ClearBit(PPM_RSSI_IODIR, PPM_RSSI_BIT);
49 #endif
50 }
#define T0CCR
Definition: LPC21xx.h:60
#define PPM_PINSEL_VAL
Definition: booz_1.0.h:51
void ppm_arch_init(void)
Architecture dependant code.
Definition: ppm_arch.c:32
#define PPM_PINSEL
Definition: booz_1.0.h:50
#define PPM_CCR_CRI
Definition: booz_1.0.h:56
#define PPM_PINSEL_BIT
Definition: booz_1.0.h:52
#define PPM_CCR_CRR
Definition: booz_1.0.h:55
#define PPM_CCR_CRF
Definition: booz_1.0.h:54