Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
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
28
#include "
subsystems/radio_control.h
"
29
#include "
subsystems/radio_control/ppm.h
"
30
31
32
void
ppm_arch_init
(
void
)
33
{
34
/* select pin for capture */
35
PPM_PINSEL
|=
PPM_PINSEL_VAL
<<
PPM_PINSEL_BIT
;
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
38
T0CCR
|=
PPM_CCR_CRR
|
PPM_CCR_CRI
;
39
#elif defined PPM_PULSE_TYPE && PPM_PULSE_TYPE == PPM_PULSE_TYPE_NEGATIVE
40
T0CCR
|=
PPM_CCR_CRF
|
PPM_CCR_CRI
;
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
}
T0CCR
#define T0CCR
Definition:
LPC21xx.h:60
PPM_PINSEL_VAL
#define PPM_PINSEL_VAL
Definition:
booz_1.0.h:51
PPM_PINSEL
#define PPM_PINSEL
Definition:
booz_1.0.h:50
radio_control.h
PPM_CCR_CRI
#define PPM_CCR_CRI
Definition:
booz_1.0.h:56
PPM_PINSEL_BIT
#define PPM_PINSEL_BIT
Definition:
booz_1.0.h:52
ppm_arch_init
void ppm_arch_init(void)
Architecture dependant code.
Definition:
ppm_arch.c:89
PPM_CCR_CRR
#define PPM_CCR_CRR
Definition:
booz_1.0.h:55
ppm.h
PPM_CCR_CRF
#define PPM_CCR_CRF
Definition:
booz_1.0.h:54
sw
airborne
arch
lpc21
subsystems
radio_control
ppm_arch.c
Generated on Sat Feb 9 2019 06:43:44 for Paparazzi UAS by
1.8.8