Subversion Repositories FlightCtrl

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1538 killagreg 1
#ifndef _RC_H
2
#define _RC_H
3
 
4
#include <avr/io.h>
5
#include <inttypes.h>
6
 
7
#define J3HIGH    PORTD |= (1<<PORTD5)
8
#define J3LOW     PORTD &= ~(1<<PORTD5)
9
#define J3TOGGLE  PORTD ^= (1<<PORTD5)
10
 
11
#define J4HIGH    PORTD |= (1<<PORTD4)
12
#define J4LOW     PORTD &= ~(1<<PORTD4)
13
#define J4TOGGLE  PORTD ^= (1<<PORTD4)
14
 
15
#define J5HIGH    PORTD |= (1<<PORTD3)
16
#define J5LOW     PORTD &= ~(1<<PORTD3)
17
#define J5TOGGLE  PORTD ^= (1<<PORTD3)
18
 
19
#define PPM_INPUT_ON  TIMSK1 |= (1<<ICIE1)
20
#define PPM_INPUT_OFF TIMSK1 &= ~(1<<ICIE1)
21
 
22
#define MAX_CHANNELS 15
23
extern void RC_Init (void);
24
extern volatile int16_t PPM_in[MAX_CHANNELS];   // the RC-Signal
25
extern volatile int16_t PPM_diff[MAX_CHANNELS]; // the RC-Signal change per 22.5 ms
26
extern volatile uint8_t NewPpmData;     // 0 indicates a new recieved PPM Frame
27
extern volatile uint8_t RC_Quality;     // rc signal quality indicator (0 to 200)
28
extern volatile uint8_t RC_RSSI;        // Received Signal Strength Indication
29
extern volatile uint8_t RC_Channels;    // number of received channels
30
 
31
#endif //_RC_H