Paparazzi UAS
v5.14.0_stable-0-g3f680d1
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
tacho_mb.c
Go to the documentation of this file.
1
#include "
tacho_mb.h
"
2
3
#include "
LPC21xx.h
"
4
5
uint32_t
t_duration
;
6
7
/* INPUT CAPTURE CAP0.0 on P0.22*/
8
#define TACHO_MB_PINSEL PINSEL1
9
#define TACHO_MB_PINSEL_VAL 0x02
10
#define TACHO_MB_PINSEL_BIT 12
11
12
void
tacho_mb_init
(
void
)
13
{
14
/* select pin for capture */
15
TACHO_MB_PINSEL
|=
TACHO_MB_PINSEL_VAL
<<
TACHO_MB_PINSEL_BIT
;
16
/* enable capture 0.2 on falling edge + trigger interrupt */
17
T0CCR
|=
TCCR_CR0_F
|
TCCR_CR0_I
;
18
}
T0CCR
#define T0CCR
Definition:
LPC21xx.h:60
tacho_mb_init
void tacho_mb_init(void)
Definition:
tacho_mb.c:12
TCCR_CR0_F
#define TCCR_CR0_F
Definition:
lpcTMR.h:135
TACHO_MB_PINSEL
#define TACHO_MB_PINSEL
Definition:
tacho_mb.c:8
TACHO_MB_PINSEL_VAL
#define TACHO_MB_PINSEL_VAL
Definition:
tacho_mb.c:9
TCCR_CR0_I
#define TCCR_CR0_I
Definition:
lpcTMR.h:136
tacho_mb.h
uint32_t
unsigned long uint32_t
Definition:
types.h:18
TACHO_MB_PINSEL_BIT
#define TACHO_MB_PINSEL_BIT
Definition:
tacho_mb.c:10
LPC21xx.h
t_duration
uint32_t t_duration
Definition:
tacho_mb.c:5
sw
airborne
arch
lpc21
tacho_mb.c
Generated on Sat Feb 9 2019 07:05:35 for Paparazzi UAS by
1.8.8