robobuggy / arduino / InterruptSingleChannel / receiver.h @ 0c873a67
History | View | Annotate | Download (719 Bytes)
1 |
/**
|
---|---|
2 |
* @file receiver.h
|
3 |
* @brief Headers for Receiver
|
4 |
* DOGE mooooooo
|
5 |
* doge COW!
|
6 |
*/
|
7 |
|
8 |
#ifndef _RECEIVER_H_
|
9 |
#define _RECEIVER_H_
|
10 |
|
11 |
#ifdef __cplusplus
|
12 |
extern "C"{ |
13 |
#endif
|
14 |
|
15 |
#define THR_INDEX 0 |
16 |
#define AIL_INDEX 1 |
17 |
|
18 |
// To check if new value available, check the
|
19 |
// value contained in this, using the correct
|
20 |
// index.
|
21 |
volatile char rc_available[2]; |
22 |
|
23 |
// if this is true, we are connected.
|
24 |
volatile char rc_connected; |
25 |
|
26 |
int receiver_init();
|
27 |
|
28 |
// Zero for throttle position, 1 for ail pos
|
29 |
// returns an angle strictly between 0 and 180,
|
30 |
// with 90 being the center position.
|
31 |
int receiver_get_angle(int int_pin); |
32 |
|
33 |
#ifdef __cplusplus
|
34 |
} // extern "C"
|
35 |
#endif /* __cplusplus */ |
36 |
|
37 |
#endif /* _RECEIVER_H_ */ |
38 |
|