Subversion Repositories FlightCtrl

Rev

Rev 1544 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1544 Rev 1545
Line 51... Line 51...
51
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
52
#include <avr/io.h>
52
#include <avr/io.h>
53
#include <avr/interrupt.h>
53
#include <avr/interrupt.h>
54
#include "main.h"
54
#include "main.h"
55
#include "uart1.h"
55
#include "uart1.h"
-
 
56
 
56
#if defined (USE_KILLAGREG) || defined (USE_MK3MAG)
57
#if defined (USE_KILLAGREG) || defined (USE_MK3MAG)
57
#include "ubx.h"
58
        #include "ubx.h"
58
#else
59
#else
59
#ifdef USE_RC_DSL
60
        #ifdef USE_RC_DSL
60
#include "dsl.h"
61
                #include "dsl.h"
61
#endif
62
        #endif
62
#ifdef USE_RC_SPEKTRUM
63
        #ifdef USE_RC_SPEKTRUM
63
#include "spectrum.h"
64
                #include "spectrum.h"
-
 
65
        #endif
-
 
66
        #ifdef USE_RC_JENNIC // LPD: FC_JN_Receiver support added
-
 
67
                #include "jennic.h"
64
#endif
68
        #endif
65
#endif
69
#endif
Line 66... Line 70...
66
 
70
 
67
#ifndef USART1_BAUD
71
#ifndef USART1_BAUD
68
#define USART1_BAUD 57600
72
        #define USART1_BAUD 57600
Line 69... Line 73...
69
#endif
73
#endif
70
 
74
 
71
/****************************************************************/
75
/****************************************************************/
Line 158... Line 162...
158
ISR(USART1_RX_vect)
162
ISR(USART1_RX_vect)
159
{
163
{
160
        uint8_t c;
164
        uint8_t c;
161
        c = UDR1; // get data byte
165
        c = UDR1; // get data byte
162
        #if (defined (USE_KILLAGREG) || defined (USE_MK3MAG))
166
        #if (defined (USE_KILLAGREG) || defined (USE_MK3MAG))
163
        ubx_parser(c);                  // and put it into the ubx protocol parser
167
                ubx_parser(c);                          // and put it into the ubx protocol parser
164
        #else
168
        #else
165
        #ifdef USE_RC_DSL
169
                #ifdef USE_RC_DSL
166
        dsl_parser(c);                  // parse dsl data stream
170
                        dsl_parser(c);                  // parse dsl data stream
167
        #endif
171
                #endif
168
        #ifdef USE_RC_SPEKTRUM
172
                #ifdef USE_RC_SPEKTRUM
169
        spectrum_parser(c);             // parse spectrum data stream
173
                        spectrum_parser(c);             // parse spectrum data stream
-
 
174
                #endif
-
 
175
                #ifdef USE_RC_JENNIC            // LPD: FC_JN_Receiver support added
-
 
176
                        jen_parser(c);                  // parse jennic  data stream
170
        #endif
177
                #endif
171
        #endif
178
        #endif
172
}
179
}